Places.Coordinates Class
Create a Places.Coordinates object from some data
Constructor
Places.Coordinates
-
data
-
[callback]
Parameters:
-
data
Object | Streams.Stream\Places.CoordinatesCan be a stream with attributes, or object with properties, which can include either ("latitude" and "longitude") together, or ("address") or ("userId" with optional "streamName"). It can additionally specify "heading" and "speed".
-
updatedKey
StringIf data is a stream, then set this to a string or Q.Tool to subscribe to the "Places/location/updated" message for location updates.
-
latitude
NumberUsed together with latitude
-
longitude
NumberUsed together with longitude
-
heading
NumberUsed to set heading, in clockwise degrees from true north
-
speed
NumberHorizontal component of the velocity in meters-per-second
-
[platform=Places.options.platform]
String optional -
[address]
String optionalThis would be geocoded by the platform
-
[placeId]
String optionalA google placeId, if the platform is 'google'
-
[userId]
String optionalCan be used to indicate a specific user
-
[streamName="Places/user/location"]
String optionalName of a stream published by the user
-
-
[callback]
Function optionalCalled after latitude and longitude are available (may do geocoding with the platform to obtain them if they're not available yet). The first parameter is an error string, if any. Next is an array of platform-specific Result objects. The "this" object is the Coordinates object itself, containing the latitude and longitude from the main result.
Returns:
Item Index
Methods
- geocode static
Methods
geocode
-
callback
-
[options]
Obtain geocoding definition from a geocoding service