Skip to content

Bug. Remove event listener dont work #176

Closed
@vinco83

Description

@vinco83

I'm wondering if it's possible to remove an event listener once one has been added

I added an event listener like so:

await _map.InteropObject.AddListener("click", async (e) => await MapClicked(e));

So that I can get the Lat/Lon when the map is clicked, but I need to be able to remove the listener so that clicking on the map will no longer do anything.

I tried calling the Dispose() method on the returned MapEventListener, but that didn't seem to work.

Is this simpler than I'm making it, or should this functionality be added to the library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions