getNativeMap() and getBounds() Promise never gets resolved neither rejected
See original GitHub issueI’m trying to get native map instance to do fitBounds
but it’s Promise never gets resolved neither rejected.
I’ve already tried to do this in a component inside sebm-google-map
but it also didn’t work.
<sebm-google-map>
<map-content></map-content>
</sebm-google-map>
Plunker: http://plnkr.co/edit/VKqwVSUlzFJjHPX7cQm4?p=preview
v0.17.0
@angular/cli: 1.0.0-beta.32.3
node: 6.9.5
os: darwin x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/platform-server: error
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.8
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:22 (2 by maintainers)
Top Results From Across the Web
getNativeMap() and getBounds() Promise never gets resolved ...
I'm trying to get native map instance to do fitBounds but it's Promise never gets resolved neither rejected. I've already tried to do...
Read more >what happens when a Promise never resolves? - Stack Overflow
If you rewrite simple to not use async / await , the code that goes after the await statement will have to be...
Read more >Promise - JavaScript - MDN Web Docs
A promise is said to be settled if it is either fulfilled or rejected, but not pending. Flowchart showing how the Promise state...
Read more >Let's talk about how to talk about promises | JavaScript
If the other promise is rejected, your original promise will reject itself with the other promise's rejection reason; If the other promise never...
Read more >JavaScript Promise Tutorial – How to Resolve or Reject ...
The new Promise() constructor returns a promise object. ... A promise that is either resolved or rejected is called settled . states_2 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi all! You do not need a child directive to obtain your native map instance. You can get it subscribing for mapReady events on AgmMap object.
In case anyone still has problems, you don’t need even a
@ViewChild
, as themapReady
is an event on the map component, so in your template just do<agm-map (mapReady)="onMapReady($event)"...
and in your component define theonMapReady(map)
method.