I have created a heatmap and I would like to update the point coordinates and point weights. Is it a way to do that without re-creating the heatmap?
Thanks!
Yes, after updating the heatmap set Recreate
to True
and use BeginUpdate
and Endupdate
calls on the map.
procedure TForm1.Button1Click(Sender: TObject);
var
hm: TTMSFNCMapsHeatMap;
I: Integer;
begin
hm := TMSFNCGoogleMaps1.HeatMaps[0];
TMSFNCGoogleMaps1.BeginUpdate;
for I := 0 to hm.WeightedCoordinates.Count - 1 do
begin
hm.WeightedCoordinates[I].Coordinate.Latitude := hm.WeightedCoordinates[I].Coordinate.Latitude + 1;
hm.WeightedCoordinates[I].Coordinate.Longitude := hm.WeightedCoordinates[I].Coordinate.Longitude - 1;
end;
hm.Recreate := True;
TMSFNCGoogleMaps1.EndUpdate;
end;
That works! Thanks!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.