So I'm working on a new web app that has a big focus on maps. Using Google Maps API v3 and really happy with it but noticed that the points of interest (POI's) have automatically bubbles with more details and a link to the Google Places page. I don't want these. Here is my code:
map = new google.maps.Map(document.getElementById("map"), {
center:new google.maps.LatLng(default_latitude,default_longitude),
zoom:11,
mapTypeId:google.maps.MapTypeId.ROADMAP,
mapTypeControl:false,
panControl:false
});
I know you can remove the POI's entirely. Here is my code for that:
map = new google.maps.Map(document.getElementById("map"),{
center:new google.maps.LatLng(default_latitude,default_longitude),
zoom:11,
mapTypeId:google.maps.MapTypeId.ROADMAP,
mapTypeControl:false,
panControl:false,
styles:[{
featureType:"poi",
elementType:"labels",
stylers:[{
visibility:"off"
}]
}]
});
This removes everything entirely and I still would like to see the labels as I think they bring value but just think the bubbles are too much of a distraction.
For reference here is the bubble I want to remove:
And here is the same map with POI's removed entirely:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…