FRAMES | NO FRAMES Description | Parameters | Examples | Response
Label Points (Operation)
URL http://<geometryservice-url>/labelPoints
Parent Resource Geometry Service

Note: The Label Points operation was added at 9.3 SP1.


The labelPoints operation is performed on a geometry service resource. This 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.

You can provide arguments to the labelPoints operation as query parameters defined in the parameters table below.


Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
polygons 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 same as the structure of the JSON polygon objects returned by the ArcGIS REST API.

Syntax and Examples:

JSON Structures:



  "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.

Syntax: polygons={ "url" : "<URL to file>" }
Example: polygons={ "url" : "http://myserver/mygeometries/afile.txt" }

sr 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

Example 1: This example computes a label point within the input polygon:

JSON Response Syntax

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

JSON Response Example

"labelPoints": [
  { "x": -116.5, "y": 33.75 },
  { "x": 31.3, "y": 17.29 }