When using Google Map API v3 and using the styled map type I can't manage to hide the floor plans that appear when zoomed in. There are a number of "MapTypeStyleFeatureType" options, none of which help to hide the floor plans.
https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyleFeatureType
The API v3 documentation doesn't seem to include anything about the floor plans. Just to be clear, this is an example of a floor plan:
http://maps.googleapis.com/maps/api/staticmap?center=51.496643,-0.172192&zoom=18&format=png&sensor=false&size=640x480&maptype=roadmap&style=feature:administrative|visibility:off
Any help or pointers would be appreciated.
Thanks, Jon.
To hide buildings, you need set "visibility": "simplified" globally before adding any specific styles. You can then go back and set the visibility to "on" and add additional styles back in for each element. Seems like the API should have a method for controlling buildings, but it appears they currently do not.
Note: You can also edit your saved places in this window by selecting the “Lists” tab. Unlike Labels, you can hide your saved pins by clicking the three vertical dots and selecting “Hide on your map.”
Thank you for getting back to us on this. To hide the Marker Category item, you will need to go to Maps->Settings->Marker Listing and then if you look in the options you will see the option to – Hide the Category column.
We can disable the default UI controls provided by Google Maps simply by making the disableDefaultUI value true in the map options.
ok after a bit more experimentation, here's what I settled with.... set all colours to grey (or whatever colour you want the floor plans to be) in the first style, then re-colour everything you want in the following styles. This results in the floor plans appearing as a single block of colour.
var styles = [
{
featureType: "all",
stylers: [
{ color: "#505050" }
]
},
{
featureType: "road",
elementType: "geometry",
stylers: [
{ visibility: "simplified" },
{ color: '#505050' }
]
},
{
featureType: "all",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "administrative",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "transit",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "poi",
stylers: [
{ visibility: "off" }
]
},
{
featureType: "landscape",
stylers: [
{ color: '#FF0000' }
]
},
{
featureType: "landscape.man_made",
stylers: [
{ color: '#393939' }
]
},
{
featureType: "landscape.natural",
stylers: [
{ color: '#393939' }
]
},
{
featureType: "water",
stylers: [
{ color: '#252525' }
]
}
];
It seems like the "All" option is the only thing that will turn off the labels:
http://maps.googleapis.com/maps/api/staticmap?center=51.496643,-0.172192&zoom=18&format=png&sensor=false&size=640x480&maptype=roadmap&style=feature:all|element:labels|visibility:off
Although poi.attraction does seem to turn off the name of the museum, just not the floorplan
http://maps.googleapis.com/maps/api/staticmap?center=51.496643,-0.172192&zoom=18&format=png&sensor=false&size=640x480&maptype=roadmap&style=feature:poi.attraction|element:labels|visibility:off
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With