OSMaps - general question for delete Markers

Hi,

In my Project i have to place and delete markers on the Map.
So I came over 2 Functions.
Function 1 TwebOSMaps.DeleteMapMarker
Function 2 TwebOSMaps.Tmarkers.delete

Which Function is the wright one?
The Function 1 seeams to only Delete the Marker from map but not from the MarkersCollection.
The Function 2 Deletes the Marker, but kills ID and Indexes

For Example, I place the first Marker on the Map It gets the ID 0 and Index 0.
Now I Delete the Marker with ...Markers.delete(0)
The Next Marker I Place on the Map gets the Index 0 and ID 1
Why is that and how can I do it the right Way?

Best Regards
PJM

Please note the following:


- DeleteMapMarker will only remove the marker from the map, but not from the Markers collection.
- Markers.Delete will only remove the marker from the collection, but not from the map.

To fully remove a marker both calls should be executed.