Google Maps API:这是什么功能类型?

时间:2016-07-26 10:22:14

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

在下图中,您可以看到我的样式版本和地图的默认版本。在上周的某个时候出现了米色的特征,似乎标志着某种类型的商业区域。

列出的所有功能类型in the API reference似乎都不会影响它。

Styled and unstyled version of a map highlighting the unknown feature

这些是我分配给我的地图版本的样式。

googleMapStyle = [
      {
        "featureType": "administrative",
        "stylers": [
          { "visibility": "off" }
        ]
      },{
        "featureType": "road",
        "stylers": [
          { "visibility": "simple" },
          { "color": "#393939" }
        ]
      },{
        "elementType": "labels",
        "stylers": [
          { "visibility": "off" }
        ]
      },{
        "featureType": "water",
        "stylers": [
          { "color": "#303030" }
        ]
      },{
        "featureType": "landscape",
        "stylers": [
          { "color": "#2a2a2a" }
        ]
      },{
        "featureType": "poi",
        "stylers": [
          { "color": "#393939" },
          { "visibility": "off" }
        ]
      },{
        "featureType": "transit",
        "elementType": "geometry",
        "stylers": [
          { "visibility": "off" }
        ]
      },{
        "featureType": "administrative",
        "elementType": "geometry.stroke",
        "stylers": [
          { "visibility": "on" },
          { "color": "#393939" }
        ]
      }
    ];

有谁知道这是什么功能类型以及如何摆脱它?

1 个答案:

答案 0 :(得分:0)

似乎没有未记录的要素类型。在您的情况下,我发现使用featureType building影响了那些,嗯,建筑物。

googleMapStyle = [
      {
        "featureType": "building",
        "stylers": [
          { "visibility": "off" }
        ]
      },{
      ...
      }
    ];