ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
  • "Whenever changing the position" Map control event
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Moves the map displayed in the Map control so that the specified geographic area can be seen in its entirety.
Example
p1 is geoPosition
p1.Latitude = 0
p1.Longitude = 0
p2 is geoPosition
p2.Latitude = 3
p2.Longitude = 3
MapDisplayArea(MAP_MyMap, p1, p2, True, procEndAnimation)
 
INTERNAL PROCEDURE procEndAnimation(bResult is boolean)
IF bResult = True THEN
ToastDisplay("Area displayed")
END
END
Syntax
<Result> = MapDisplayArea(<Map control> , <North West position> , <South East position> [, <Animation> [, <WLanguage procedure>]])
<Result>: Boolean
  • True if a request to change the position was made,
  • False otherwise. To get more details on the error, use ErrorInfo.
<Map control>: Control name
Name of the Map control to be used. If this parameter corresponds to an empty string (""), the Map control to which the current process belongs will be used.
<North West position>: geoPosition variable
Name of the geoPosition variable that corresponds to the North West point of the area to be displayed in the Map control.
<South East position>: geoPosition variable
Name of the geoPosition variable that corresponds to the South East point of the area to be displayed in the Map control.
<Animation>: Optional boolean
  • True (default value) if the area is to be displayed with an animation,
  • False otherwise.
<WLanguage procedure>: Optional procedure name
Name of the WLanguage procedure ("callback") called at the end of the animation. This procedure has the following format:
PROCEDURE <Procedure name> (<Displayed area>)
where <Displayed area> is a boolean:
  • True if the area could be displayed,
  • False otherwise (e.g., if the user moved the map during the animation).
If <Animation> is set to False, the procedure is not called.
iPhone/iPad This parameter is not available.
Remarks

"Whenever changing the position" Map control event

  • If the Map control moves to the specified area with an animation, the event "Whenever changing the position" will be run at the end of the animation..
  • If the user cancels the positioning on the Map control before the end of the animation, the event "Whenever changing the position" will not be run.

Special cases

  • The zoom level of the Map control can be set to change automatically when the position changes.
  • To center a map on a given position without animations, you can directly assign a geoPosition variable to the Value property of the Map control.
    For example:
    p1 is geoPosition
    p1.Latitude = 3
    p1.Longitude = 3
    MAP_MyMap.Value = p1
Business / UI classification: UI Code
Component: wd290obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help