Move Marker with Drag


I have several markers with coordinates from place names. In some cases the markers are put one above the other if they are very near. 
What I want to do, is the following. Drag some markers so they are all visible and then save the map with new changed coordinates.

How can this be achieved?

When I try to use the property WebGMaps1MarkerDragEnd, I get an ERead error with invalid property on starting the program.

I use Tokyo and TMS VCL WebGMaps v3.1.5.0

Sincerely Peter


I have not been able to reproduce an issue with the OnMarkerDragEnd event.
Can you please provide a code sample that demonstrates the issue so I can further investigate this?
Would it be possible to give me a small example how to do it right?

Maybe in my first example I did  it wrong?

It is not so easy to separate my big code from this sample and to reduce it to OnMarkerDragEnd event.

Create a new project and drop a TWebGMaps and a TListBox on the form.

Assign the OnDownloadFinish and OnMarkerDragEnd events with the following code:

procedure TForm4.WebGMaps1DownloadFinish(Sender: TObject);
  WebGMaps1.Markers.Add(WebGMaps1.MapOptions.DefaultLatitude, WebGMaps1.MapOptions.DefaultLongitude, '', '', True, True, True, True, True, 0);

procedure TForm4.WebGMaps1MarkerDragEnd(Sender: TObject; MarkerTitle: string;
  IdMarker: Integer; Latitude, Longitude: Double);
  ListBox1.Items.Add(IntToStr(IdMarker) + ': Lat=' + FloatToStr(Latitude) + ' Lon=' + FloatToStr(Longitude));


This was exactly what I was looking for. 

The runtime error was due to a wrong private statement in the declaration.

Sincerely Peter