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 application feature
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Asks to be notified when the device gets close to a given location.
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
// Active la demande de notification
GPSDetectPosition(ProcDétection, 1.145258, 30.968745)
// Procédure appelée lors de la notification
PROCÉDURE ProcDétection(Entrée is boolean)
IF Entrée = True THEN
Info("Vous êtes arrivé à destination.")
END
Syntax
<Result> = GPSDetectPosition(<WLanguage procedure> , <Latitude> , <Longitude> [, <Radius> [, <Timeout>]])
<Result>: Integer
Detection identifier.
This identifier is used in the following cases:
  • to stop the notification mechanism. Simply pass this identifier as a parameter to GPSStopDetection.
  • to identify the location processed in the WLanguage procedure called (case where the same WLanguage procedure is used to process several locations).
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback" procedure) called when the device enters into or exits from the region delimited by the specified parameters.
For more details on this procedure, see Parameters of the procedure used by GPSDetectPosition.
<Latitude>: Real
Latitude of the proximity location.
<Longitude>: Real
Longitude of the proximity location.
<Radius>: Optional real
Radius (in meters), around the proximity location, from which the notification is to be generated.
If this parameter is not specified, the radius around the location will be set to 50 meters.
<Timeout>: Optional integer or optional Duration
Timeout (in hundredths of a second) of the proximity alert. This timeout starts from the call to the function.
  • No timeout will be defined if this parameter is set to -1 or if it is not specified.
  • If this timeout is specified, the notification mechanism will automatically stop at the end of the timeout.
This parameter can correspond to:
  • an integer corresponding to the number of hundredths of a second,
  • a Duration variable,
  • Versions 23 and later
    the duration in a readable format (e.g., 1 s or 10 ms).
    New in version 23
    the duration in a readable format (e.g., 1 s or 10 ms).
    the duration in a readable format (e.g., 1 s or 10 ms).
Remarks

Special cases

  • To stop receiving notifications, use GPSEnd.
  • To stop detecting the proximity of a specific location;
    • return False in the associated WLanguage procedure,
    • use the GPSStopDetection function.
  • You can detect the proximity to multiple locations by calling GPSDetectPosition for each location. If the same procedure is called for several locations, it is possible to differentiate these locations in the WLanguage procedure with the <Detection identifier> parameter. This parameter corresponds to the result of GPSDetectPosition.
  • Location measurements can be more or less accurate depending on the parameters of the location 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.
Versions 21 and later
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.
New in version 21
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.
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.
Business / UI classification: Business Logic
Component: wd270java.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment