PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Special cases
  • Required permissions
  • Required application feature
  • Browsers allowing the geolocation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Retrieves the information about the last known location of the device.
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 17 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
Universal Windows 10 App This function is now available for Windows Phone applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
WINDEVWindows This function is now available for WINDEV applications.
New in version 22
WINDEVWindows This function is now available for WINDEV applications.
WINDEVWindows This function is now available for WINDEV applications.
Example
pos is geoPosition
pos = GPSLastPosition()
IF ErrorOccurred = False THEN
Info(" Latitude: " + pos.Latitude)  
Info(" Longitude: " + pos.Longitude)  
END
Syntax
<Result> = GPSLastPosition()
<Result>: geoPosition variable
Name of 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.
Remarks

Special cases

  • 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.
  • AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App To reinitialize a geoPosition variable, use VariableReset.
  • AndroidAndroid Widget iPhone/iPad We advise you to initialize the parameters of location provider with GPSInitParameter before retrieving a position.
  • The positioning information that was retrieved corresponds to the last known device position: therefore, they may not correspond to the current device position if the device was moved while the GPS signal was not valid for example.
    AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App To find out the date and time at which the position was calculated, use the MeasurementDate property of geoPosition variable.
  • AndroidAndroid Widget iPhone/iPad Speed, Accuracy, Direction and Altitude will be specified only if the location provider allows it (otherwise, these properties will take their default value). The location provider can be configured by GPSInitParameter.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: ACCESS_FINE_LOCATION.
Android 10 specific case: Android 10 has implemented a new permission for the functions that allow locating the device: ACCESS_BACKGROUND_LOCATION.
This permission allows using the function when the application is in the background.
When this permission is added to the application, a window allows the user to:
  • allow access to the device location while the application is in the background,
  • allow access to the location only while the application is in use,
  • deny access to the location.
The user can also change these permissions at any time in the Android settings.
Versions 21 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of one application feature 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.
New in version 21
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of one application feature 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.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of one application feature 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.
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.
Component : wd260java.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment