Google Maps API not loading interface elements properly

前端 未结 3 1117
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 20:40

I have a website that I\'m working on at http://damirsepictrip.com/test-mobile-post/

I\'m using the Google Maps API to create a custom map but the Street View icon i

相关标签:
3条回答
  • 2020-12-10 21:19

    Remove this:

    img {
      max-width: 100% !important;
    }
    

    from http://damirsepictrip.com/wp-content/themes/starkers/css/base.css

    ..or try a different selector that doesn't match the images inside the map.

    img {
      max-width: 100% !important;
    }
    
    /*override(reset) the setting for images inside the map*/
    #location-map img{
      max-width:none !important;
    }
    
    0 讨论(0)
  • 2020-12-10 21:21

    max-height too!

    #location-map img{ 
        max-width: none !important; 
        max-height: none !important; 
    }
    
    0 讨论(0)
  • 2020-12-10 21:35

    Adding onto Dr.Molle's answer above --

    The CSS that got this working for me was:

    .gm-style img{
        max-width:none;
    }
    

    Unfortunately, setting max-width to none also broke the infowindow close button in Android 2.3.3 for me -- see https://stackoverflow.com/questions/20692114/setting-max-width-css-property-to-none-breaks-android-2-3-3-infowindow-close-but

    0 讨论(0)
提交回复
热议问题