Preconfiguration "Google map with active points"

The usage of API interface of GoogleMaps service

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. This is an example of the application that uses html page to display map base with active points containing links to application panels.
Example is designed for both local and Web functionality.
In order to have this application fully functional the computer running it must be connected to the Internet.

The preconfiguration creates the PmaFolder object with PmaPanel subobjects named "City", "MapPanel" and "Promotic". The MapPanel has a PmaWebDir subobject named "Map".

The PmaWebDir subobject named "Map" has a html page created in the onPageModify event. The content of this html page is designed in order to use the API inteface of GoogleMaps service for displaying map base. Then there can be active points placed on the map surface including their description and a link to defined URL address. see Google Maps API documentation for active "Markers" design.
By editing the content of this page it can be changed the default setting of map center(center:), its initial zoom (zoom:) or map type (mapTypeId:)
Then there are 4 active markers (points), that have defined position (position:), label (label:) and links to application Web panels called by click events
The first three markers open the same page (panelcity) to which they pass their value in the city parameter. This panel is configured in order to be able to use this parameter in its content.
The fourth marker opens an independent panel promotic.

There is a script in the onPageAction event, that allows the local application to open the requested page with the parameter used.

For unlimited use of the google service, you must purchase a license and use the obtained license key in the sGoogleKey variable at the beginning of the html page creation.
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the tree of Pma objects. 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 chars), empty string, spaces and the first character must not be a number.
Default: "GoogleMaps"
The preconfiguration requires support for Microsoft Edge WebView2 Runtime.
And in the ini file of the application it is necessary to enter the WebView2=1 key into the [Promotic] section.
PmaWeb objectPath in the tree of Pma objects to the object PmaWeb, PmaWebFolder or PmaWebLang where the registration is carried out.
Macro expression can be used for input (it is evaluated after starting the application).
After the preconfiguration is created, the "PmaPanel > Web server > PmaWeb object" configurator will be set to this value.

Pm9.00.25: Created
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

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