mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +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);
|
* let map = new GoogleMap(element);
|
||||||
*
|
*
|
||||||
* // listen to MAP_READY event
|
|
||||||
* map.one(GoogleMapsEvent.MAP_READY).then(() => {
|
|
||||||
console.log('Map is ready!');
|
|
||||||
*
|
|
||||||
* // create LatLng object
|
* // create LatLng object
|
||||||
* let ionic: GoogleMapsLatLng = new GoogleMapsLatLng(43.0741904,-89.3809802);
|
* let ionic: GoogleMapsLatLng = new GoogleMapsLatLng(43.0741904,-89.3809802);
|
||||||
*
|
*
|
||||||
@ -85,9 +81,13 @@ export const GoogleMapsAnimation = {
|
|||||||
* tilt: 30
|
* tilt: 30
|
||||||
* };
|
* };
|
||||||
*
|
*
|
||||||
* // move the map's camera to position
|
* // listen to MAP_READY event
|
||||||
* map.moveCamera(position);
|
* map.one(GoogleMapsEvent.MAP_READY).then(() => {
|
||||||
|
* // move the map's camera to position
|
||||||
|
* map.moveCamera(position); // works on iOS and Android
|
||||||
|
* });
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* // create new marker
|
* // create new marker
|
||||||
* let markerOptions: GoogleMapsMarkerOptions = {
|
* let markerOptions: GoogleMapsMarkerOptions = {
|
||||||
* position: ionic,
|
* position: ionic,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user