mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
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.
This commit is contained in:
parent
407659a3ef
commit
6bcd5d3183
@ -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();
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* });
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user