User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_layervector.delete_tgis_uid

Table of Contents

TGIS_LayerVector.Delete method

DK11 for Delphi | GisLayerVector.TGIS_LayerVector.Delete | Constructors | Fields | Methods | Properties | Events

Delete a shape.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  procedure Delete(
    const _uid : TGIS_Uid
  ); virtual;
// C++ Builder
public:
  virtual void Delete(
    TGIS_Uid* const _uid
  );

Parameters

Name Type Description
_uid TGIS_Uid Uid of a shape to be deleted

Remarks

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.

Example

Delphi

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;
2019/08/13 10:50