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?
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.
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
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
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