PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Special cases
  • 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
Asks to be notified when the device gets close to a given position.
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 the WINDEV applications.
New in version 22
WINDEVWindows This function is now available for the WINDEV applications.
WINDEVWindows This function is now available for the WINDEV applications.
Example
// Enables the request for notification
GPSDetectPosition(DetectionProc, 1.145258, 30.968745)
// Procedure called during the notification
PROCEDURE DetectionProc(Enter is boolean)
IF Enter = True THEN
Info("You have reached your destination.")
END
Syntax
<Result> = GPSDetectPosition(<Procedure Name> , <Latitude> , <Longitude> [, <Radius> [, <TimeOut>]])
<Result>: Integer
Identifier of detection. This identifier can be passed in parameter to GPSStopDetection to interrupt the notification mechanism.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure ("callback" procedure) called when the device enters into or exits from the region delimited by the specified parameters.
This procedure has the following format:
PROCEDURE <Procedure Name>(<Enter>, <Detection Identifier>)
  • <Enter> is a boolean set to True if the device enters into the region defined by the specified parameters and it is set to False if it exits from the region.
  • <Detection Identifier> is an integer corresponding to the value returned by GPSDetectPosition. This identifier is used to differentiate between the detected positions when the same procedure is used to detect several positions.
If this procedure returns False, the detection of specified position will be stopped.
<Latitude>: Real
Latitude of position whose proximity will be detected.
<Longitude>: Real
Longitude of position whose proximity will be detected.
<Radius>: Optional real
Radius (in meters) around the position whose proximity must be detected from which we want to be notified.
If this parameter is not specified, the radius around the position will be set to 50 meters.
<TimeOut>: Optional integer or optional Duration
Time-out (in hundredths of a second) of the proximity alert. This time-out starts from the call to the function.
  • No time-out will be defined if this parameter is set to -1 or if it is not specified.
  • If this time-out is specified, the notification mechanism will automatically stop at the end of the time-out.
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).
Remarks

Special cases

  • To stop receiving notifications, use GPSEnd.
  • To stop detecting the proximity of a specific position, return False in the associated procedure or use GPSStopDetection.
  • You can detect the proximity of several positions by calling GPSDetectPosition for each one of the positions. If the same procedure is called for several positions, you can differentiate between these positions by specifying a different value for the <Additional Parameter> parameter passed to the procedure.
  • The position measurements can be more or less precise depending on the parameters of the localization provider. Therefore, it may happen that no notification is sent if the device briefly passes near the monitored area. Similarly, a notification may be received if the device comes very close to the monitored area without entering it.
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: Geo-localization
This feature allows the applications to access the geo-localization 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: Geo-localization
This feature allows the applications to access the geo-localization 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: Geo-localization
This feature allows the applications to access the geo-localization features found on the device or on the computer.
Components
WINDEV wd230java.dll
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
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
Nov. 10 2018