Spatial Location Lookup REST Call


The EasyTerritory Feature Service is a REST endpoint that provides information about the territories in your EasyTerritory project.  For instance, a developer could make a query and retreive information on a territory that a specific point falls in.  Here is a list of the different parameters and options of this REST endpoint.

Follow these simple steps.

  • Authenticate with EasyTerritory and receive an ‘oitoken’.
  • Make sure to set the ‘oitoken’ as a cookie and make a GET method call to the EasyTerritory Features endpoint:
  •{yourGuid}/MDN/rest/9.0/Map/{MapID}/Features/{LayerID}/WKT/{wkt or POST wkt}
  • Code sample:
  •  document.cookie= "oitoken=stringValue";
         url: "{yourGuid}/MDN/rest/9.0/map/EasyTerritory/Features/ProjectMarkupPolygons/WKT/POINT(-87.869591%2041.813992)?Format=JSON&ReturnShapes=0&ReturnTypes=0&Fields=Col1,Col2,Col3&EPSG=4326",
         type: "GET",
         contentType: "application/json",
         xhrFields: {
             withCredentials: true

Below is a list of parameters and different options you can use to query the EasyTerritory Features endpoint.


Name Format Description
MapID ID of the map to query. Always ‘EasyTerritory’ for cloud-hosted
LayerID ID of the layer to query. ProjectMarkup
WKT Example: POINT(-87.869591%2041.813992) WKT of the geometry to filter by.


Name Format Description
Format {format} JSON or XML Denotes the desired return type.
ReturnShapes {0|1(bool)} Specifies whether to return shapes with the feature
Fields {field} repeatable Denotes which fields on the features to get or post.
EPSG {SRID} EPSG number for the projection in which data should be processed.
BleedRatio {float} range 1.0 to 2.0 How far to look in other tiles for features on the current tile.
ClipToRenderBounds {0|1(bool)} Specifies whether returned shapes returned should be clipped to the bounding box of the filter.
UnitsPerPixel {float} greater than 0.0 Tolerance with which to simplify shapes, typically the units per pixel of the map display.
Where {escaped SQL where clause} Where clause to append to the server where clause.
MaxRows {int} greater than 0 Number of records to return.
FilterOp {operation} Intersects/Contains/NotIntersects/NotContains Spatial filter operations
buffer {float} greater than 0.0 Shape buffer distance in map units.
KeyWord {string} one of All, Distinct, Min, Max, Count, Quantile, Interval, MinMax Default is ALL; all others are aggregation choices. Quantile or Interval return a row for each Quantile or Interval break. MinMax returns a row with min and max values. Many of these are only implemented for database stores.
KWDetail {int} greater than 1 The number of breaks to compute when using the Quantile or Interval KeyWords.
ReturnTypes {0|1(bool)} Specifies whether to return the .Net type for each field.