UpdateFigure
Updates the properties of an existing figure (geometric overlay) on the map.
FigureID — the identifier returned by AddFigure when the figure was created.
figure — a TMapFigure record with the new properties.
Returns True if the figure was found and updated, False if no figure with the given ID exists.
Обновляет свойства существующей фигуры (геометрического наложения) на карте.
FigureID — идентификатор, возвращённый AddFigure при создании фигуры.
figure — запись TMapFigure с новыми свойствами.
Возвращает True, если фигура найдена и обновлена, False — если фигуры с указанным ID не существует.
function UpdateFigure(FigureID: Cardinal; const figure: TMapFigure): Boolean;
def UpdateFigure(FigureID: int, Figure: MapFigure) -> bool: ...
var
FigID: Cardinal;
Fig: TMapFigure;
begin
Fig.kind := fkRectangle;
FigID := AddFigure(Fig);
// Update the figure
Fig.kind := fkEllipse;
if UpdateFigure(FigID, Fig) then
AddToSystemJournal('Figure updated')
else
AddToSystemJournal('Figure not found');
end.
fig = MapFigure()
fig.kind = FigureKind.fkRectangle
fig_id = AddFigure(fig)
fig.kind = FigureKind.fkEllipse
if UpdateFigure(fig_id, fig):
AddToSystemJournal('Figure updated')
else:
AddToSystemJournal('Figure not found')