Reputation: 7135
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.sstatic.net/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
Upvotes: 0
Views: 1701
Reputation: 915
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)
Upvotes: 1