mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
docs(google-maps): improve docs (#1095)
Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android).
This commit is contained in:
parent
2eea3df2c4
commit
06fa7452dd
@ -71,10 +71,6 @@ export const GoogleMapsAnimation = {
|
||||
*
|
||||
* let map = new GoogleMap(element);
|
||||
*
|
||||
* // listen to MAP_READY event
|
||||
* map.one(GoogleMapsEvent.MAP_READY).then(() => {
|
||||
console.log('Map is ready!');
|
||||
*
|
||||
* // create LatLng object
|
||||
* let ionic: GoogleMapsLatLng = new GoogleMapsLatLng(43.0741904,-89.3809802);
|
||||
*
|
||||
@ -85,9 +81,13 @@ export const GoogleMapsAnimation = {
|
||||
* tilt: 30
|
||||
* };
|
||||
*
|
||||
* // move the map's camera to position
|
||||
* map.moveCamera(position);
|
||||
* // listen to MAP_READY event
|
||||
* map.one(GoogleMapsEvent.MAP_READY).then(() => {
|
||||
* // move the map's camera to position
|
||||
* map.moveCamera(position); // works on iOS and Android
|
||||
* });
|
||||
*
|
||||
*
|
||||
* // create new marker
|
||||
* let markerOptions: GoogleMapsMarkerOptions = {
|
||||
* position: ionic,
|
||||
|
Loading…
Reference in New Issue
Block a user