Skip to content

Commit

Permalink
Move marker code inside MAP_READY (#1108)
Browse files Browse the repository at this point in the history
The code to set the camera position and marker should be moved inside the function handling MAP_READY.  Otherwise they execute before the event is fired and it doesn't work.
  • Loading branch information
coreyroth authored and ihadeed committed Feb 23, 2017
1 parent 407659a commit 6bcd5d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/googlemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export const GoogleMapsAnimation = {
* let map = new GoogleMap(element);
*
* // listen to MAP_READY event
* map.one(GoogleMapsEvent.MAP_READY).then(() => console.log('Map is ready!'));
* 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 @@ -98,7 +99,7 @@ export const GoogleMapsAnimation = {
* marker.showInfoWindow();
* });
* }
*
* });
* }
* ```
*/
Expand Down

0 comments on commit 6bcd5d3

Please sign in to comment.