PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
WINDEV, WEBDEV and WINDEV Mobile allow you to handle a Map control by programming. To do so, use the variable of the Map control in the code.
The variable of the Map control corresponds to the name of the Map control.
This help page explains how to handle a Map control by programming.
Remark: Several WLanguage functions are specific to the management of Map controls. See Map control management functions for more details.
Versions 18 and later
iPhone/iPad The Map control is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad The Map control is now available for iPhone/iPad applications.
iPhone/iPad The Map control is now available for iPhone/iPad applications.
Versions 20 and later
PHP The Map control is now available for the WEBDEV sites in PHP.
New in version 20
PHP The Map control is now available for the WEBDEV sites in PHP.
PHP The Map control is now available for the WEBDEV sites in PHP.
Versions 21 and later
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
Universal Windows 10 App The Map control is now available in Universal Windows 10 App mode.
Initializing a map

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)
The 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:
    MapDisplayPositionCenters the map displayed in a Map control on a geographical position or on a specific location.
    MapGetPositionReturns the geographical position of the point located in the center of the map currently displayed in a Map control.
    MapInfoPositionReturns the coordinates (in pixels) of the point corresponding to a geographical position (latitude and longitude).
    MapInfoXYReturns the geographical position (latitude and longitude) corresponding to a point in a Map control.
  • The functions used to follow the movements of the device:
    MapEndOfMoveStops following the device movement in a Map control.
    MapFollowMovementDisplays 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.
    MapAddMarkerAdds a new marker onto a map displayed in a Map control.
    MapDeleteAllDeletes in an Map control:
    • all markers,
    • Versions 26 and later
      all forms,
      New in version 26
      all forms,
      all forms,
    • Versions 26 and later
      all images.
      New in version 26
      all images.
      all images.
    MapDeleteMarkerDeletes a marker from a map displayed by a Map control
    MapModifyMarkerModifies a marker displayed in a Map control.
  • The functions used to manage the itineraries on the map.
    Versions 18 and later
    MapAddItinerary
    New in version 18
    MapAddItinerary
    MapAddItinerary
    Adds an itinerary onto a Map control.
    Versions 18 and later
    MapDeleteItinerary
    New in version 18
    MapDeleteItinerary
    MapDeleteItinerary
    Deletes an itinerary from a Map control.
  • Versions 20 and later
    The functions used to handle the additional options of the Google API for map management:
    Versions 20 and later
    MapConfigureGglAPI
    New in version 20
    MapConfigureGglAPI
    MapConfigureGglAPI
    Declares additional parameters for the Map control that will be transmitted to the Google API.
    Versions 20 and later
    MapExecuteJS
    New in version 20
    MapExecuteJS
    MapExecuteJS
    Runs the native code of Google Maps API in a Map control in Javascript.
    Versions 20 and later
    MapGetJSObject
    New in version 20
    MapGetJSObject
    MapGetJSObject
    Returns the instance of the API of Map control.
    New in version 20
    The functions used to handle the additional options of the Google API for map management:
    Versions 20 and later
    MapConfigureGglAPI
    New in version 20
    MapConfigureGglAPI
    MapConfigureGglAPI
    Declares additional parameters for the Map control that will be transmitted to the Google API.
    Versions 20 and later
    MapExecuteJS
    New in version 20
    MapExecuteJS
    MapExecuteJS
    Runs the native code of Google Maps API in a Map control in Javascript.
    Versions 20 and later
    MapGetJSObject
    New in version 20
    MapGetJSObject
    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:
    Versions 20 and later
    MapConfigureGglAPI
    New in version 20
    MapConfigureGglAPI
    MapConfigureGglAPI
    Declares additional parameters for the Map control that will be transmitted to the Google API.
    Versions 20 and later
    MapExecuteJS
    New in version 20
    MapExecuteJS
    MapExecuteJS
    Runs the native code of Google Maps API in a Map control in Javascript.
    Versions 20 and later
    MapGetJSObject
    New in version 20
    MapGetJSObject
    MapGetJSObject
    Returns the instance of the API of Map control.

Remarks

  • AndroidiPhone/iPad geoRunApp is used to start native map application of the device.
  • Versions 21 and later
    Universal Windows 10 App MapLicenseBing is used to specify the Bing key required for using the Map control in an application in Universal Windows 10 app mode.
    New in version 21
    Universal Windows 10 App MapLicenseBing is used to specify the Bing key required for using the Map control in an application in Universal Windows 10 app mode.
    Universal Windows 10 App MapLicenseBing is used to specify the Bing key required for using the Map control in an application in Universal Windows 10 app mode.
Properties specific to the Map controls
The following properties are used to manage a Map control by programming:
MapModeReturns or modifies the display mode of the map in the Map control.
ValueUsed to center the map on the position corresponding to the specified geoPosition variable.
ZoomReturns 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.
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment