Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps: Hide country borders

I'm pretty sure geometry.stroke option allowed to hide country borders on the map.

     {
        featureType: "administrative.country",
        elementType: "geometry.stroke",
        stylers: [
            { visibility: "off" }
        ]
      }

But today I was wondering that's not working as expected, I still see the borders. Here is a code example: http://jsfiddle.net/xuvffdsn/

Any suggestions how to hide country borders?

like image 584
Vladimir Dorokhov Avatar asked Sep 23 '14 08:09

Vladimir Dorokhov


People also ask

Can Google Maps show country borders?

Google Maps has added a feature where it will highlight in a pink color the borders of a city, postal code or other borders based on your search. To see it yourself, go to Google Maps and search for a city name or even a zip code. You will see a pinkish highlight around the border.

How do I highlight country borders on Google Maps?

To achieve this, you will basically need to look for the coordinates of the state or country on GADM. Once you have them, draw a shape on the Google Maps with the Polygon object providing an array with all the coordinates that play basically as borders of the place that you want to highlight.

How do I hide the side panel in Google Maps?

This feature is the only feature Google decided to announce. They announced it in the Google Maps Help forum saying: We've heard your feedback that that you'd like to be able to see the entire map by hiding the search box and side panel. To hide the panel, go to the right of the panel and click the arrow.


1 Answers

The fiddle you provided seems to work correctly for me (in that it hides the borders). I am able to turn country borders on and off. Here is your example updated so that the country borders are shown: http://jsfiddle.net/jkgudhze/. For me, this definitely adds the borders that were missing. I was able to show them by changing { stylers: [ { visibility: "off" } ] } in your code to { stylers: [ { visibility: "off" } ] }. Is there any chance that what you are seeing are state / region borders?

like image 93
Garcia Hurtado Avatar answered Oct 11 '22 09:10

Garcia Hurtado