Я хочу увеличить свое текущее местоположение, а не маркер.У меня есть этот код:
onMapReady(event) {
this.mapView = event.object;
this.gMap = event.object.gMap;
var UiSettings = this.gMap.getUiSettings();
UiSettings.setMyLocationButtonEnabled(true);
this.gMap.setMyLocationEnabled(true);
this.itemsS = this.itemService.getItems();
for (let i = 0; i < this.itemsS.length; i++) {
console.log('this.itemsS.length',this.itemsS.length)
var marker = new Marker();
marker.position = Position.positionFromLatLng(this.itemsS[i].latitude, this.itemsS[i].longitude);
marker.title = this.itemsS[i].name;
marker.userData = { index: 1 };
this.mapView.addMarker(marker);
}
}
Я пытаюсь использовать this.gMap.zoom = 20;
, но ничего не происходит.
В HTML у меня есть этот код:
<MapView (mapReady)="onMapReady($event)"></MapView>