Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

removing or coloring equator and international date-line in google maps api

Tags:

google-maps

I'm unable to find any information as to how to remove or change the colors of the equator and international date-line in Google Maps JS API v3. I've been searching the documentation and web for any mention of what controls them.

like image 416
helion3 Avatar asked May 20 '11 18:05

helion3


People also ask

How do I hide markers on Google Maps API?

Once you are able to detect the marker click event you need to "hide" or remove the marker from the map. The standard way for doing this with google maps is to do this: this. setMap(null);

How do I customize Google Maps API?

Use Cloud-based Maps Styling To get started with Cloud-based maps styling, copy the JSON style above, then go to the Google Cloud console. To create a new map style, paste the JSON into the 'Import JSON' option. Cloud-based maps styling is available for the Maps JavaScript API at no extra charge.

Can you style Google Maps API?

Google Maps Platform offers Cloud-based maps styling features that make it easy to style, customize, and manage your maps using the Google Cloud Console, letting you create a customized map experience for your users without having to update your apps' code each time you make a style change.


1 Answers

A few years late for this answer, but I was trying to figure this out and worked out how to properly remove the equator and dateline. It seems that for the administrative layer country borders are considered strokes but the equator and dateline are fills, so you can set your style to this to get rid of those lines:

{
    "featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [{ "visibility": "off" }]
}
like image 125
Luke Hansford Avatar answered Sep 28 '22 06:09

Luke Hansford