Promotic

Preconfiguration "Map with active points"

Active points on map layer with zooming capability.

This preconfiguration can be activated when creating a new object (e.g. by "New object ..." in the local object menu or by pressing the Insert key after selecting the object) and is included in the group: "/ Technology / Maps".
This preconfiguration can be created in the object: PmaFolder or PmaRoot.

- The preconfiguration creates an object of the PmaFolder type with PmaPanel subobjects named "Map" and "Point". The scripts in panels are written in JavaScript.
- The preconfiguration is created including the panel (object of the PmaPanel type) is functional also as Web panel.


Editor of PmaPanel graphics - object description and setting

The "Point" panel is used only for demo purposes. In the preconfiguration framework, it is open by the CreateView method with the point parameter in the onKeyPress event of the active point in the Map panel.

The "Map" panel contains two PmgRasterImage objects named map and mapview. Both these objects are connected to the same image of the map layer on the "Image" tab in the "File" configurator.
The following variables are defined on the "Variables" tab of the Pmg object map:
 
nScroll: The value defines the zooming ratio of the map
clipX, clipY: Position of the left upper corner when moving on the map. The default values are not set.
clipDx, clipDy: Cut out size setting for map movement. The default values are panel dimensions Dx and Dy (in pixels).
bmpDx, bmpDy: These are constants that must be set and represent the real panel dimensions Dx and Dy (in pixels).


Movement and zooming in the map is solved in the onMousePress event in individual control Pmg objects and also in the overview ma mapview.

Active points on map are solved by means of the PmgInstance object, where there are following variables on the "Variables" tab:
 
title: Point name (required)
x, y: The point position on map in full view (required)


The action connected with click on map active point is defined in in the onKeyPress event.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
Default: "Map"
Enable as Web componentSpecifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
PmaWeb objectPath in the Pma objects tree to the object PmaWeb, PmaWebFolder or PmaWebLang where the registration is carried out.
Macro expression can be used for input (it is evaluated after the application is launched).
After the preconfiguration is created, the "PmaPanel > Web server > PmaWeb object" configurator will be set to this value.

History:
Pm8.00.05: Created
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.