User Tools

Site Tools


guides:tutorials:intro-visual-components

Introduction to visual components

Documentation | Tutorials | Visual components

The Developer Kernel includes native visual controls for custom GIS development using different development platforms like Embarcadero Delphi or Microsoft Visual Studio for .NET. Available components are:

The included pictures were rendered on the DK.VCL. Presentation on other platforms can differ slightly.

Viewer

TGIS_ViewerWnd | VCL | FMX |WinForms | Java

This is the main component displaying the map and controlling other components.

There are some interesting properties that can be used to modify the viewer behavior:

  • AutoCenter - if True, then the screen will be centered on click, edit
  • BigExtentMargin - map extent margin
  • CustomPPI - custom resolution in pixels-per-inch
  • Mode - reaction to mouse events
  • RestrictedDrag - if True, you cannot drag outside the map extent
  • SelectionColor - color used for selecting shape
  • SelectionTransparency - transparency value for selection
  • UseRtree – if True, Rtree will be used by default upon creation of any layer.

The viewer also contains built in the Editor class, properties that offer basic editing functionality, including the changing of points, vector vertices, creating new vector points, lines, and polygons, snapping with mouse clicks.

Legend

TGIS_ControlLegend | VCL | FMX | WinForms | Java

The legend is connected to the viewer and represents the current map appearance including layers and styling.

To attach a legend to a viewer, the GIS_Viewer property must be set to the viewer component.

There are some interesting properties that can be used to modify the legend behavior:

  • DialogOptions – limits the number of values displayed in the layer properties dialog box
  • Mode – can be either Layers or Groups
  • Options – to allow legend operations such as move, select and items visibility
  • ReverseOrder - True if the order of the legend entries in the Layer mode should be reversed

The legend control allows accessing a layer properties form where you can set and define styling and common layer properties. To open this form, double click or tap on the selected layer name in legend control.

Using the legend, the user can also change the order of layers drawing or switch layer visibility to on or off. To move a layer up or down on the layer list, click or tap on the layer name and hold for about 1 second to initialize dragging, then move the layer up or down to change the position indicated by a red line.

Scale

TGIS_ControlScale| VCL | FMX | WinForms | Java

The scale is connected to the viewer and represents the current map scale.

To join a scale to a viewer, the GIS_Viewer property must be set with the viewer component.

There are some interesting properties that can be used to modify the scale behavior:

  • DividerColor1 – color of the first divider
  • DividerColor2 – color of the second divider
  • Dividers - number of dividers
  • Transparent – if True, control will be drawn as transparent
  • UnitsEPSG - units EPSG code for scale output

NorthArrow

TGIS_ControlNorthArrow| VCL |FMX | WinForms | Java

The north arrow is connected to the viewer and shows an arrow pointing to the current map north direction.

To join a north arrow to a viewer, the GIS_Viewer property must be set with the viewer component.

There are some interesting properties that can be used to modify the north arrow behavior:

  • Color1 – fill color
  • Color2 – outline color
  • Path - symbol path
  • Style – symbol style, used if Path is empty.
  • Transparent – if True, control will be drawn as transparent

Attributes

TGIS_ControlAtrributes| VCL |FMX | WinForms | Java

The attributes control shows a shape's attributes in gridded form.

There are some interesting properties that can be used to modify the attributes behavior:

  • AllowNull – if True, NULL fields are acceptable
  • FieldNameColumnWidth – width of the left column
  • IgnoreFldxDefinition - if True, 'Fldx' rules are ignored
  • LayoutType – can be one or two columns grid
  • ShowBtnCancel – True, if 'Cancel' button comes up
  • ShowBtnOk - True, if 'OK' button comes up
  • ShowInternalFields - if True, fields like GIS_AREA or GIS_LENGTH will be displayed

The control can work either in read-only or edit mode, allowing the changing of shape attributes values. Also if the layer attributes have field rules, then the control can display its content in different ways, e.g. using lists or aliases.

PrintPreviewSimple

TGIS_ControlPrintPreviewSimple VCL | FMX | WinForms | Java

The print preview simple is connected to the viewer and shows a predefined print preview form.

To join a print preview to a viewer, the GIS_Viewer property must be set with the viewer component.

There are some interesting properties that can be used to modify the print preview behavior:

  • Caption – caption of form
  • WindowState - state of a window (maximized, minimized etc.)
  • WindowLeft - form size
  • WindowTop - form size
  • WindowWidth - form size
  • WindowHeight - form size

To show the preview form, the Preview method must be called.

PrintPreview

TGIS_ControlPrintPreview | VCL | FMX | WinForms | Java

The print preview is connected to the viewer and shows a customized print preview form.

To join a print preview to a viewer, the GIS_Viewer property must be set with the viewer component. To show the preview form, the Preview method must be called. To print a document, the Print method must be called.

Control3D

TGIS_Control3D | VCL | FMX | WinForms | Java

The 3D control is connected to the viewer and manages a 3D scene display and behavior in 3D mode.

To join a 3D control to a viewer, the GIS_Viewer property must be set with the viewer component.

There are some interesting properties that the user can use to modify the 3D control behavior:

  • Mode – defines the purpose of mouse actions
  • Options - defines which controls are to be displayed within the component

To switch to 3D mode, the View3D property of the viewer must be set to True. Then 3D control will display current 3D scene properties and allow changing rendering parameters such as position, light, etc.

DataSet

TGIS_DataSet | VCL | FMX | WinForms | Java

The dataset provides a layer's data in a database grid based format.

To use the layer data, a DataSource must be connected to the dataset. Then any db controls can use such DataSource and manage the dataset data through it. To activate a dataset and fill with the data, the Open method must be called.

GpsNmea

TGIS_Nmea | VCL | FMX | WinForms | Java

The gps obtains and shows interpreted NMEA messages.

There are some interesting properties that the user can use to modify the print preview behavior:

  • BaudRate – serial port baud rate
  • Com - serial port number

All data acquired from the GPS NMEA device are related to the WGS84 ellipsoid. The GPS device will be connected if the Active property is set to True.

2019/12/13 09:39