DK11 for Delphi | GisLayerVector.TGIS_LayerVector.Delete | Constructors | Fields | Methods | Properties | Events
Deletes a shape.
// Delphi public procedure Delete( const _uid : TGIS_Uid ); virtual;
// C++ Builder public: virtual void Delete( TGIS_Uid* const _uid );
Name | Type | Description |
---|---|---|
_uid | TGIS_Uid | Uid of a shape to be deleted |
Use this method to delete a shape indicated by Uid. Shape will be marked as deleted but the real deletion will be performed upon save.
Here is a simple procedure to delete a shape.
procedure MyClass.DeleteShape(); var ll : TGIS_LayerVector ; tmp : TGIS_Shape ; begin if GIS.Items.Count=0 then exit; // get first layer ll := TGIS_LayerVector (GIS.Items[0]) ; tmp := ll.FindFirst(GisWholeWorld,'NAME=ABC'); // if first found, delete it if assigned( tmp ) then ll.Delete(tmp.Uid); GIS.Update ; end;