Label Points



The labelPoints operation was added at 9.3 SP1.

The labelPoints operation is performed on a geometry service resource. The labelPoints operation calculates an interior point for each polygon specified in the input array. These interior points can be used by clients for labeling the polygons.

At 10.1 and later, this operation calls simplify on the input polygons.

You can provide arguments to the labelPoints operation as query parameters defined in the following parameters table:

Request parameters




Description:  (Optional) The response format. The default response format is html.
Values:   html | json


Description: The array of polygons whose label points are to be computed. The spatial reference of the polygons is specified by sr. The structure of each polygon in the array is the same as the structure of the JSON polygon objects returned by the ArcGIS REST API.

JSON structures:


[ <polygon1>, <polygon2>, ..., <polygonN> ]


  "rings" : [
  "rings" : [

URL based:

For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The expected format of the file's contents will be exactly the same as that expected if the polygons were directly embedded in the request.

Syntax: polygons={ "url" : "<URL to file>" }

Example: polygons={ "url" : "http://myserver/mygeometries/afile.txt" }


Description: The well-known ID of the spatial reference or a spatial reference JSON object for the input polygons. For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems.

Example usage

This example computes a label point within the input polygon.[{"rings":[[[-105,34],[-104,34],[-104,35],[-105,35],[-105,34]]]}]

JSON response syntax

"labelPoints": [ <point1>, <point2>, ..., <pointN> ]

JSON response example

{"labelPoints": [{
 "x": -104.49999999999994,
 "y": 34.50000000000006