Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Browsers allowing the geolocation
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Asks to be regularly notified about the current device position.
Versions 16 and later
WEBDEV - Browser code This function is now available in Browser code.
New in version 16
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code This function is now available in Browser code.
Versions 22 and later
Windows This function is now available for WINDEV applications.
New in version 22
Windows This function is now available for WINDEV applications.
Windows This function is now available for WINDEV applications.
// Branche une procédure pour recevoir régulièrement la position du périphérique
// Procédure
PROCÉDURE ProcDeplacement(pos is géoPosition)
Info(" Latitude: " + pos.Latitude)  
Info(" Longitude: " + pos.Longitude)
WEBDEV - Browser code

Enabling the notification mechanism in browser code Hide the details

GPSFollowMovement(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of WLanguage procedure called at each notification. This procedure has the following format:
PROCEDURE <Nom de la Procédure>(<Position>, <Erreur>)
  • <Position> is a geoPosition variable containing information about the device position at the time of notification. To find out whether the Speed, Accuracy, Direction or Altitude properties of a geoPosition variable have been filled when retrieving the position, use SpeedValid, AccuracyValid, DirectionValid and AltitudeValid.
  • <Error> is an Integer constant corresponding to the error code and that can take the following values:
    gpsErrorOKNo error was detected.
    gpsErrorRightsThe browser has no sufficient rights to use geolocation.
    gpsErrorPositionUnable to define the position (internal error of provider for example).
    gpsErrorTimeoutThe position could not be retrieved within the timeout.

Disabling the notification mechanism

WEBDEV - Browser code

Browsers allowing the geolocation

Caution: Geolocation is only available on certain modern browsers:
  • FireFox from version 3.5,
  • Chrome from version 5.0.342.1,
  • Opera from version 10.6,
  • Safari from version 5.0.
During the call to a geolocation function, the browser requests a location authorization.Remark: From Chrome 50 (including on Android), GPSFollowMovement can only be used on the sites secured via an SSL certificate for example. If the site is not secured, the function returns a result that cannot be used. During the test in local (localhost), the function operates properly.
Related Examples:
Android GPS Android (WINDEV Mobile): Android GPS
[ + ] This example presents the use of the GPS functions of WLanguage in an Android application.
It is used to retrieve at regular interval:
- The latitude
- The longitude
- The altitude
- The speed
- The direction
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
Component: wd260java.dll
Minimum version required
  • Version 15
This page is also available for…
GPS Functions

10 Nov. 2018