Help / WLanguage / WLanguage functions / Standard functions / Geolocation functions
  • Special cases
  • Required application feature
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Retrieves the information about the last known location of the device.
pos is geoPosition
pos = GPSLastPosition()
IF ErrorOccurred = False THEN
Info(" Latitude: " + pos.Latitude)  
Info(" Longitude: " + pos.Longitude)  
<Result> = GPSLastPosition()
<Result>: geoPosition variable
Name of the geoPosition variable. This variable contains the information about the last known device position. To find out whether the position failed to be retrieved, use the ErrorOccurred variable.

Special cases

  • To determine if a value was assigned to the Speed, Accuracy, Direction or Altitude properties of a geoPosition variable when the location was retrieved, use the SpeedValid, AccuracyValid, DirectionValid and AltitudeValid properties.
  • Universal Windows 10 App To reinitialize a geoPosition variable, use VariableReset.
  • The positioning information that was retrieved corresponds to the last known device location: therefore, they may not correspond to the current device location if the device was moved while the GPS signal was not valid for example.
    Universal Windows 10 App You can use the MeasurementDate property of the geoPosition variable to determine the date and time at which the position was calculated.
Universal Windows 10 App

Required application feature

When this function is used, an application feature is declared in the application generation wizard.
Required feature: Geolocation
This feature allows the applications to access the geolocation features found on the device or on the computer.
Component: wd290java.dll
Minimum version required
  • Version 15
This page is also available for…
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help