Skip to content

Commit

Permalink
feat(AgmMap): know when map is ready
Browse files Browse the repository at this point in the history
You can now listen to the new mapReady output
to know when the map is initialized.

Closes #740
  • Loading branch information
sebholstein committed Apr 9, 2017
1 parent 1d7b6ce commit 6f5128d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/directives/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ export class AgmMap implements OnChanges, OnInit, OnDestroy {
mapTypeId: this.mapTypeId,
clickableIcons: this.clickableIcons,
gestureHandling: this.gestureHandling
}).then(() => {
this.mapReady.emit(this._mapsWrapper.getNativeMap());
});
})
.then(() => this._mapsWrapper.getNativeMap())
.then(map => this.mapReady.emit(map));

// register event listeners
this._handleMapCenterChange();
Expand Down

0 comments on commit 6f5128d

Please sign in to comment.