The Telerik Platform product is retired.Learn more




whereQuery.withinPolygon(field, points)


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



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.


         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]);
Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.