【问题标题】:Why does GoogleMapsOptions not able to style?为什么 GoogleMapsOptions 无法设置样式?
【发布时间】:2019-03-19 19:42:55
【问题描述】:

我正在使用 Ionic 4,并且我已经实现了 Google Maps API。该地图工作正常,但是当我对其进行样式设置时,某些更新不会改变。在我的示例中,如果我更改了一些相机选项,它们确实会完全改变。但是,当我想添加样式或手势时,这些更改不会反映出来。

let mapOptions: GoogleMapOptions = {
  camera: {
    target: {
      lat: 43.0741904,
      lng: -89.3809802
    },
    zoom: 15,
    tilt: 30
  },
  styles: [
    {
      "featureType":"poi",
      "stylers":[
        {
          "visibility": "off"
        }
      ]
    }
  ],
  gestures:{
    rotate:true
  }
};

this.map = GoogleMaps.create('map_canvas', mapOptions);

【问题讨论】:

    标签: google-maps ionic-framework ionic3


    【解决方案1】:

    这需要在实际设备上运行。我认为浏览器不支持样式地图之类的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-03-25
      • 2020-06-11
      • 2013-06-20
      • 2020-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-17
      相关资源
      最近更新 更多