The Telerik Platform product is retired.Learn more

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:

Location = new Everlive.GeoPoint(30 /* longitude */, 50 /* latitude */);
//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.

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.