|
|
|
|
|
- Properties specific to geoPosition variables
- Functions that use geoPosition variables
- Reinitialization
geoPosition (Type of variable) In french: géoPosition
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 changed using different WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
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 geoPosition variables The following properties can be used to handle geoPosition variables: | | | Property name | Type used | Effect |
---|
Accuracy | Real | Accuracy of measurement (in meters). This property is specified only when it is supported by the location provider. This property was renamed in version 26. "Accuracy" is kept for backward compatibility. | AccuracyValid | Boolean | True 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. | Altitude | Real | Altitude of the position (in meters). This property is specified only when it is supported by the location provider. | AltitudeValid | Boolean | True 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. | Direction | Real | Moving 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.
| DirectionValid | Boolean | True 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. | Latitude | Real | Latitude of the position (in degrees). Possible values range from -90° (South Pole) to +90° (North Pole). | Longitude | Real | Longitude of the position (in degrees). Possible values range from -180° (West longitude) to +180° (East longitude) relative to the Greenwich Meridian. | MeasurementDate | DateTime variable or character string | Date 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. | PositionValid | Boolean | True if the latitude and/or the longitude have been specified for the current location. PositionValid is accessible in read-only mode. | Speed | Real | Ground speed of the moving device (in meters/second). This property is specified only when it is supported by the location provider. | SpeedValid | Boolean | True 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 geoPosition variables | | geoAzimuth | Returns the direction represented by a location in relation to another one. | geoDistance | Returns the distance between the two locations. This distance is expressed in meters by default. | geoRunApp | Starts the device's native maps application to display: - a specific geographical location,
- a route between two locations.
| GPSGetPosition | Retrieves information about the current device position. | GPSLastPosition | Retrieves the information about the last known device position. | MapGetPosition | Returns the geographical position of the point located in the center of the map currently displayed in a Map control. | MapInfoXY | Returns the geographical position (latitude and longitude) corresponding to a point in a Map control. |
Reinitialization You can use VariableReset to reset the content of a geoPosition variable.
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|