admin管理员组文章数量:1387402
I've been using a Google maps API v3 (Javascript) for a map, everything's been working great.
Recently we got a Google API for Work account. So, we've incorporated our client ID in our map call:
<script type="text/javascript" src=";v=3.18"></script>
And ever since then, restaurants, banks, stores, etc. do not appear on the map. Only big places, like Universities, state parks, airports, etc.
Removing the client
parameter from the src restores the expected functionality.
Can anyone explain why this is happening, or how to restore the desired functionality?
I've been using a Google maps API v3 (Javascript) for a map, everything's been working great.
Recently we got a Google API for Work account. So, we've incorporated our client ID in our map call:
<script type="text/javascript" src="https://maps.googleapis./maps/api/js?client=gme-clientid&v=3.18"></script>
And ever since then, restaurants, banks, stores, etc. do not appear on the map. Only big places, like Universities, state parks, airports, etc.
Removing the client
parameter from the src restores the expected functionality.
Can anyone explain why this is happening, or how to restore the desired functionality?
Share Improve this question asked Jan 16, 2015 at 0:23 sharfsharf 2,1434 gold badges26 silver badges48 bronze badges1 Answer
Reset to default 9I assume either by default for when a client ID is specified, or perhaps setup specifically for your account, that those types of features are disabled. Perhaps when you create the map if you explicitly say you want those features enabled, they should appear I would expect.
See https://developers.google./maps/documentation/javascript/styling#map_features
I'm guessing these are in the poi.business
category of features. You could try something like:
var map = new google.maps.Map(mapDiv, {
center: {lat: coordinates.latitude, lng: coordinates.longitude},
zoom: 13,
styles: [{
featureType: 'poi.business',
elementType: 'labels',
stylers: [{
visibility: 'on'
}]
}]
});
If that doesn't work, try featureType: 'all',
本文标签: javascriptGoogle Maps API not showing placesStack Overflow
版权声明:本文标题:javascript - Google Maps API not showing places - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744500685a2609303.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论