|
- Overview
- Initializing a map
- Displaying a map
- Managing advanced parameters (WEBDEV)
- The following functions can be used with the Map controls
- Remarks
- Properties specific to the Map controls
Handling a Map control by programming
Displaying a map When the window containing a Map control is opened, a world map is automatically displayed: the map is centered on Europe, with minimum zoom level. You can display the last position: simply select the option "Remember last position displayed" in the "General" tab of the Map control description window. In this case, the last position is displayed with the same zoom level. To display a map corresponding to a specific location, use: - MapDisplayPosition: This function can be used with a specific position (geoPosition variable), or on a town or a monument.
For example:
// Centers the map displayed by the "MAP_Position" control // on a geographical location MyPosition is géoPosition MapDisplayPosition(MAP_Position, MyPosition)
// Centers the map displayed by the "MAP_Position" control on a city // from its name MapDisplayPosition(MAP_Position, "Montpellier, France")
// Centers the map displayed by the "MAP_Position" control on a monument // from its name MapDisplayPosition(MAP_Position, "Eiffel Tower")
- a direct assign command with a specific position. In this case, the position is displayed without any animation.
Example:
// Centers the map displayed by the "MAP_Position" control // on a geographical location MyPosition is geoPosition MAP_Position = MyPosition
Managing advanced parameters (WEBDEV) Versions 20 and later New in version 20The following functions can be used with the Map controls The WLanguage functions that can be used with the Map controls can be classified in several categories: - The functions used to manage the positions on the map:
| | MapDisplayPosition | Centers the map displayed in a Map control on a geographical position or on a specific location. | MapGetPosition | Returns the geographical position of the point located in the center of the map currently displayed in a Map control. | MapInfoPosition | Returns the coordinates (in pixels) of the point corresponding to a geographical position (latitude and longitude). | MapInfoXY | Returns the geographical position (latitude and longitude) corresponding to a point in a Map control. |
- The functions used to follow the movements of the device:
| | MapEndOfMove | Stops following the device movement in a Map control. | MapFollowMovement | Displays the current device position in a Map control and updates this position during its move. |
- The functions used to manage the markers on the map. These functions use the Marker variables to define the characteristics of these markers.
- The functions used to manage the itineraries on the map.
Versions 20 and laterThe functions used to handle the additional options of the Google API for map management: | | MapConfigureGglAPI | Declares additional parameters for the Map control that will be transmitted to the Google API. | MapExecuteJS | Runs the native code of Google Maps API in a Map control in Javascript. | MapGetJSObject | Returns the instance of the API of Map control. |
New in version 20The functions used to handle the additional options of the Google API for map management: | | MapConfigureGglAPI | Declares additional parameters for the Map control that will be transmitted to the Google API. | MapExecuteJS | Runs the native code of Google Maps API in a Map control in Javascript. | MapGetJSObject | Returns the instance of the API of Map control. |
The functions used to handle the additional options of the Google API for map management:
| | MapConfigureGglAPI | Declares additional parameters for the Map control that will be transmitted to the Google API. | MapExecuteJS | Runs the native code of Google Maps API in a Map control in Javascript. | MapGetJSObject | Returns the instance of the API of Map control. |
Properties specific to the Map controls The following properties are used to manage a Map control by programming: | | MapMode | Returns or modifies the display mode of the map in the Map control. | Value | Used to center the map on the position corresponding to the specified geoPosition variable. | Zoom | Returns or modifies the zoom level used to display the map. |
For a complete list of WLanguage properties that can be used with a Map control, see Properties associated with the Map control.
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |