Hide city names

New home Forums Pro Add-on General queries Hide city names

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #55095
    seanBD
    Member

    Hey, this is a simple question but I couldn’t figure out how to do it through documentation and looking around.

    On our map here: https://professional.barrondesigns.com/contact

    Is there a way to hide/disable the few random cities that show up when zoomed in enough to read the state names? Specifically like when I can see “San Francisco”, “Los Angeles”, “San Diego”, “Ottawa”, “Montreal”, etc.

    Is this possible? I feel like the cities start to clutter up the state names. Is it just a different theme or something?

    #55122
    Perry
    Moderator

    Hi Sean

    Thank you for getting in touch!

    Please go to Maps -> Edit -> Themes, and in custom theme data please paste the following:

    [{
          "featureType": "administrative.locality",
          "elementType": "labels",
          "stylers": [{
            "visibility": "off"
          }]
        }]

    Does that help?

    Kind regards
    – Perry

    #55148
    seanBD
    Member

    I’m not sure if I did it wrong but when I paste that at the end of the other code it didn’t hide the cities. It just changed the color of my map from white to green/colorful.

    #55194
    Perry
    Moderator

    Hi Sean

    My apologies, I overlooked your existing theme data. Please combine the two like so:

    [{
    		"featureType": "administrative.locality",
    		"elementType": "all",
    		"stylers": [{
    				"hue": "#2c2e33"
    			}, {
    				"saturation": 7
    			}, {
    				"lightness": 19
    			}, {
    				"visibility": "on"
    			}
    		]
    	}, {
    		"featureType": "landscape",
    		"elementType": "all",
    		"stylers": [{
    				"hue": "#ffffff"
    			}, {
    				"saturation": -100
    			}, {
    				"lightness": 100
    			}, {
    				"visibility": "simplified"
    			}
    		]
    	}, {
    		"featureType": "poi",
    		"elementType": "all",
    		"stylers": [{
    				"hue": "#ffffff"
    			}, {
    				"saturation": -100
    			}, {
    				"lightness": 100
    			}, {
    				"visibility": "off"
    			}
    		]
    	}, {
    		"featureType": "road",
    		"elementType": "geometry",
    		"stylers": [{
    				"hue": "#bbc0c4"
    			}, {
    				"saturation": -93
    			}, {
    				"lightness": 31
    			}, {
    				"visibility": "simplified"
    			}
    		]
    	}, {
    		"featureType": "road",
    		"elementType": "labels",
    		"stylers": [{
    				"hue": "#bbc0c4"
    			}, {
    				"saturation": -93
    			}, {
    				"lightness": 31
    			}, {
    				"visibility": "on"
    			}
    		]
    	}, {
    		"featureType": "road.arterial",
    		"elementType": "labels",
    		"stylers": [{
    				"hue": "#bbc0c4"
    			}, {
    				"saturation": -93
    			}, {
    				"lightness": -2
    			}, {
    				"visibility": "simplified"
    			}
    		]
    	}, {
    		"featureType": "road.local",
    		"elementType": "geometry",
    		"stylers": [{
    				"hue": "#e9ebed"
    			}, {
    				"saturation": -90
    			}, {
    				"lightness": -8
    			}, {
    				"visibility": "simplified"
    			}
    		]
    	}, {
    		"featureType": "transit",
    		"elementType": "all",
    		"stylers": [{
    				"hue": "#e9ebed"
    			}, {
    				"saturation": 10
    			}, {
    				"lightness": 69
    			}, {
    				"visibility": "on"
    			}
    		]
    	}, {
    		"featureType": "water",
    		"elementType": "all",
    		"stylers": [{
    				"hue": "#e9ebed"
    			}, {
    				"saturation": -78
    			}, {
    				"lightness": 67
    			}, {
    				"visibility": "simplified"
    			}
    		]
    	}, {
    		"featureType": "administrative.locality",
    		"elementType": "labels",
    		"stylers": [{
    				"visibility": "off"
    			}
    		]
    	}
    ]

    Does that help?

    Kind regards
    – Perry

    #55226
    seanBD
    Member

    Yes, thank you Perry. That seems to have removed the city names that were cluttering things up a bit but also still retained the design/look that we had set up.

    I will have to dig through that “Creating a theme” guide in the documentation as it seems a bit complicated at first but also looks like there’s some cool options.

    Thanks for your help!

    #55235
    Perry
    Moderator

    Hi Sean

    You could also try out our new theme editor, select the theme tab and it will appear above your map.

    Is there anything else we can help you with?

    Kind regards
    – Perry

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.