0
votes

Using GMLib on Delphi XE-7, I'm trying to move existing marker to new position, I have created only one marker on the map and tried using code below as a test to move it.

procedure TfrmMapClient.GMMap1Click(Sender: TObject; LatLng: TLatLng; X, Y:   Double);
begin

mcnt := gmmarker1.count;
gmmarker1.Items[0].Position:= LatLng;

end;

but getting Exception Access Violation. Any help much appreciated

1
try using Assign method - cadetill
how do I do that? can you give a sample. been trying todo this the whole day without success. - dawam

1 Answers

0
votes

Try with

gmmarker1.Items[0].Position.Assign(LatLng);

or assigning individual properties

gmmarker1.Items[0].Position.Lat := LatLng.Lat;
gmmarker1.Items[0].Position.Lng := LatLng.Lng;