-
Notifications
You must be signed in to change notification settings - Fork 918
Map.animateCamera()
Change the camera position with animation.
###Description The map view is modeled as a camera looking down on a flat plane. The position of the camera (and hence the rendering of the map) is specified by CameraPosition
When you change the camera, you have the option of animating the resulting camera movement. The animation interpolates between the current camera attributes and the new camera attributes. Default animation time of animateCamera() method is 5 seconds.
###Code
var GOOGLE = new plugin.google.maps.LatLng(37.422858, -122.085065);
map.animateCamera({
'target': GOOGLE,
'tilt': 60,
'zoom': 18,
'bearing': 140,
'duration': 5000 // = 5 sec.
}, function() {
console.log("The animation is done");
});
If you get an error, feel free to ask me on the official community or the issue list.
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md
New versions will be announced through the official community. Stay tune!
Feel free to ask me on the issues tracker.
Or on the official community is also welcome!
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md