Search code examples
google-mapsgoogle-maps-api-3google-maps-markers

Is it possible to style country borders and coast lines on Google Maps API?


I prepared a jfiddle with only country borders in order to help you and all styles resetted:

var styles = [
  {
    "stylers": [
      { "visibility": "off" }
    ]
  }
];

http://jsfiddle.net/zsuan1c3/

I'd like to change colour of both country borders and coast lines! Thanks!


Solution

  • Edit – august 2021

    Google Maps API V3 currently accepts administrative.country directive for styling country borders.

      {
        "featureType": "administrative.country",
        "elementType": "geometry.stroke",
        "stylers": [
          {
            "color": "#ff0000"
          }
        ]
      }
    

    Directive for coastlines is unfortunately not supported.


    Original answer

    There is an issue with the API:

    Issue 7165: Bug: Cannot hide country borders anymore (since 9/24/14)

    administrative.country.geometry elements seem to accept no styling at all.

    related question: Google Maps: Hide country borders