Probocop
Probocop

Reputation: 10552

Styling Google Maps - Javascript API v3 - Outline on coastlines?

I'm trying to style up a Google Map to match a design I've been given, and on the design there is a stroke around the outside of all the countries, as well as a stroke on dividing borders.

The effect I'm going for is as below: enter image description here

My code for the styling is currently as follows:

var styles =   [
        {
          featureType: "water",
          stylers: [
            { visibility: "on" },
            { color: "#ffffff" }
          ]
        },{
          featureType: "landscape",
          stylers: [
            { color: "#f7f7f5" }
          ]
        },{
          featureType: "road",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "poi",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "administrative.country",
          stylers: [
            { color: "#d2cdcd" },
            { weight: 1 }
          ]
        },{
          featureType: "administrative.country",
          elementType: "labels",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "administrative.province",
          elementType: "geometry",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "administrative.locality",
          elementType: "labels",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "administrative.province",
          elementType: "labels",
          stylers: [
            { visibility: "off" }
          ]
        },{
          featureType: "water",
          elementType: "geometry.stroke",
          stylers: [
            { color: "#4cfff5" }
          ]
        }
      ];

Any idea if what I am after is possible?

Thanks!

EDIT: The above styles give me the following

enter image description here

Upvotes: 10

Views: 3391

Answers (1)

aemkei
aemkei

Reputation: 11205

You currently can only define the fill for water but not the outline.

Upvotes: 2

Related Questions