Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

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 не существует.

Pascal

function UpdateFigure(FigureID: Cardinal; const figure: TMapFigure): Boolean;

Python

def UpdateFigure(FigureID: int, Figure: MapFigure) -> bool: ...

Pascal Example

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.

Python Example

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')

See Also

AddFigure, RemoveFigure, ClearFigures