Bart
(Bart)
2
Hi,
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?
Hi
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.
Bart
(Bart)
4
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);
begin
WebGMaps1.Markers.Add(WebGMaps1.MapOptions.DefaultLatitude, WebGMaps1.MapOptions.DefaultLongitude, '', '', True, True, True, True, True, 0);
end;
procedure TForm4.WebGMaps1MarkerDragEnd(Sender: TObject; MarkerTitle: string;
IdMarker: Integer; Latitude, Longitude: Double);
begin
ListBox1.Items.Add(IntToStr(IdMarker) + ': Lat=' + FloatToStr(Latitude) + ' Lon=' + FloatToStr(Longitude));
end;
Hello,
This was exactly what I was looking for.
The runtime error was due to a wrong private statement in the declaration.
Sincerely Peter