Marker Delete Issue

Calling Markers.Delete(X) causes 2 markers to be deleted instead of 1 unless the marker being deleted has the highest index



Using 1.8.0.0 of WebGMaps



Drop a TWebGMaps component on the form.



Add a button with code



procedure TForm1.Button1Click(Sender: TObject);

var

Marker: TMarker;

I: Integer;

begin

for I := 1 to 5 do

    begin

      Marker := WebGMaps1.Markers.Add;

      Marker.Latitude := 60+I;

      Marker.Longitude := -60+I;

      WebGMaps1.CreateMapMarker(Marker);

    end;

WebGMaps1.MapPanTo(65, -55);

WebGMaps1.MapOptions.ZoomMap := 5;

end;



Drop another button with code

procedure TForm1.Button2Click(Sender: TObject);

begin

WebGMaps1.Markers.Delete(2);

end;



Launch the map at formshow



procedure TForm1.FormShow(Sender: TObject);

begin

WebGMaps1.Launch;

end;



Run it and use Button 1 to generate the 5 markers

Use Button 2 to delete marker with index 2 (or anything less than 4 since there are 5 markers) and you will see 2 markers disappear instead of 1.



Hi, 


This issue has been fixed.
The update will be available with the next release of the TMS WebGMaps.

Thanks!