Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google maps api v3 no labels?

Is there a way to turn off all labels (street names, state names, country names etc.) from google maps using the API v3? Or are these built directly into the map images?

like image 950
aeq Avatar asked Jun 24 '10 12:06

aeq


People also ask

How do I get Google Maps without labels?

Find the “Layers” menu in the bottom left corner of the screen. Hover your cursor over the box and wait until more options appear. Click “More” to open the Map Details menu. Under “Map Type,” you'll see a checked box next to “Labels.” Uncheck it to remove all labels.

How do I hide the features on Google Maps?

To turn on Incognito mode in Google Maps on a smartphone or tablet, tap your profile picture on the top right and select Turn on Incognito mode.

How do I show labels on my maps?

Here is how to add labels on Google Maps: Android and iOS Search for an address. Or drop a pin by tapping and holding a place on the map. At the bottom, tap on the name of the place. Tap on Label.


2 Answers

Yes, you can do this using the Styled Maps feature of the Google Maps API v3.

Specifically, this style will disable all labels:

[
  {
    featureType: "all",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  }
]

You can apply it to a current map by using:

var customStyled = [];//(array shown above)
map.set('styles',customStyled);
like image 119
Ossama Avatar answered Sep 30 '22 06:09

Ossama


Yes, you can change labels visibility property directly in css code using Styled Maps feature

or directly using the Styled Maps Wizard website

like image 29
Diogo Alves Avatar answered Sep 30 '22 05:09

Diogo Alves