cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

map locking error

Open manuvalentim opened this issue 9 years ago • 10 comments

My map is experiencing a problem when exiting and re-entering the screen. Instead of maps and instead of uploads.

This happens every time I exit and return to the screen 23335916_1599924516695870_2124722160_o

manuvalentim avatar Nov 06 '17 16:11 manuvalentim

What is this?

wf9a5m75 avatar Nov 06 '17 17:11 wf9a5m75

Please share your project files on github if you want to check your project by me. Otherwise, I can not help anything.

wf9a5m75 avatar Nov 06 '17 17:11 wf9a5m75

https://gist.github.com/manuvalentim/fb0f0ccdecb980e6f8641d8b47bf0f18

manuvalentim avatar Nov 06 '17 17:11 manuvalentim

This is my maps with bug on screen

manuvalentim avatar Nov 06 '17 17:11 manuvalentim

Thank you.

First of all, you should not use ionViewWillEnter. Because the view page is not ready. this.mapElement = document.getElementById('map'); might return null. (It is depends on how faster the getcurrentPosition() returns the data). I recommend you use ionViewLoaded()

Unfortunately, I can not build your code, because there are missing files. If you share your project files (including other files), I can build, then I can test it for you. (You can create free private repository at BitBucket or Gitlab)

By the way, I recommend you specify the ID of map div, instead of DOM element.

this.map = this.googleMaps.create('map', mapOptions);

Because the wrapper plugin waits the proper timing until the div element is ready. (You need to use @ionic-native/[email protected])

wf9a5m75 avatar Nov 06 '17 17:11 wf9a5m75

The important thing is to reproduce your issue on my side. I'm not interested in your application itself. So I don't leak your code.

wf9a5m75 avatar Nov 06 '17 17:11 wf9a5m75

Okay, this trouble happens on me on another project also. I guess the out-of-memory

wf9a5m75 avatar Nov 08 '17 00:11 wf9a5m75

This error occurs only you create more than 2 maps. Until you share your project files, no more update.

wf9a5m75 avatar Nov 09 '17 07:11 wf9a5m75

ping

wf9a5m75 avatar Nov 10 '17 05:11 wf9a5m75

Since there is no update for a while, I close this thread. But you can reply anytime

wf9a5m75 avatar Nov 14 '17 22:11 wf9a5m75