Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

turn off roads overlay on google maps

Tags:

google-maps

I would like to turn off road/highway markings on google maps. I looked at https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyleFeatureType and played with the wizard at http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html. However, any options I chose didn't turn off the road/highway markings. Ideally I would like to add my own paths (e.g. Airline flights) but the road markings throw them off.

Using the wizard, I got this: http://maps.googleapis.com/maps/api/staticmap?center=42.629586,-83.822497&zoom=9&format=png&sensor=false&size=640x480&maptype=roadmap&style=feature:administrative.country|visibility:on&style=hue:0x0099ff&style=element:labels|hue:0xff0000. I like this but I want to turn off all the road marking. Anyone know how to turn do this.

Thanks, BillN

like image 710
Bill Nielsen Avatar asked May 25 '12 20:05

Bill Nielsen


1 Answers

You can remove roads or roads labels using the style generator. If you are using the V3 javascript api. The style JSON would look like

[ { featureType: "road", stylers: [ { visibility: "off" } ] },{ } ]

Here's a static link with no roads.

http://maps.googleapis.com/maps/api/staticmap?center=45.95115,-113.884277&zoom=7&format=png&sensor=false&size=640x480&maptype=roadmap&style=feature:road|visibility:off

like image 99
jotamon Avatar answered Nov 10 '22 01:11

jotamon