Defining a Geo Point

Defining a Geo Point

In JavaScript, you can define a Geo Point in two different ways: as a new instance of the Everlive.GeoPoint() class or as an object.

A Geo Point can be described in several ways:

//Recommended:
Location = new Everlive.GeoPoint(30 /* longitude */, 50 /* latitude */);
//Optional:
//An object with longitude and latitude properties
//The property order is important
Location = {
    longitude: 30,
    latitude: 50
}

Most of the query functions for geo points accept an array of two numbers for a valid representation of a GeoPoint. This is done for convenience. Internally these arrays are converted to Everlive.GeoPoint instances. The first number in the arrays must be the value of the longitude and the second one must be the latitude.

The bounds for the longitude in the GeoPoint are [-180, 180) and for latitude are [-90, 90].

NOTE: While these are the possible values, the valid values for latitude on spherical coordinate system are between -90° and 90°.

The no point value for a GeoPoint field is null.

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.