Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

whereQuery.withinPolygon

whereQuery.withinPolygon

Signature

whereQuery.withinPolygon(field, points)

Description

Adds a Geospatial condition that a specified geopoint must be within a specified coordinate polygon. The polygon is specified as an array of geopoints. The last point in the array is implicitly connected to the first point thus closing the shape. Applicable to GeoPoint fields only.

Return Type

WhereQuery

Parameters

Parameter Name Type Description
field string Field name containing a {GeoPoint} in the following format: (decimal_degrees_latitude,decimal_degrees_longitude), where decimal_degrees_latitude ranges from -90 to 90 and decimal_degrees_longitude ranges from -180 to 180. Example: (42.6954322,123.3239467)
points Array.<Everlive.GeoPoint> Comparison value in the form of an array of geopoints defining the polygon.

Example

         var point1 = new Everlive.GeoPoint(23.317871, 42.687709);
         var point2 = new Everlive.GeoPoint(42.698749, 42.698749);
         var point3 = new Everlive.GeoPoint(23.331346, 42.702282);

         var query = new Everlive.Query();
         query.where().withinPolygon("location", [point1, point2, point3]);
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.