Can't get GoogleMap object
See original GitHub issueIssue description
Hi,
I am trying to create an OverlayView
in order to add customized markers, such as done in this example.
To do that I need to get the actual map instance. In the docs I see this should be possible with GoogleMapsAPIWrapper.getNativeMap()
.
However, when I try this, the Promise never returns.
Steps to reproduce and a minimal demo of the problem
See example here. Where the code:
this.mapsAPIWrapper.getNativeMap().then((map) => {
console.log(‘Got map!’)
console.log(map);
});
Never returns from getNativeMap()
call.
_Use https://plnkr.co or similar – try this template as a starting point: http://plnkr.co/edit/YX7W20?p=preview
What steps should we try in your demo to see the problem?
Current behavior Not returning from function call - Promise not resolved.
Expected/desired behavior Promise resolved - returning map instance.
angular2 & angular-google-maps version agm/core": “^1.0.0-beta.2” Angular 5.
Other information
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top GitHub Comments
in component ulll get map instance
Based on @agborkowski example:
HTML:
TS: