Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove all from google map

I need google map to have only street names. I wan't to remove things like marked buss stations, hospitals etc.
What command can I use to remove this things?

like image 381
1110 Avatar asked Dec 06 '11 20:12

1110


3 Answers

You can style the base map as described here:

http://code.google.com/apis/maps/documentation/javascript/styling.html

For example, to hide everything but roads:

var styleArray = [
  {
    featureType: "all",
    stylers: [
      { visibility: "off" }
    ]
  },
  {
    featureType: "road",
    stylers: [
      { visibility: "on" }
    ]
  }
];

map.setOptions({styles: styleArray});

The full list of features that can be styled is here: http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeStyleFeatureType

You may want to turn parks back on, for example.

like image 78
Mike Jeffrey Avatar answered Sep 30 '22 06:09

Mike Jeffrey


You can used the Styled Maps in v3 of the Google Maps API to remove items on the map you don't want.

Try it out here on the Styled Maps Wizard

http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

like image 43
ccuesta Avatar answered Sep 30 '22 05:09

ccuesta


Actually you only can use 4 types of maps, Satellite, Hybrid, Terrain and Roadmap. I recommend you to use the roapmap, it is the simplest map it has the street names and by default it doesn't has anything else, like the transit overlay.

In other words you can't remove just some items from the maps, you only can add new layers of your own data.

UPDATE:

Look at @Mike Jeffrey answer

like image 29
Francisco Valdez Avatar answered Sep 30 '22 07:09

Francisco Valdez