rungwiroon / BlazorGoogleMaps

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

DrawingManager.SetDrawingMode no longer works in 3.3.2 and newer #320

Closed Mr-Technician closed 4 months ago

Mr-Technician commented 4 months ago

Calling await DrawingManager.SetDrawingMode(OverlayType.Polygon); in versions newer than 3.3.2 has no effect. I suspect this is due to the refactoring in the Helper.cs file that modified how enums are handled. In the meantime, I am using an older version of the library in my project.

I poked around for a while but wasn't able to pinpoint the specific issue. This commit may be the culprit: https://github.com/rungwiroon/BlazorGoogleMaps/commit/4af3864af22f4be0a8e7cab587b7a6ff12e081c6

But there was also this commit later, so I am not sure what to make of it: https://github.com/rungwiroon/BlazorGoogleMaps/commit/32ffc8947985afa272f195b2e0bc75fdb10ffea4

Edit: this issue can be replicated in the ServerSideDemo on the /drawing-manager page. Clicking "Change mode to line" does nothing.

valentasm1 commented 4 months ago

Sorry but i will take a look next week. Tuesday.

Mr-Technician commented 4 months ago

Did you have a chance to look at this?

valentasm1 commented 4 months ago

Fixed. Thank you for detailed information https://www.nuget.org/packages/BlazorGoogleMaps/4.1.1

Mr-Technician commented 4 months ago

Thank you!

Mr-Technician commented 4 months ago

@valentasm1 I am still having an issue with the Polygon overlay. My button that switches to Polygon mode doesn't work unless I first use my Polyline button. Similarly, the ChangeDrawingModeToLine on the drawing manager demo page works, but if I manually update the method as follows:

private async Task ChangeDrawingModeToLine()
{
    await _drawingManager.SetDrawingMode(OverlayType.Polygon);
}

And then run the project, the Change Mode to Line button no longer works.

valentasm1 commented 4 months ago

Fixed https://www.nuget.org/packages/BlazorGoogleMaps/4.1.2

Mr-Technician commented 4 months ago

Thank you very much!