最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Google Maps API not loading interface elements properly - Stack Overflow

programmeradmin6浏览0评论

I have a website that I'm working on at /

I'm using the Google Maps API to create a custom map but the Street View icon is not being displayed properly. It's just a vertical bar whereas it needs to be an icon of a person.

Additionally, if you place the icon on the map to use Street View, you will see that as you rotate around, there are parts of the Street View image missing and the close button icon is not showing either. Any help would be much appreciated.

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

I'm using the Google Maps API to create a custom map but the Street View icon is not being displayed properly. It's just a vertical bar whereas it needs to be an icon of a person.

Additionally, if you place the icon on the map to use Street View, you will see that as you rotate around, there are parts of the Street View image missing and the close button icon is not showing either. Any help would be much appreciated.

Share Improve this question edited Dec 7, 2013 at 20:27 Kara 6,22616 gold badges53 silver badges58 bronze badges asked Feb 20, 2012 at 7:33 Damir KotoricDamir Kotoric 9016 silver badges8 bronze badges 0
Add a ment  | 

3 Answers 3

Reset to default 18

Remove this:

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

from http://damirsepictrip./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;
}

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./questions/20692114/setting-max-width-css-property-to-none-breaks-android-2-3-3-infowindow-close-but

max-height too!

#location-map img{ 
    max-width: none !important; 
    max-height: none !important; 
}
发布评论

评论列表(0)

  1. 暂无评论