Documentation | Samples | Viewer
CGMViewer sample — demonstrates rendering CGM (Computer Graphics Metafile) symbol files (Delphi/VCL).
What the sample shows:
See also ViewerLite sample.
This sample illustrates use of:
| Name | Description |
|---|---|
| TGIS_Viewer.Open | Open a project. |
| TGIS_Viewer.Close | Close the current project. |
| TGIS_Viewer.Items | All layers. |
| TGIS_Viewer.UseRTree | True if an RTree spatial index will be used by default when a layer is created. |
| TGIS_Viewer.CS | Coordinate system assigned to the viewer. |
| TGIS_Viewer.InvalidateWholeMap | Invalidate whole map. |
| TGIS_Viewer.Extent | Map extent encompassing the collective extents of all layers. |
| TGIS_Viewer.InPaint | True if the viewer is busy in the Paint procedure. |
| TGIS_Viewer.IsEmpty | True if the viewer is empty and contains no layers. |
| TGIS_Viewer.Locate | Locates the shape nearest to _ptg that is within _prec. |
| TGIS_Viewer.ScreenToMap | Converts point coordinates from screen coordinates to map coordinates. |
| TGIS_Viewer.FullExtent | Calculate the screen origin, zoom, and viewport to place the whole map in the window. |
| TGIS_Viewer.Get | Retrieve the layer identified by name. |
| TGIS_ViewerWnd.Renderer | Currently active renderer. |
| TGIS_ViewerWnd.Mode | Determines how the viewer reacts to mouse input. |
| TGIS_Utils.GisCreateLayer | Create a layer instance for the specified registered layer name and path. |
| TGIS_Layer.Path | Path to the file holding the layer data. |
| TGIS_Layer.CS | Coordinate Reference System (CRS) assigned to the layer. |
| TGIS_LayerVector.ImportLayer | Import shapes from another vector layer, optionally filtered by extent, target geometry type, and SQL (Structured Query Language) WHERE clause. |
| TGIS_LayerPixel.Build | Builds an in-memory georeferenced bitmap or grid layer using the specified pixel size. |
| TGIS_LayerVector.DeselectAll | Clears the selection state of all shapes in the layer. |
| TGIS_Shape.IsSelected | Shape is selected in the layer. |
| TGIS_PixelExportManager.ExportFrom | Exports a rectangular map extent from a viewer into the destination pixel layer using the configured tile settings. |
This sample is available on the following platforms (click to view the source code on GitHub):