You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding a geofencing feature to one of my apps, but I can't seem to clear some of the map polygons if the user chooses to clear/redraw. This issue seems to only effect android.
Steps to Reproduce
Pull bug repo:
Add your Android map API key in AndroidManifest.html (see )
Run the app.
Click "Start Drawing" and create a shape by tapping points for the polygon.
Click "Stop Drawing". A blue boundary, and red "buffer" boundary should be filled in.
Click "Clear Drawing"
Repeat Steps 4-6 a few times.
Expected result: Map should be clear of any polygons.
Actual Result: After the first or second clearing, polygons begin to persist forever.
Note: this is stripped-down control from one of my apps. In my app, the map doesn't even clear on the first try.
Version with bug
9.0.80
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No work-a-round found, even tried making current polygons transparent before clearing them. Also tried removing elements one-at-a-time instead of clearing. And originally, I didn't create new MapElements, I would just clear their geolocation data and re-use them but that was even more disastrous.
Update: I have employed the following work-a-round: I have copied the handler and overridden the "ClearMapElements" function. In there, I set the Visibility to "False" before clearing it from the map liek so:
Description
I'm adding a geofencing feature to one of my apps, but I can't seem to clear some of the map polygons if the user chooses to clear/redraw. This issue seems to only effect android.
Steps to Reproduce
Expected result: Map should be clear of any polygons.
Actual Result: After the first or second clearing, polygons begin to persist forever.
Video Reproduction:
screen-20250620-105038.mp4
Link to public reproduction project repository
https://github.com/asi-evin/com.maui.map.bug.git
Note: this is stripped-down control from one of my apps. In my app, the map doesn't even clear on the first try.
Version with bug
9.0.80
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No work-a-round found, even tried making current polygons transparent before clearing them. Also tried removing elements one-at-a-time instead of clearing. And originally, I didn't create new MapElements, I would just clear their geolocation data and re-use them but that was even more disastrous.
Update: I have employed the following work-a-round: I have copied the handler and overridden the "ClearMapElements" function. In there, I set the Visibility to "False" before clearing it from the map liek so:
Obviously this isn't ideal, but it "visually" gets accomplishes what I need for now... don't know the memory implications of this would be though.