question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GoogleMapsAPIWrapper does not return from getNativeMap()

See original GitHub issue

The API call to promise GoogleMapsAPIWrapper.getNativeMap() does not seem to resolve or reject the promise.

constructor(private _wrapper: GoogleMapsAPIWrapper) {
    console.log('construtor');
    this._wrapper.getNativeMap().then((m) => {
      console.log('native map',m);
    }, err=>{
      console.log('error',err);
    })
  }

Here is a plunker http://plnkr.co/edit/HCosbY?p=preview

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
RathodGirishcommented, Feb 1, 2017

Hi @smatthews1999 ,

I am still getting problem while calling

ngAfterViewInit() {
     this._wrapper.getNativeMap().then((m) => {
       console.log('native map',m);
       this._map = m;
     }, err=>{
       console.log('error',err);
     })
}

I am not getting nativemap object. This doesn’t called anymore. My angular version is : “angular2-google-maps”: “^0.17.0” Please any suggestion ?

1reaction
sebholsteincommented, Oct 22, 2016

@jonathan-chin Details for your error here: https://github.com/SebastianM/angular2-google-maps/pull/709#issuecomment-255429022 - It’s fixed when we release a new version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GoogleMapsAPIWrapper does not return from ...
The API call to promise GoogleMapsAPIWrapper.getNativeMap() does not seem to resolve or reject the promise. constructor(private _wrapper: ...
Read more >
angular - Angular2 Cannot find namespace 'google'
PS: If you are using agm-s GoogleMapsAPIWrapper.getNativeMap() you must convert the map object before you use it. For example turning on the ...
Read more >
GoogleMapsAPIWrapper
getNativeMap(). Defined in packages/core/src/lib/services/google-maps-api-wrapper.ts:229. Returns the native Google Maps Map instance.
Read more >
SebastianM/angular2-google-maps
What I did to solve my problem. when I get native map inside another component, ... The injected instance of GoogleMapsAPIWrapper did not...
Read more >
Angular2 Google Maps style marker – iTecNote
When I do it the same way as with the styledMap, I can only get access to the nativeMap with getNativeMap() . But...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found