User Tools

Site Tools


samples:samples:viewer

Table of Contents

Viewer sample

Documentation | Samples | Viewer

Summary

How to create a quite complete map viewer with a legend, scale, north arrow (compass rose) and printing capabilities.

Description

See also ViewerLite sample.

This sample illustrates use of:

Name Description
TGIS_Viewer.OpenOpen project.
TGIS_Viewer.CloseClose a project.
TGIS_Viewer.ItemsAll layers.
TGIS_Viewer.UseRTreeTrue if RTree will be used by default upon creation of any layer.
TGIS_Viewer.CSCoordinate System assigned to the viewer.
TGIS_Viewer.InvalidateWholeMapInvalidate whole map.
TGIS_Viewer.ExtentMap extent.
TGIS_Viewer.InPaintTrue if Viewer is busy in Paint procedure.
TGIS_Viewer.IsEmptyTrue if Viewer is empty (no layers).
TGIS_Viewer.LocateLocate a shape that is near _ptg, but is closer than _prec distance.
TGIS_Viewer.ScreenToMapConverts point coordinates from screen related to map related.
TGIS_Viewer.FullExtentCalculate the screen origin, zoom, and viewport to place the whole map in the window.
TGIS_Viewer.GetRetrieve the layer identified by a name.
TGIS_ViewerWnd.RendererCurrently operating renderer.
TGIS_ViewerWnd.ModeMode of reaction to mouse events.
TGIS_Utils.GisCreateLayerCreate a layer given by a name.
TGIS_Layer.PathPath to file holding the layer's data.
TGIS_Layer.CSCoordinate System that is assigned to the layer.
TGIS_LayerVector.ImportLayerImports a layer from an existing layer.
TGIS_LayerPixel.BuildBuilds an in-memory layer.
TGIS_LayerVector.DeselectAllClears selection of all shapes.
TGIS_Shape.IsSelectedIs shape selected.
TGIS_PixelExportManager.ExportFromExport a map given by the viewer using tiles.

Code

This sample is available on following platforms (click to see source code):

2020/05/26 09:38

Page Tools