Hello
I am trying to create a MapTool that allows the user to find a location based on a string road reference.
The user can enter the road reference in a textblock in an Embeddable Control, and hit enter or click a search button, and the maptool will then send a request to an API that returns the coordinates of the road reference.

The coordinates is then used to make a mappoint that is added to the map as a graphic. And I also want these graphics to be disposed when the maptool is closed.
I have bound a ICommand in the EmbeddableControls viewmodel, to the textblock and search button which in turn run a method in Module1 which handles the search-request to the road-reference API.
I can add the graphic to the MapView via MapView.Active.AddOverlay, however this creates a problem as the graphic will not be disposed automatically when the tool is deactivated.
Preferably I would rather use the active maptools AddOverlay method to add the graphics there, but I can’t figure out how to get access to the tools AddOverlay-method in Module1 or the viewmodel. I have tried to store the maptool-instance in both Module1 and the viewmodel for the embeddable control, but this has not worked.
Is there some other way to get access to the active maptool in a module or the viewmodel? I am in no way experienced with C#, so my attempts on solving this is more akin to throwing spaghetti at the wall and seeing what sticks.
Any help on this is much appreciated as I am thoroughly stuck in a rut.
Kind regards
Tor