As a workaround for Android, one can set those settings in the onMapReady-event, but for the location (lat/long) and the zoom it is necessary to set these values within a setTimeout-call
export function onMapReady(args: EventData) {
mapView = args.object;
if(platformModule.isAndroid) {
//not necessary for iOS, as these values can be set in XML there
mapView.mapAnimationsEnabled = false;
mapView.minZoom = 16;
mapView.maxZoom = 19;
setTimeout(function () {
mapView.latitude = 51.04969202571914;
mapView.longitude = 13.738007694482803;
mapView.zoom = 18;
}, 100);
}
}
Would be nice if the plugin would behave more the same way on Android and iOS.
When defining those map-settings within XML, the App shows just the default map pointing to Africa (latitude 0, longitude zero, zoom 3).
My environment:
On iOS, this works as expected.
As a workaround for Android, one can set those settings in the onMapReady-event, but for the location (lat/long) and the zoom it is necessary to set these values within a setTimeout-call
Would be nice if the plugin would behave more the same way on Android and iOS.