PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Centers the map displayed in a Map control on a geographical position or on a specific location. An animation is automatically performed.
At the end of the animation, the "Whenever changing position" process of the Map control will be run. This process will not be run if the positioning on the map is canceled by the user before the end of animation.
Android Caution: This function is available in the Android emulator. This function is not available in the Android simulator.
Android Note: This function is available in the Android emulator and in the Android simulator.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 20 and later
WINDEVWindows This function is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
New in version 20
WINDEVWindows This function is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
WINDEVWindows This function is now available for the WINDEV applications in Windows.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server codeWindowsLinux This function is now available for the WEBDEV sites in Windows and in Linux.
PHP This function is now available for the PHP sites.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
// Centers the map displayed by the "MAP_Position" control on a geographical position
MyPosition is geoPosition
MapDisplayPosition(MAP_Position, MyPosition)

// equivalent syntax (without animation): MAP_Position = MyPosition
WINDEVWEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 AppPHP
Versions 20 and later
iPhone/iPad This syntax is available from version 20.
New in version 20
iPhone/iPad This syntax is available from version 20.
iPhone/iPad This syntax is available from version 20.
// Centers the map displayed by the "MAP_Position" control on a city identified by its name
MapDisplayPosition(MAP_Position, "Montpellier, France")

// Centers the map displayed by the "MAP_Position" control on a monument identified by its name
MapDisplayPosition(MAP_Position, "Eiffel Tower")
Syntax
WINDEVAndroidiPhone/iPadUniversal Windows 10 App

Displaying a geographical location Hide the details

<Result> = MapDisplayPosition(<Map Control> , <Position>)
<Result>: Boolean
  • True if the map was positioned on the specified position,
  • False otherwise. To find out the error details, use ErrorInfo.
iPhone/iPadUniversal Windows 10 App <Result> is always set to True, even if an error occurs. There is no way to find out whether the positioning was successfully performed.
<Map Control>: Control name
Name of Map control to use. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<Position>: geoPosition variable or character string
Description of the location on which the map will be centered. This description can correspond to:
  • the name of geoPosition variable describing the geographical position on which the map will be centered.
  • a character string containing an address, a city, the name of a monument, ...
    Universal Windows 10 App Using a character string may involve an inconsistent position via the mapping service of Bing Map.
  • an Address variable.
iPhone/iPad This parameter cannot be a character string or an Address variable.
Versions 20 and later
WINDEVWEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 AppPHP

Displaying a geographical location with check procedure Hide the details

MapDisplayPosition(<Map Control> , <Position> [, <WLanguage Procedure>])
<Map Control>: Control name
Name of Map control to use. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<Position>: geoPosition variable or character string
Description of the location on which the map will be centered. This description can correspond to:
  • the name of geoPosition variable describing the geographical position on which the map will be centered.
  • a character string containing an address, a city, the name of a monument, ...
    Universal Windows 10 App Using a character string may involve an inconsistent position via the mapping service of Bing Map.
  • an Address variable.
<WLanguage Procedure>: Optional character string (with quotes)
Name of the WLanguage procedure ("callback" procedure) called once the new geographical position is displayed. This procedure has the following format:
PROCEDURE <Procedure Name> (<Change Performed>)

where <Change Performed> is a boolean:
  • True if the position was modified,
  • False otherwise.
WEBDEV - Server codePHP This parameter is not available.
New in version 20
WINDEVWEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 AppPHP

Displaying a geographical location with check procedure Hide the details

MapDisplayPosition(<Map Control> , <Position> [, <WLanguage Procedure>])
<Map Control>: Control name
Name of Map control to use. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<Position>: geoPosition variable or character string
Description of the location on which the map will be centered. This description can correspond to:
  • the name of geoPosition variable describing the geographical position on which the map will be centered.
  • a character string containing an address, a city, the name of a monument, ...
    Universal Windows 10 App Using a character string may involve an inconsistent position via the mapping service of Bing Map.
  • an Address variable.
