Hide Google Map Plans

When using the Google Map API v3 and using a stylized map type, I cannot hide the floor plans that appear when zoomed in. There are many MapTypeStyleFeatureType options, none of which help hide floor plans.

https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyleFeatureType

The API v3 documentation does not seem to contain anything about floor plans. To be clear, this is an example 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, John.

+6
source share
2 answers

ok after a bit more experimentation, here is what I set ... set all the colors to gray (or whatever color you want the floor plans to be) in the first style, and then recolor everything you need into the following styles. This causes floor plans to display as a single color block.

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' } ] } ]; 
+3
source

All Articles