@GPS_LOCATION

The GPS_LOCATION function returns the GPS location of the device’s current position, optionally based on a maximum age for the GPS data. This function can take a single optional parameter of type integral number treated as the maximum number of seconds for the GPS data. This function will return an invalid location value if the client device is not equipped with a GPS unit or if the GPS unit is not accessible to the client application.

If the maximum age of the GPS data available to the function exceeds the maximum age parameter provided to the function, the function will query the GPS unit for a current location. The function will set all components of the location data type, including the location value itself, as well as the number of satellites and precision as reported by the GPS unit.

Parameters

@GPS_LOCATION ([Max Age])
Max Age
Optional integral number parameter; specifies the maximum age in seconds of the GPS data for which a location should be returned. If this parameter is not provided, the function will return the most recent location.

Supported Return Types

Location