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:
PERRONCEL 2017-03-02 02:55:42 +01:00 committed by Ibby Hadeed
parent 2eea3df2c4
commit 06fa7452dd

View File

@ -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,