Update cookies preferences
Promotic

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 context menu of the object 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 an object of the PmaFolder type 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 licence and use the obtained licence key in the sGoogleKey variable at the beginning of the html page creation.
See https://developers.google.com/maps/documentation/embed/get-api-key#creating-api-keys
 
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the Pma object 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 first character must not be a number.
Default: "GoogleMaps"
The preconfiguration requires support for Microsoft Edge WebView2 Runtime.
And in the application's INI file it is necessary to enter the WebView2=1 key into the [Promotic] section.
PmaWeb objectPath in the Pma object 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:
Pm9.00.25: Created
PROMOTIC 9.0.29 SCADA system documentation MICROSYS, spol. s r.o.

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