【发布时间】:2019-07-02 09:49:26
【问题描述】:
我在我的项目中使用了这个plugin。
我想在地图上显示我的位置。在我阅读的文档中
**UI Settings**
myLocationButtonEnabled boolean - Whether the my-location button is enabled/disabled
如何在代码中应用这个?
我也尝试编写这段代码:
onMapReady(event) {
this.mapView = event.object;
var marker = new Marker();
marker.position = Position.positionFromLatLng(-33.86, 151.20);
marker.userData = { index: 1 };
this.mapView.addMarker(marker);
this.mapView.myLocationEnabled= true;
}
这个this.mapView.myLocationEnabled= true; 不起作用。
你能告诉我如何显示我的位置吗?
【问题讨论】:
标签: google-maps maps nativescript