nativescript-mapbox icon indicating copy to clipboard operation
nativescript-mapbox copied to clipboard

removeMarkers() not working neither on Android nor IOS

Open zhitomir-oreshenski-mm opened this issue 5 years ago • 3 comments

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); } } },

zhitomir-oreshenski-mm avatar Dec 30 '19 17:12 zhitomir-oreshenski-mm

Any updates on this? Its been a while.

trueandperfect avatar Feb 08 '20 17:02 trueandperfect

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

zhitomir-oreshenski-mm avatar Feb 09 '20 18:02 zhitomir-oreshenski-mm

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 .

trueandperfect avatar Feb 09 '20 20:02 trueandperfect