Action: within

The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), rectangle (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.

Examples

Returns results within the circle defined by a center point at (43.765, -97.128) and a radius of 10 miles.
/:endpoint/within?p=43.765,-97.128&radius=10mi

Returns results within the rectangle defined by a top-left corner at (43.765, -97.128) and bottom-right corner at (41.89, -95.091).
/:endpoint/within?p=43.765,-97.128,41.89,-95.091

Returns results within the polygon (triangle) defined by points at (43.765, -97.128), (41.89, -95.091) and (40.775,-96.109).
/:endpoint/within?p=43.765,-97.128,41.89,-95.091,40.775,-96.1

Last modified: August 06, 2020