Home Reference Source
public class | source

Geolocation

Geolocation

A model representing a latlong location in Skygear record.

Static Method Summary

Static Public Methods
public static

fromJSON(attrs: Object): *

Constructs a new Geolocation object from JSON object.

Constructor Summary

Public Constructor
public

constructor(latitude: Number, longitude: Number)

Constructs a new Geolocation object.

Member Summary

Public Members
public

latitude: Number

Latitude

public

longitude: Number

Longitude

Method Summary

Public Methods
public

toJSON(): Object

Serializes Geolocation to a JSON object.

Static Public Methods

public static fromJSON(attrs: Object): * source

Constructs a new Geolocation object from JSON object.

Params:

NameTypeAttributeDescription
attrs Object

the JSON object

attrs.$latitude Number

latitude of the location

attrs.$longitude Number

longitude of the location

Return:

*

Public Constructors

public constructor(latitude: Number, longitude: Number) source

Constructs a new Geolocation object.

Params:

NameTypeAttributeDescription
latitude Number

latitude of the location

longitude Number

longitude of the location

Public Members

public latitude: Number source

Latitude

public longitude: Number source

Longitude

Public Methods

public toJSON(): Object source

Serializes Geolocation to a JSON object.

Return:

Object

the JSON object