Class: GeoPoint

apy.helpers. GeoPoint


new GeoPoint(value)

Point interface implements type & coordinates props.

Parameters:
Name Type Description
value apy.helpers.GeoPoint | Object

An Object representing Point

Example
var point = new GeoPoint(['1.2255', '41.2258']);

console.log(point.coordinates) // [1.2255, 41.2258]
console.log(point.cleanedData()) // {'type': 'Point', coordinates: [1.2255, 41.2258]}

Methods


<static> GeoPoint#clean()

Clean value by ensuring their proper type (float or integer)


<static> GeoPoint#cleanedData()

Get cleaned data

Format: {type: string, coordinates: Array}

Returns:

An Object representing a Point (GeoJSON)

Type
Object