PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of geoPosition variables
  • Functions that use the geoPosition variables
  • Reinitialization
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
The geoPosition type is used to handle the geographic positions via the geo-localization functions of WLanguage. A geographic position is defined by a latitude, a longitude and a measurement date. It can also include information about the altitude or the speed, a direction and/or a measurement precision.
The geoPosition type is used to define the advanced characteristics of a geographic position. The characteristics of this position can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Versions 16 and later
WEBDEV - Browser code This type of variable is now available in Browser code.
Windows Mobile This type of variable is now available for the Windows Mobile applications.
WINDEVWindows This type of variable is now available in WINDEV.
New in version 16
WEBDEV - Browser code This type of variable is now available in Browser code.
Windows Mobile This type of variable is now available for the Windows Mobile applications.
WINDEVWindows This type of variable is now available in WINDEV.
WEBDEV - Browser code This type of variable is now available in Browser code.
Windows Mobile This type of variable is now available for the Windows Mobile applications.
WINDEVWindows This type of variable is now available in WINDEV.
Versions 17 and later
Universal Windows 10 App This type of variable is now available for the Windows Phone applications.
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
New in version 17
Universal Windows 10 App This type of variable is now available for the Windows Phone applications.
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
Universal Windows 10 App This type of variable is now available for the Windows Phone applications.
iPhone/iPad This type of variable is now available for the iPhone/iPad applications.
Versions 20 and later
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the sites in Windows and in Linux.
PHP This type of variable is now available for the PHP sites.
New in version 20
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the sites in Windows and in Linux.
PHP This type of variable is now available for the PHP sites.
WEBDEV - Server codeWindowsLinuxAjax This type of variable is now available for the sites in Windows and in Linux.
PHP This type of variable is now available for the PHP sites.
Versions 21 and later
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available for the applications in Universal Windows 10 App mode.
Example
pos1 is geoPosition
pos1..Latitude = 1.442951
pos1..Longitude = 43.604363

pos2 is geoPosition
pos2..Latitude = 2.505874
pos2..Longitude = 50.458744

InfoBuild("The distance between the two positions is equal to %1 meters", geoDistance(pos1, pos2))
Remarks

Properties specific to the description of geoPosition variables

The following properties can be used to handle a geoPosition variable:
Property nameType usedEffect
AltitudeRealAltitude of the position (in meters).
This property is specified only when it is taken into account by the localization provider.
AltitudeValidBooleanTrue if the current position contains a valid information about the altitude.
..Altitude is considered as being valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the localization provider.
..AltitudeValid is accessible in read-only.
MeasurementDateDateTime variable or character stringDate and time of the measurement. This date and this time correspond to the local time on the device. To get the time in UTC format, use DateTimeLocalToUTC.
Versions 16 and later
WEBDEV - Browser code This property is not filled.
New in version 16
WEBDEV - Browser code This property is not filled.
WEBDEV - Browser code This property is not filled.
DirectionRealMoving direction of the device (in degrees from the East starting form the geographical North).
Notes:
  • The value of ..Direction makes sense only if the device is moving with a non-negligible speed.
  • This property is specified only when it is taken into account by the localization provider.
DirectionValidBooleanTrue if the current position contains a valid information about the direction.
..Direction is considered as being valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the localization provider.
..DirectionValid is accessible in read-only.
LatitudeRealLatitude of the position (in degrees).
The possible values are included between -90° (South pole) and +90° (North pole).
LongitudeRealLongitude of the position (in degrees).
The possible values are included between -180° (West longitude) and +180° (East longitude) in relation to the Greenwich meridian.
Versions 17 and later
PositionValid
New in version 17
PositionValid
PositionValid
BooleanTrue if the latitude and/or the longitude have been specified for the current position.
..PositionValid is accessible in read-only.
PrecisionRealPrecision of the measurement (in meters).
This property is specified only when it is taken into account by the localization provider.
PrecisionValidBooleanTrue if the current position contains a valid information about the precision.
..Precision is considered as being valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the localization provider.
..PrecisionValid is accessible in read-only.
SpeedRealGround speed of the moving device (in meters/second).
This property is specified only when it is taken into account by the localization provider.
SpeedValidBooleanTrue if the current position contains a valid information about the speed.
..Speed is considered as being valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the localization provider.
..SpeedValid is accessible in read-only.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the geoPosition variables

Versions 15 and later
geoAzimuth
New in version 15
geoAzimuth
geoAzimuth
Returns the direction represented by a position in relation to another one.
Versions 15 and later
geoDistance
New in version 15
geoDistance
geoDistance
Returns the distance between the two positions. This distance is expressed in meters by default.
Versions 17 and later
geoRunApp
New in version 17
geoRunApp
geoRunApp
Starts the native mapping application of the device to display:
  • a specific geographical position,
  • an itinerary between two positions.
Versions 15 and later
GPSGetPosition
New in version 15
GPSGetPosition
GPSGetPosition
Retrieves information about the current device position.
Versions 15 and later
GPSLastPosition
New in version 15
GPSLastPosition
GPSLastPosition
Retrieves the information about the last known device position.
Versions 17 and later
MapGetPosition
New in version 17
MapGetPosition
MapGetPosition
Returns the geographical position of the point located in the center of the map currently displayed in a Map control.
Versions 17 and later
MapInfoXY
New in version 17
MapInfoXY
MapInfoXY
Returns the geographical position (latitude and longitude) corresponding to a point in a Map control.

Reinitialization

To reinitialize the content of a geoPosition variable, you have the ability to use VariableReset.
Related Examples:
WM Geo-localization Cross-platform examples (WINDEV Mobile): WM Geo-localization
[ + ] This example explains how to perform proximity searches with geolocalization:
- search around me
- search in a city, at a given address, or close to a specific address.
The results are displayed in a looper and in a map with markers.
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment