Moves the map displayed in the Map control so that the specified geographic area can be seen in its entirety.
p1 is geoPosition
p1.Latitude = 0
p1.Longitude = 0
p2 is geoPosition
p2.Latitude = 3
p2.Longitude = 3
MAP_MyMap.DisplayArea(p1, p2, True, procEndAnimation)
INTERNAL PROCEDURE procEndAnimation(bResult is boolean)
IF bResult = True THEN
ToastDisplay("Area displayed")
END
END
Syntax
<Result> = <Map control>.DisplayArea(<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.
<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.
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