Skip to content

Commit

Permalink
docs(google-maps): improve docs (#1095)
Browse files Browse the repository at this point in the history
Move `map.moveCamera(position);` inside the MAP_READY event.
Allow to zoom the map on first launch (both iOS and Android).
  • Loading branch information
RemyPerroncel authored and ihadeed committed Mar 2, 2017
1 parent 2eea3df commit 06fa745
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/plugins/googlemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
*
Expand All @@ -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,
Expand Down

0 comments on commit 06fa745

Please sign in to comment.