ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Bearing property gets or sets the bearing of the map displayed in a Map control.
Note: Bearing changes are taken into account only if the following conditions are fulfilled:
  • the map is displayed in satellite mode with a sufficient zoom level,
  • the map returned by Google includes the rotate and tilt buttons in the lower right corner.
Example
// Change the bearing of the map
MAP_MyMap.Bearing = 90
Syntax

Getting the bearing of the map Hide the details

<Result> = <Map control>.Bearing
<Result>: Real
Bearing of the map, in degrees clockwise from North.
<Map control>: Control name
Name of the Map control used.

Changing the bearing of the map Hide the details

<Map control>.Bearing = <New angle>
<Map control>: Control name
Name of the Map control used.
<New angle>: Real
New bearing of the map, in degrees clockwise from North.
Remarks
  • The Bearing property allows changing the bearing only in Satellite mode, on some areas with a sufficient level of detail and zoom. Where available, the tilt button should appear on the map. The bearing can be changed only if the tilt is set to 45.
  • To change the bearing or tilt, wait until the map has been loaded in the right position, in satellite mode and with a sufficient zoom level.
    • The following code will only work in the page load code. It cannot be used in the click code of a Button control, for example. This would imply trying to change the tilt and bearing before the map loads the necessary parameters:
      pb is geoPosition
      pb.Latitude = 49.4295387
      pb.Longitude = 2.0807123
      MapDisplayPosition(CARTE_MaCarte, pb)
      CARTE_MaCarte.ModeCarte = mapModeSatellite
      CARTE_MaCarte.Zoom = 18
      CARTE_MaCarte.AngleInclinaison = 45
      CARTE_MaCarte.AngleRotation = 90
    • To change the position, mode, zoom, tilt and angle in the click code of a Button control, you must defer the tilt and bearing changes. For example:
      pb is geoPosition
      pb.Latitude = 49.4295387
      pb.Longitude = 2.0807123
      MapDisplayPosition(CARTE_MaCarte, pb)
      CARTE_MaCarte.ModeCarte = mapModeSatellite
      CARTE_MaCarte.Zoom = 18
      nTimer is int = Timer(Timer_Callback, 10)
      
      		INTERNAL PROCEDURE Timer_Callback()
      			CARTE_MaCarte.AngleInclinaison = 45
      			CARTE_MaCarte.AngleRotation = 180
      			EndTimer(nTimer)
      		END
Related Examples:
WD Extended Map Training (WINDEV): WD Extended Map
[ + ] This example shows the different features of the Map control in desktop (Windows) and mobile (Android, iOS) devices
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/01/2025

Send a report | Local help