PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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 geographic positions via WLanguage geolocation functions. A geographic position is defined by a latitude, a longitude and a measurement date. It can also include information on altitude, speed, direction and/or measurement accuracy.
The geoPosition type is used to define the advanced characteristics of a geographic position. The characteristics of this position can be defined and modified using different WLanguage properties.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Versions 16 and later
Windows Mobile This type of variable is now available for Windows Mobile applications.
New in version 16
Windows Mobile This type of variable is now available for Windows Mobile applications.
Windows Mobile This type of variable is now available for Windows Mobile applications.
Versions 17 and later
Universal Windows 10 App This type of variable is now available for Windows Phone applications.
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
New in version 17
Universal Windows 10 App This type of variable is now available for Windows Phone applications.
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
Universal Windows 10 App This type of variable is now available for Windows Phone applications.
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
Versions 20 and later
Ajax This type of variable is now available for sites in Windows and Linux.
PHP This type of variable is now available for PHP sites.
New in version 20
Ajax This type of variable is now available for sites in Windows and Linux.
PHP This type of variable is now available for PHP sites.
Ajax This type of variable is now available for sites in Windows and Linux.
PHP This type of variable is now available for PHP sites.
Versions 21 and later
Universal Windows 10 App This type of variable is now available for applications in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available for applications in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available for applications in Universal Windows 10 App mode.
Example
pos1 is géoPosition
pos1.Latitude = 1.442951
pos1.Longitude = 43.604363
 
pos2 is géoPosition
pos2.Latitude = 2.505874
pos2.Longitude = 50.458744
 
InfoBuild("The distance between the two positions is %1 meters", géoDistance(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 supported by the location provider.
AltitudeValidBooleanTrue if the current location contains valid altitude information.
Altitude is considered valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the location provider.
AltitudeValid is accessible in read-only mode.
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.
DirectionRealMoving direction of the device (in degrees East of true North).
Remarks:
  • The value of Direction is taken into account unless the device moves too slowly.
  • This property is specified only when it is supported by the location provider.
DirectionValidBooleanTrue if the current location contains valid direction information.
Direction is considered valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the location provider.
DirectionValid is accessible in read-only mode.
LatitudeRealLatitude of the position (in degrees).
Possible values range from -90° (South Pole) to +90° (North Pole).
LongitudeRealLongitude of the position (in degrees).
Possible values range from -180° (West longitude) to +180° (East longitude) relative 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 location.
PositionValid is accessible in read-only mode.
AccuracyRealAccuracy of measurement (in meters).
This property is specified only when it is supported by the location provider.
Versions 26 and later
This property was renamed in version 26. "Accuracy" is kept for backward compatibility.
New in version 26
This property was renamed in version 26. "Accuracy" is kept for backward compatibility.
This property was renamed in version 26. "Accuracy" is kept for backward compatibility.
AccuracyValidBooleanTrue if the current location contains valid accuracy information.
Accuracy is considered valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the location provider.
AccuracyValid is accessible in read-only mode.
SpeedRealGround speed of the moving device (in meters/second).
This property is specified only when it is supported by the location provider.
SpeedValidBooleanTrue if the current location contains valid speed information.
Speed is considered valid in the following cases:
  • it was assigned by programming.
  • it was initialized by the location provider.
SpeedValid is accessible in read-only mode.

Functions that use the geoPosition variables

Versions 15 and later
geoAzimuth
New in version 15
geoAzimuth
geoAzimuth
Returns the direction represented by a location in relation to another one.
Versions 15 and later
geoDistance
New in version 15
geoDistance
geoDistance
Returns the distance between the two locations. This distance is expressed in meters by default.
Versions 17 and later
geoRunApp
New in version 17
geoRunApp
geoRunApp
Starts the device's native maps application to display:
  • a specific geographical location,
  • a route between two locations.
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

You can use VariableReset to reinitialize the content of a geoPosition variable.
Related Examples:
WM Geolocation Cross-platform examples (WINDEV Mobile): WM Geolocation
[ + ] This example explains how to perform proximity searches with geolocation :
- 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 version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment