User Tools

Site Tools


samples:samples:viewerlite

Table of Contents

ViewerLite sample

Documentation | Samples | ViewerLite

Summary

ViewerLite Sample - Minimal lightweight map viewer application for displaying GIS data, available for mobile platforms (FMX, WPF, MAUI).

Description

What the sample shows:

  • Creating a minimal/lightweight map viewer application
  • Opening project files with TGIS_Viewer.Open()
  • Displaying layers from a project
  • Closing projects with TGIS_Viewer.Close()
  • Full extent zoom using TGIS_Viewer.FullExtent()
  • Detecting empty viewers with TGIS_Viewer.IsEmpty
  • Accessing all layers via TGIS_Viewer.Items
  • Working with coordinate systems (TGIS_Viewer.CS)
  • Locating shapes on map (TGIS_Viewer.Locate)
  • Converting screen coordinates to map coordinates
  • High-resolution display support (HiRes)
  • Feature selection and deselection
  • Simplified viewer UI suitable for mobile (FMX) platforms

See also Viewer sample.

This sample illustrates use of:

Name Description
TGIS_Viewer.OpenOpen a project.
TGIS_Viewer.CloseClose the current project.
TGIS_ViewerWnd.ModeDetermines how the viewer reacts to mouse input.
TGIS_Viewer.FullExtentCalculate the screen origin, zoom, and viewport to place the whole map in the window.
TGIS_Viewer.IsEmptyTrue if the viewer is empty and contains no layers.
TGIS_Viewer.ItemsAll layers.
TGIS_Viewer.CSCoordinate system assigned to the viewer.
TGIS_Viewer.LocateLocates the shape nearest to _ptg that is within _prec.
TGIS_Viewer.ScreenToMapConverts point coordinates from screen coordinates to map coordinates.
TGIS_ViewerWnd.HiResEnables high-resolution rendering.
TGIS_LayerVector.DeselectAllClears the selection state of all shapes in the layer.
TGIS_Shape.IsSelectedShape is selected 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