User Tools

Site Tools


samples:samples:multiselect

Table of Contents

Multiselect sample

Documentation | Samples | Multiselect

Summary

Multiselect Sample — Demonstrates multiple feature selection with different selection modes and displaying selected feature attributes in a list and attributes panel.

Description

What the sample shows:

  • Selecting features via click or drag rectangle
  • Multi-feature selection with Ctrl+click for additive selection
  • Spatial selection (box, polygon, or radius)
  • Filtering selected features by attribute criteria
  • Viewing selected feature attributes in detail grid
  • Listing selected features in a listbox
  • Highlighting selected features with color
  • Clearing selection
  • Zoom to selected features
  • Counting and displaying selection statistics
  • Using TGIS_ControlAttributes for attribute viewing
  • Full extent zoom navigation
  • Support for Ctrl key modifiers for selection modes

This sample illustrates use of:

Name Description
TGIS_Viewer.ItemsAll layers.
TGIS_Viewer.ScreenToMapConverts point coordinates from screen coordinates to map coordinates.
TGIS_Viewer.LocateLocates the shape nearest to _ptg that is within _prec.
TGIS_Shape.MakeEditableMake the shape editable by materializing mutable shape data when necessary.
TGIS_Shape.IsSelectedShape is selected in the layer.
TGIS_LayerVector.FindFirstInitiates iteration by finding the first shape in the layer and prepares cursor state for subsequent FindNext calls.
TGIS_LayerVector.FindNextRetrieves the next shape from the active FindFirst query cursor and continues iteration over shapes matching the original criteria.
TGIS_LayerVector.DeselectAllClears the selection state of all shapes in the layer.

Code

This sample is available on the following platforms (click to view the source code on GitHub):

2026/08/30 05:53

Page Tools