Closed marco-manfroni closed 1 year ago
I will take a look this or next weekend.
First you did wrong. Jsfiddle shows that event drawingmode_changed do not return anything (couldnt find official reference since i am lazy). Even when i do correct then GetDrawingMode returns wrong results. Always default. I fixed enum parsing and now it return good. https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/DrawingManagerPage.razor.cs#L88 https://www.nuget.org/packages/BlazorGoogleMaps/2.5.4
Hi and thanks for this great porting of google maps to blazor. Can you add the support for detecting when the user changes between each drawing overlay type (marked, polygon, circle, etc..)? I tried with these codes, but the event is not called.
await googleMap.InteropObject.AddListener("drawingmode_changed", async (e) => await OnModeChangedClick(e));
await drawingManager.AddListener("drawingmode_changed", async (e) => await OnModeChangedClick(e));
This shows the desired behaviour logging the change to the console https://jsfiddle.net/geocodezip/7f41wx2h
Thanks Marco