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
Hey @smatthews1999 - It's not a bug. You request a new instance of GoogleMapsAPIWrapper in your component (because its ouside of the map component).
I created a Plunker - with this structure, you get the instance of the map: http://plnkr.co/edit/KuHe8aqLS2sXj4wcADmV?p=preview
Thank you sir!
Unfortunately when I add the same directive to my component the call to this._wrapper.getNativeMap() does not resolve, or reject. I get no errors or no response.
What I don't get is that when I step into this call it looks like this... which does not look like a promise to me.

I have checked my version and have angular2-google-maps@^0.15.0
Got it! I had put my
Thanks again!
@SebastianM I copied your exact directive but rollup complains:
bundle failed: 'GoogleMapsAPIWrapper' is not exported by node_modules/angular2-google-maps/core/index.js
I'm building this with Ionic 2 if that's a concern.
What can be the problem?
@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.
@SebastianM Do you have an ETA on the new release? is there a nightly version I can try?
Is there an old version where it works?
Sorry for the urgency. I want to have my code ready for when the issue is officially fixed.
Thanks!
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 ?
It does not work for me either. I was trying to get the reference to native map object but this promise does not resolve at all.
Most helpful comment
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 ?