<WLanguage Procedure>: Optional character string (with quotes)
Name of the WLanguage procedure ("callback" procedure) called once the new geographical position is displayed. This procedure has the following format:
PROCEDURE <Procedure Name> (<Change Performed>)

where <Change Performed> is a boolean:
  • True if the position was modified,
  • False otherwise.
WEBDEV - Server codePHP This parameter is not available.
WINDEVWEBDEV - Server codeWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 AppPHP

Displaying a geographical location with check procedure Hide the details

MapDisplayPosition(<Map Control> , <Position> [, <WLanguage Procedure>])
<Map Control>: Control name
Name of Map control to use. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<Position>: geoPosition variable or character string
Description of the location on which the map will be centered. This description can correspond to:
  • the name of geoPosition variable describing the geographical position on which the map will be centered.
  • a character string containing an address, a city, the name of a monument, ...
    Universal Windows 10 App Using a character string may involve an inconsistent position via the mapping service of Bing Map.
  • an Address variable.
<WLanguage Procedure>: Optional character string (with quotes)
Name of the WLanguage procedure ("callback" procedure) called once the new geographical position is displayed. This procedure has the following format:
PROCEDURE <Procedure Name> (<Change Performed>)

where <Change Performed> is a boolean:
  • True if the position was modified,
  • False otherwise.
WEBDEV - Server codePHP This parameter is not available.
Remarks
  • WINDEVAndroidUniversal Windows 10 App MapDisplayPosition is using the geo-localization service of Google (or Bing Map for Universal Windows 10 App). The positions define from the description of a location depend on the quantity and on the precision of the information supplied in this description. If the same description correspond to several locations, the geo-localization service will return the most suitable correspondences.
  • iPhone/iPad The cartography service used differs according to the version of the mobile device or tablet:
    • before iOS 6, the service used is the geo-localization service of Google.
    • after iOS 6, the service used is the geo-localization service of Apple.
  • iPhone/iPad We advise you to use the syntax 2 "Displaying a geographical position with check procedure".
  • The zoom level of the map is not modified when changing position.
  • To center the map on a specific position without performing the animation, you have the ability to assign a geoPosition variable to the ..Value property of a Map control.
  • Android To retrieve the list of addresses corresponding to the description of a location or to a geographical position, use geoGetAddress.
  • WINDEVWEBDEV - Browser codeAndroidiPhone/iPadUniversal Windows 10 App To find out the position currently displayed in the center of the Map control, use MapGetPosition.
  • Versions 21 and later
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
    New in version 21
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
    Universal Windows 10 App The Map control is using the Bing Map service.
    Caution: The use of the Map control is subject to specific terms and conditions. A Bing key must be used (MapLicenseBing). Check the Bing license before deploying your applications.
  • iPhone/iPad To display the position of an address on a map, we advise you to perform the following operations:
    1. Perform an HTTP query on Google MAP to retrieve the coordinates of an address.
    2. Use the coordinates retrieved by MapDisplayPosition.
Related Examples:
The Map control Unit examples (WEBDEV): The Map control
[ + ] This example explains how to use the Map control of WEBDEV.
It can be used to display a map that includes markers as well as an itinerary.
The Map control Unit examples (WINDEV): The Map control
[ + ] Using the Map control of WINDEV.
It is used to display a map that includes markers as well as an itinerary.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
WEBDEV - Browser code WDJS.DLL
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 17
This page is also available for…
Comments
Example
MapLicenseGgl("AIzaSyDbSVKYPwB1a-_vPbDzAr6LgAfIj4iW2hc")

PositionWx is geoPosition
PositionWx.Latitude = -25.4401779
PositionWx.Longitude = -49.2118695

MarkerWx is Marker
MarkerWx.Description = "WX INFORMATICA"
MarkerWx.Name = "WX INFORMATICA"
MarkerWx.Position = PositionWx

MapAddMarker(GoogleMaps,MarkerWx)

GoogleMaps.DisplayPosition(PositionWx)
GoogleMaps..Zoom = 18
BOLLER
Jul. 13 2018