0

I've embedded google maps on to my page, and set visual refresh to true (https://developers.google.com/maps/documentation/javascript/basics#VisualRefresh).

Works great, except the map now has all these clickable elements by default. For example:

https://i.stack.imgur.com/D4j2V.jpg

Attractions have bubble help, I've accidentally gone in to street view before, and so on.

How do I turn these off?

Thanks

Peter Ehrlich
  • 6,969
  • 4
  • 49
  • 65
  • 1
    This feature is not specific to the visualRefresh, it's not possible to disable it( http://code.google.com/p/gmaps-api-issues/issues/detail?id=3866 ), all you can do is to use a custom style and hide the poi-features. – Dr.Molle Jun 21 '13 at 08:24

1 Answers1

1

you can add this code to your initialize function, as stated by Dr.Molle

var styles = [
  {
    featureType: "poi",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  },{
    featureType: "transit",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  }
];

map.setOptions({styles: styles});

an other solution would be to set the MapTypeId to TERRAIN.

and in addition you can add

streetViewControl: false

to the mapoptions. (this will not disable the streetview option in the bubbles, but it wont be in the navigation controls anymore)

77120
  • 865
  • 1
  • 14
  • 27