rungwiroon / BlazorGoogleMaps

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

Feature Request: Add Custom Control Removal Functionality #295

Closed cruiserkernan closed 7 months ago

cruiserkernan commented 7 months ago

Description

This feature request proposes the addition of functionality to remove custom controls from the map in the BlazorGoogleMaps library. The implementation includes new methods: RemoveControl(ControlPosition controlPosition, ElementReference elementReference) and RemoveAllControls(ControlPosition controlPosition) in the Map.cs class. This feature allows for dynamic control management based on the control's position and element reference.

Suggested Changes

I have developed a solution that introduces the following changes:

  1. In Map.cs, two new methods are added for removing controls individually or all at once based on their position.
  2. Adjustments in objectManager.js to accommodate the removal of controls.
  3. Modifications in the corresponding Razor components to demonstrate the usage of these new methods.

Impact and Benefits

I plan to submit a pull request with these changes for review and integration into the main codebase.

Thank you for considering this feature request!

valentasm1 commented 7 months ago

https://www.nuget.org/packages/BlazorGoogleMaps/3.3.1 Thank you very much