Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Xamarin.Forms.Maps.Map.MapElements.Clear() seems effectless #9096

Closed
vsfeedback opened this issue Jan 6, 2020 · 5 comments
Closed

Xamarin.Forms.Maps.Map.MapElements.Clear() seems effectless #9096

vsfeedback opened this issue Jan 6, 2020 · 5 comments
Labels
a/maps 🌐 e/3 🕒 3 feedback-ticket Issue originates from https://developercommunity.visualstudio.com p/Android t/bug 🐛

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


Xamarin.Forms 4.4.0.991265
Xamarin.Forms.Maps 4.4.0.991265
VS 16.4.1 and 16.5 Preview 1

Android project (Api 28):
In my first attempt for a Xamarin App with Maps I insert polygons into the MapElements collection on VisibleRegion changes. Before inserting new polygons I clear the MapElements collection but in the display the (old) polygons remain and are overlayed with the newly added ones. So I get memory problems after a short time.
Looks like clearing the MapElements collection (the Count changes to 0) does not remove the corresponding elemnts from the google map.


Original Comments

Visual Studio Feedback System on 12/13/2019, 02:30 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@pauldipietro pauldipietro added this to New in Triage Jan 6, 2020
@samhouts samhouts added t/bug 🐛 feedback-ticket Issue originates from https://developercommunity.visualstudio.com s/unverified New report that has yet to be verified a/maps 🌐 p/Android labels Jan 6, 2020
@hartez hartez removed the s/unverified New report that has yet to be verified label Jan 7, 2020
@hartez hartez added this to To do in Android Ready For Work via automation Jan 7, 2020
@hartez hartez removed this from New in Triage Jan 7, 2020
@hartez hartez added the e/3 🕒 3 label Jan 7, 2020
@jcmanke
Copy link
Contributor

jcmanke commented Feb 11, 2020

This was fixed in #7401.

@owe-eorg
Copy link

This issue has not yet been fixed and I honestly don't know why. They still update xamarin.forms.maps but don't care for such an essential flaw. Am I missing out on something?

@jfversluis
Copy link
Member

@owe-eorg what isn't fixed according to you? As @jcmanke pointed out this might be fixed by the mentioned PR. Did you verify that this still doesn't work? And for what version?

@owe-eorg
Copy link

owe-eorg commented Apr 29, 2020

@jfversluis I'm using a vs xamarin.forms project with the current xamarin.forms.maps nuget packet (4.5.0.657).
MAP_myMap.MapElements.Clear(); does not remove the Mapelements from the GUI. Only after reinitializing/ restarting the App, the MapElements are cleared from the GUI. It's mostlikely the very same issue.

Edit: The PR seems to not have passed a few checks, so that might also be why it's still broken (Card link: https://github.com/xamarin/Xamarin.Forms/projects/55#card-32347330)

@jfversluis
Copy link
Member

jfversluis commented Apr 29, 2020

I have just verified that this works in the current 4.6-pre4 package. 4.6 stable should be out in a few hours from now so keep your eye out for that.

You can try my (working) reproduction with the 4.6-pre4 package here:
Repro9096.zip

Closing this one for now. If you find it not working in 4.6 please let me know

Android Ready For Work automation moved this from To do to Done Apr 29, 2020
@samhouts samhouts removed this from Done in Android Ready For Work May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/maps 🌐 e/3 🕒 3 feedback-ticket Issue originates from https://developercommunity.visualstudio.com p/Android t/bug 🐛
Projects
None yet
Development

No branches or pull requests

6 participants