rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
309 stars 99 forks source link

Multiple Ground Overlays #319

Closed ham187 closed 4 months ago

ham187 commented 4 months ago

Hello, and thank you again,

I have a need for multiple ground overlays, and when the user moves the map it needs to redraw them, the problem is I can't clear the original ground overlay, so its just laying them over the top, until you can't see under it.

I tried adding them to a dictionary and then clearing them, but it doesnt work.

foreach(var go in dictofGroundOverlays) {
await go.Value.SetMap(null); }

any suggestions?

valentasm1 commented 4 months ago

It should clear. Any console errors? If you do like in this demo does it get cleared? https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/MapGroundOverlayPage.razor.cs#L47

ham187 commented 4 months ago

nope no errors, I'm adding satellite imagery to a map, which loads as you scroll around the map, and zoom in and out, but as you zoom out some layers overlap, as it can't remove the existing ones before redrawing,

valentasm1 commented 4 months ago

I am not sure how i can help. Server side demo works. It should be smth else which dont work for you. Could you provide working demo page?