MAPDISPLAY
Manage the operation of a Map Control in the HMI.
Partial WebVue support - See the table with the list of modes below. Not supported modes return an unsuccessful code if used in this context.
Mode | Mnemonic | Syntax | WebVue support |
1 | LOADDEFAULT | 1 | No |
2 | CENTERTOMARKER | 2 | Yes |
3 | GETZOOM | 3 | No |
4 | SETZOOM | 4 | Yes |
5 | GETLATITUDE | 3 | No |
6 | SETLATITUDE | 4 | Yes |
7 | GETLONGITUDE | 3 | No |
8 | SETLONGITUDE | 4 | Yes |
9 | EXPORT | 5 | No |
10 | LOADMARKERS | 6 | No |
11 | ISLAYERDISPLAYED | 7 | No |
12 | SETLAYERVISIBILITY | 8 | Yes |
13 | GETMARKERLATITUDE | 9 | No |
14 | SETMARKERLATITUDE | 10 | No |
15 | GETMARKERLONGITUDE | 9 | No |
16 | SETMARKERLONGITUDE | 10 | No |
17 | GETMARKERTOOLTIP | 11 | No |
18 | SETMARKERTOOLTIP | 10 | No |
19 | GETMARKERMIMIC | 11 | No |
20 | SETMARKERMIMIC | 12 | No |
21 | GETMARKERBRANCH | 11 | No |
22 | SETMARKERBRANCH | 12 | No |
23 | GETMARKERTYPE | 13 | No |
24 | GETUSERDATAVARNAME | 14 | No |
25 | GETUSERDATALABEL | 14 | No |
26 | SETUSERDATALABEL | 15 | No |
27 | GETUSERDATAVALUE | 14 | No |
28 | SETUSERDATAVALUE | 15 | No |
29 | ISLOADING | 16 | No |
30 | GETMARKERVISIBILITY | 17 | No |
31 | SETMARKERVISIBILITY | 10 | No |
32 | SETMAPPROVIDER | 18 | No |
Modes associated with map markers (2, and 11 to 28 inclusive) will generate an error if executed while the Map Markers file is still loading.
Properties Common to all Modes
Argument |
Meaning |
Window | The name of the window containing the Map Control. Type STR. |
Branch | The branch of the window containing the Map Control. Type STR. |
MapID | The identifier of the Map Control (within the window). Type STR. |
LayerName | The identity of a map markers layer. Type STR. |
MarkerName | The identity of a map marker. Type STR. |
ViewIndex | The view index (starting at 1) if there is more than one view of the window (mimic) open in the same region. Optional. |
Value | New value for the map property being set. Type depends on the context - either INTEGER, DOUBLE or STR. |
Syntax 1
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
1 | LOADDEFAULT |
Resets the run-time properties of the Map Control to their default values, including reloading the GPX (map markers) file. Return: 1 if successful, else 0. |
Syntax 2
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName[, ViewIndex]);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
2 | CENTERTOMARKER |
Centers a map on the given marker. If the marker is multipoint (track or polygon), then the map relocates on the first point of the object. If LayerName is empty, the default layer is used. Return: 1 if successful, else 0. |
Syntax 3
DblVal = MAPDISPLAY (Mode, Window, Branch, MapID[, ViewIndex]);
Return type: DOUBLE.
Execution
Mode |
Mnemonic |
Action |
3 | GETZOOM |
Gets the zoom level of the map. Return: The zoom level. |
5 | GETLATITUDE |
Gets the latitude of the center of the map using the WGS84 system. Return: The latitude. |
7 | GETLONGITUDE |
Gets the longitude of the center of the map using the WGS84 system. Return: The longitude. |
Return 0 if unsuccessful. |
Syntax 4
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, Value[, ViewIndex]);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
4 | SETZOOM |
Set a new zoom level for the map. |
6 | SETLATITUDE |
Set the latitude of the center of the map using the WGS84 system. |
8 | SETLONGITUDE |
Set the longitude of the center of the map using the WGS84 system. |
Return: 1 if successful, else 0. |
Syntax 5
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, FileName);
Return type: INTEGER.
Argument |
Meaning |
FileName |
The name of the file to be used for output. Type STR. If using a relative file name, the file is relative to the \Gis folder. |
Execution
Mode |
Mnemonic |
Action |
6 | EXPORT |
Creates a map markers file (type .gpx) from the layers and markers of a Map Control. Generates an error if the map markers file is still loading. Return: 1 if successful, else 0. |
Syntax 6
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, FileName[, AsyncFlag[, StateVar]])
Return type: INTEGER.
Argument |
Meaning |
FileName |
The name of the .gpx file containing the map markers. Type STR. If using a relative file name, the file is relative to the \Gis folder. |
AsynchFlag |
A flag indicating if the file should be loaded synchronously (0) or asynchronously (1). |
StateVar |
The name of a register variable that indicates the status of the load process. Type STR. 0 = Success 1 = Loading in progress 3 = Canceled 10 = Failed |
Execution
Mode |
Mnemonic |
Action |
10 | LOADMARKERS |
Loads layers and markers from the specified .gpx file. Previously loaded markers are deleted. Return: 1 if successful, else 0. |
Syntax 7
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName[, ViewIndex]);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
11 | ISLAYERDISPLAYED |
Returns the visibility of a layer of the given Map Control, taking in account Show property and zoom limits. Return: 1 if visible, 0 if hidden, else -1 (error). |
Syntax 8
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, Value);
Return type: INTEGER.
Argument |
Meaning |
Value |
A flag to indicate the visibility setting. Type INTEGER. |
Execution
Mode |
Mnemonic |
Action |
12 | SETLAYERVISIBILITY |
Set layer visibility. Return: 1 if successful, else 0. |
Syntax 9
DblVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName);
Return type: DOUBLE.
Execution
Mode |
Mnemonic |
Action |
13 | GETMARKERLATITUDE |
Gets the latitude coordinate (-90 to 90) of the marker in WGS84 system. Does not work for multi-point markers (tracks or polygons). Return: The latitude coordinate. |
15 | GETMARKERLONGITUDE |
Gets the longitude coordinate (-180 to 180) of the marker in WGS84 system. Does not work for multi-point markers (tracks or polygons). Return: The longitude coordinate. |
Returns 0 if unsuccessful. |
Syntax 10
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName, Value);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
14 | SETMARKERLATITUDE |
Sets the latitude coordinate (-90 to 90) of the marker in WGS84 system using the supplied value. Does not work for multi-point markers (tracks or polygons). The Value parameter is a double and is the latitude value. |
16 | SETMARKERLONGITUDE |
Sets the longitude coordinate (-180 to 180) of the marker in WGS84 system using the supplied value. Does not work for multi-point markers (tracks or polygons). The Value parameter is a double and is the longitude value. . |
18 | SETMARKERTOOLTIP |
Sets the marker short description (tooltip). The Value parameter is a string and is the tooltip text. |
31 | SETMARKERVISIBILITY |
Sets the marker's visibility. Value = 1 is visible, Value = 0 is invisible. |
Return: 1 if successful, else 0. |
Syntax 11
StrVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName);
Return type: STR.
Execution
Mode |
Mnemonic |
Action |
17 | GETMARKERTOOLTIP |
Gets the short description (tooltip) of the marker in current language. Return: The marker tooltip. |
19 | GETMARKERMIMIC |
Gets the name of the mimic that should be opened when clicking on the marker. Return: The mimic name. |
21 | GETMARKERBRANCH |
Gets the branch of the marker. This branch is used to bind marker properties. If the mimic property is defined, when a user clicks on the marker, the mimic will be opened with the corresponding branch. For symbol markers the branch is also assigned to the instantiated symbols. Return: The marker branch. |
Returns an empty string if unsuccessful. |
Syntax 12
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName, Value[, ChildMode]);
Return type: INTEGER.
Argument |
Meaning |
ChildMode |
Flag indicating how the mimic is to be opened. Type INTEGER. 0 to open the mimic as an independent window. 1 to open the mimic as a child window (pop-up). |
Execution
Mode |
Mnemonic |
Action |
20 | SETMARKERMIMIC |
Sets the name of the mimic that should be opened when clicking on the marker. The parameter Value is a string and is the name of the mimic. |
22 | SETMARKERBRANCH |
Sets the branch of the marker. The parameter Value is a string and is the name of the branch. This branch is used to bind marker properties. If the mimic property is defined, when a user clicks on the marker, the mimic will be opened with the corresponding branch. For symbol markers the branch is also assigned to the instantiated symbols. |
Return: 1 if successful, else 0. |
Syntax 13
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
23 | GETMARKERTYPE |
Gets the marker type. Return: 1 = Shape 2 = Text 3 = Image 4 = Symbol 5 = Track 6 = Polygon |
Syntax 14
StrVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName, UserDataName);
Return type: STR.
Argument |
Meaning |
UserDataName |
The name given to an item in the User Data array as configured using the Map Markers Editor. Type STR. |
Execution
Mode |
Mnemonic |
Action |
24 | GETUSERDATAVARNAME |
Get the name of the variable, as configured for the supplied UserDataName. Return: The variable name. |
25 | GETUSERDATALABEL |
Get the label, as configured for the supplied UserDataName. Return: The label. |
27 | GETUSERDATAVALUE | Get the UserData value , as configured for the supplied UserDataName. Return: The UserData value as a string. |
Returns an empty string if unsuccessful. |
Syntax 15
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName, UserDataName, Value);
Return type: INTEGER.
Argument |
Meaning |
UserDataName |
The name given to an item in the User Data array as configured using the Map Markers Editor. Type STR. |
Execution
Mode |
Mnemonic |
Action |
26 | SETUSERDATALABEL |
Set the label for the supplied UserDataName. The Value parameter is a string and is the label text. |
28 | SETUSERDATAVALUE | Set the value of the variable for the supplied UserDataName. The Value parameter is a string and is the data value. |
Return: 1 if successful, else 0. |
Syntax 16
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
29 | ISLOADING |
Test if the map markers file is loading. Return: |
Syntax 17
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, LayerName, MarkerName);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
30 | GETMARKERVISIBILITY |
Gets the marker's visibility. Return: 1 if visible 0 if hidden -1 indicates an error. |
Syntax 18
IntVal = MAPDISPLAY (Mode, Window, Branch, MapID, ProviderName, IsLocal [, UseCache]);
Return type: INTEGER.
Argument |
Signification |
ProviderName |
Map provider name. Type STR. |
IsLocal |
Local or online map. |
UseCache |
Flag indicating to use the cache. |
Execution
Mode |
Mnemonic |
Action |
32 | SETMAPPROVIDER |
Change the map provider. Return: 1 if successful, else 0. |