nativescript-mapbox
nativescript-mapbox copied to clipboard
removeMarkers() not working neither on Android nor IOS
Hello,
I have an issue by using .removeMarkers() function, it doesn't update the map by removing current markers. I've tried to print the result and as far I can see I am receiving undefined while waiting the promise to complete.
Is there any specific action that I am missing?
async updateMarker() { const { lat, lng, category } = this; const icon =
res://marker_${category}; if (this.map) { // it gets reference from another function this.map -> args.map try { await this.map.removeMarkers(); await this.map.addMarkers([{ lat, lng, icon }]); await this.map.setCenter({ lat, lng }); } catch (error) { console.log("Error while updating markers", error); } } },
Any updates on this? Its been a while.
Hi,
removeMarkers() method works as expected, the important part is when you are using more than one map. In such cases, I would recommend to check for different alternatives, we did not find a solution by using mapbox. What is your current issue with the map?
Best regards, Zhi
Thank you for your reply, it started working yesterday.
The only issue I have is now that geofire is installed the firebase pod will not install citing compatability issues. I will add a ticket.
On Sun, Feb 9, 2020, 1:51 PM Zhitomir Oreshenski [email protected] wrote:
Hi,
removeMarkers() method works as expected, the important part is when you are using more than one map. In such cases, I would recommend to check for different alternatives, we did not find a solution by using mapbox. What is your current issue with the map?
Best regards, Zhi
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EddyVerbruggen/nativescript-mapbox/issues/339?email_source=notifications&email_token=AK456RFJLIYKLSOUEPLCGQLRCBGEZA5CNFSM4KBOXBQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGUXHY#issuecomment-583879583, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK456RF4FDP2XKUN6TCTUZTRCBGEZANCNFSM4KBOXBQQ .