So this app works like this: the user enters a journey from point C (collection) to point E (delivery).
These points are shown on the map, in the form of markers, as in the figure below.
Now I need to remove markers by clicking on X.
The general concept is like this: I will make a list containing (String ID, Marker markerDe, Marker markerTo) and each new marker adds a line to this list in the addMarker () method.
Dai, the removeMarker (String ID) method will retrieve ID-related markers and remove them from the map when the user excludes the journey.
My research indicated several possible approaches. It could create a class, a list, a hashmap, etc.
I would like the opinions on the best way to do this and if possible, code examples.
Note that adding the bookmarks already works and removing the record as well. And just at this point I'm going to call the removeMarker () method.
I think the question can be summarized in: What is the best way to create a list with types String, Marker, Marker?