Documentation | Samples | SelectByShape
SelectByShape sample - demonstrates how to select vector features by drawing an arbitrary shape (circle or rectangle) interactively on the map.
What the sample shows:
This sample illustrates use of:
| Name | Description |
|---|---|
| TGIS_LayerVector.DeselectAll | Clears the selection state of all shapes in the layer. |
| TGIS_LayerVector.RevertShapes | Reverts all shapes in the layer to their last saved state and discards all pending shape-level edits. |
| TGIS_LayerVector.CreateShape | Creates a new editable shape instance from the specified TGIS_Shape descendant class. |
| TGIS_LayerVector.FindFirst | Initiates iteration by finding the first shape in the layer and prepares cursor state for subsequent FindNext calls. |
| TGIS_LayerVector.FindNext | Retrieves the next shape from the active FindFirst query cursor and continues iteration over shapes matching the original criteria. |
| TGIS_Shape.AddPart | Starts a new part in a multipart shape geometry. |
| TGIS_Shape.AddPoint | Adds a 2D vertex to the current part of the shape. |
| TGIS_Topology.MakeBuffer | Computes a buffer polygon around a shape at the specified distance using 9 vertices to approximate quarter-circle arcs. |
| TGIS_ViewerWnd.PaintExtraEvent | PaintExtra event. |
This sample is available on the following platforms (click to view the source code on GitHub):