How to disable places on google map V3?

后端 未结 2 1583
臣服心动
臣服心动 2021-02-07 02:52

I\'m trying to migrate my application to latest version of Google map API and found that Google appends it\'s own items by default from Google Places directory to the map. It d

相关标签:
2条回答
  • 2021-02-07 03:16

    You can remove it by adding the following code:

    var styles = [
       {
         featureType: "poi",
         stylers: [
          { visibility: "off" }
         ]   
        }
    ];
    
    var styledMap = new google.maps.StyledMapType(styles,{name: "Styled Map"});
    
    0 讨论(0)
  • 2021-02-07 03:30

    Just a pointer - this seems possible with custom styled maps. If I'm not mistaken, the feature type you're looking for would be poi.business, whose visiblity you would turn off.

    There's a wizard to help you build the options array.

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