I am able to use a google map natively on cordova’s plugin, but can’t make such actions as addMarker, MoveCamera… nothing will happen, no errors, Looked at documentation and it’s same as there.
Map is OK.
My code below, what’s wrong?
let location = new GoogleMapsLatLng(-3.730462,-38.5193229);
@fel486
I just try the ionic-native and ran into the same problem, and then I try to print the AnimateCameraOptions on screen. I found out there is a weird result, namely, according to the example of cordova-plugin-googlemaps, target property should be {lat: 23.1199, lng: 142.5683} rather than “_objectInstance”: {lat: 23.1199, lng: 142.5683}
In the other words, I use a solution like:
let latlng: GoogleMapsLatLng = new GoogleMapsLatLng(23.1199, 142.5683);
let location = latlng['_objectInstance'];
let AnimateCameraOptions: AnimateCameraOptions = {
target: location, zoom: 18, tilt: 30, bearing: 140, duration: 5000
};
alert(JSON.stringify(AnimateCameraOptions));
this.map.animateCamera(AnimateCameraOptions);.