样式谷歌地图 - Javascript API v3 - 海岸线概述?

时间:2012-07-04 10:14:36

标签: google-maps google-maps-api-3

我正在尝试设计一个谷歌地图以匹配我给出的设计,并且在设计上围绕所有国家的外部进行设计,以及分界线上划线。

我想要的效果如下: enter image description here

我的样式代码目前如下:

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" }
          ]
        }
      ];

是否有可能知道我所追求的是什么?

谢谢!

编辑:以上样式给我以下

enter image description here

1 个答案:

答案 0 :(得分:2)

您目前只能定义水的填充而不是轮廓。

相关问题