From 6bcd5d3183251e76fc139985e212d0dd0fb5cd7e Mon Sep 17 00:00:00 2001 From: coreyroth Date: Thu, 23 Feb 2017 17:55:19 -0600 Subject: [PATCH] Move marker code inside MAP_READY (#1108) 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. --- src/plugins/googlemap.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/googlemap.ts b/src/plugins/googlemap.ts index d76e8216..73ac7e11 100644 --- a/src/plugins/googlemap.ts +++ b/src/plugins/googlemap.ts @@ -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); @@ -98,7 +99,7 @@ export const GoogleMapsAnimation = { * marker.showInfoWindow(); * }); * } - * + * }); * } * ``` */