PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Managing locks
  • Retrieved properties
  • Operating mode in iPhone/iPad
  • Required permissions
  • Required application feature
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 information about the current device position.
Versions 17 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App GPSGetPosition must be run in a thread.
New in version 17
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App GPSGetPosition must be run in a thread.
Universal Windows 10 App This function is now available for the Windows Phone applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App GPSGetPosition must be run in a thread.
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.
Example
MyPosition is geoPosition
MyPosition = GPSGetPosition()
// Checks the position validity with ErrorOccurred
IF ErrorOccurred THEN RETURN
Info(" Latitude : " + MyPosition..Latitude) 
Info(" Longitude : " + MyPosition..Longitude)
Syntax
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Retrieving information about a device (mobile, ...) Hide the details

<Result> = GPSGetPosition([<Timeout> [, <Message>]])
<Result>: geoPosition variable
geoPosition variable containing information about the device position. If the position is invalid, the ErrorOccurred variable is set to True and the error details are returned by ErrorInfo.
Android The ..PositionValid property of geoPosition type is used to find out whether the position is valid.
<Timeout>: Optional integer or optional Duration
Maximum timeout (in hundredths of a second) for updating the device position.
  • An error occurs if the timeout ends before the position of the device is updated. This error can be detected by the ErrorOccurred variable and the error details can be returned by ErrorInfo.
  • If this parameter is not specified, the timeout is set to 1 minute.
Note: This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s or 10 ms for example).
    New in version 23
    the direct indication of duration (1 s or 10 ms for example).
    the direct indication of duration (1 s or 10 ms for example).
<Message>: Optional character string (with quotes)
Message of hourglass displayed when updating the position.
Note: This parameter is taken into account only if the call is performed in the main application thread.
Universal Windows 10 App This parameter is ignored.
Remarks

Managing locks

GPSGetPosition is a locking function until the current device position was retrieved or until the timeout defined by the <Timeout> parameter has expired.
If the function is called in the main thread of the application, an hourglass will be displayed during the function execution. The message displayed by the hourglass can be specified via the <Message> parameter.
Otherwise, the execution of secondary thread will be locked during the function execution and no hourglass will be displayed.
Note: To find out the last known device position without timeout, use GPSLastPosition. Caution, the positioning information that was retrieved may not correspond to the current device position if the device was moved while the GPS signal was not valid for example. To find out the date and time at which the position was calculated, use the ..MeasurementDate property of the geoPosition variable.
AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App

Retrieved properties

Versions 17 and later
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
New in version 17
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
iPhone/iPad

Operating mode in iPhone/iPad

During the first startup of a GPS function, the system asks the user for the authorization to perform a geo-localization. If the user refuses, all the GPS functions used in the rest of the application will fail (fatal error).
To re-allow the use of GPS for this application, the system configuration of the application must be modified.
AndroidAndroid Widget

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: ACCESS_FINE_LOCATION.
Versions 21 and later
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of an application feature in the wizard for generating the application.
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 an application feature in the wizard for generating the application.
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 an application feature in the wizard for generating the application.
Required feature: Geolocation
This feature allows the applications to access the geolocation features found on the device or on the computer.
Component : wd240java.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Video GpsGetPosition
https://youtu.be/4MqAx_qiFts

https://windevdesenvolvimento.blogspot.com/2019/01/dicas-1987-windev-mobile-dicas-14.html
amarildo
16 Jan. 2019
GPS Functions
https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/519-busca-endereco-rota-endereco-das-coordendas-523/read.awp?hl=enderecodascoordenadas

https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/2875-informatica-exemplo-google-maps-com-json-retornando-distancia/read.awp?lastview
BOLLER
10 Nov. 2018
Video Trajeto Mapa
https://youtu.be/bSk0ysOlacE
amarildo
03 Nov. 2018