Yermo / nativescript-mapbox

:statue_of_liberty: :tokyo_tower: :mount_fuji: Native OpenGL powered Maps, by Mapbox
MIT License
194 stars 94 forks source link

Multiple Map Instances (sorta) breaks original instance #301

Open keerl opened 5 years ago

keerl commented 5 years ago

My app has a main page with a map on it, but on another part of the app there is a modal popup that contains a map for another feature. The issue is, once I open the second instance of the map in the modal it locks out my control for the markers in the original instance. I cannot remove the old markers that are still there, but I can add new ones.

Here is a video of a demo that contains the issue that will probably explain the problem better. https://www.youtube.com/watch?v=TEui_hqUp0Q. (Ignore how the markers turn black, that just happens in the simulator for some reason)

Here is the code for the demo app in the video: https://github.com/keerl/multiple-mapbox-bug

FYI, I am using version 4.3.1, because the newer version has been problematic for me in the past.

Any workarounds for this? Thanks.

C00kieMonsta commented 5 years ago

Hello @keerl , I am having the same issue... did you manage to find a workaround? @EddyVerbruggen have you been aware of this issue?

Thanks!

keerl commented 5 years ago

My current workaround is removing all the markers right before the new map instance opens, and then re-add them when that new instance is closed/destroyed.

C00kieMonsta commented 5 years ago

Hmmm... this would not work in my case, since I am using different instances in a tabview.