With the Automation drawing API , you can add placemarks, paths, and polygons in ArcGIS Earth. The drawing can contain geometry and a symbol. Add a drawing to ArcGIS Earth that will return the drawing ID. Drawings will be saved in the My Drawings folder in the table of contents once it is successfully added, and you can manage and update them in ArcGIS Earth.
Request URL
<baseUrl>/arcgisearth/Drawings(POST only)
Request parameters
Parameter | Description |
---|---|
ID (optional) | Specifies the ID of a drawing. Type: string |
visible (optional) | Indicates if the drawing is visible in the table of contents. |
title (optional) | The title for the drawing. |
geometry (required) | The position and geometry type of a drawing. It defines the JSON formats of the geometry and spatial reference objects. Supports point, polyline, and polygon geometry. Point parameters:
JSON syntax: Polyline parameters:
JSON syntax: Polygon parameters:
JSON syntax: |
symbol (optional) | The symbol for the drawing. Choosing a symbol for a drawing depends on the geometry type of the drawing.
|
labelSymbol (optional) | The label text symbol is used to add a label to a point drawing.
JSON syntax: |
Example usage
The following is a sample input for adding a point drawing:
{
"id": "4b75ea4a-e10f-d676-307d-aa945e2a0712",
"visible": true,
"title": "addPoint",
"geometry": {
"x": -100,
"y": 40,
"spatialReference": {"wkid": 4326}
},
"symbol": {
"type": "picture-marker",
"url":"https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png",
"size": "64px"
},
"labelSymbol":{
"type":"text",
"color": [76,115,0,255],
"size":12
}
}
The following is a sample input for adding a line drawing:
{
"id": "4b75ea4a-e10f-d676-307d-aa945e2a071922",
"visible": true,
"title": "addLine",
"geometry": {
"paths": [
[
-118,
34
],
[
-100,
40
],
[
-82,
34
]
],
"spatialReference": {"wkid": 4326}
},
"symbol": {
"type": "simple-line",
"color": "#33cc33",
"width": "2px"
}
}
The following is a sample input for adding a polygon drawing:
{
"id": " 4b75ea4a-e10f-d676-307d-aa945e2a0719",
"visible": true,
"title": "addPolygon",
"geometry": {
"rings": [[
[-96.06138,32.837],
[-97.06133,34.836],
[-98.06124,34.834],
[-97.06127,32.832],
[-97.06138,32.837]
]],
"spatialReference": {"wkid": 4326}
},
"symbol": {
"type": "simple-fill",
"color": [76,115,0,255],
"outline": {
"color": [110,110,110,255],
"width": 1
}
}
}
JSON Response example
The following is a JSON response example for adding a drawing:
{
"id": "4b75ea4a-e10f-d676-307d-aa945e2a0712",
"result": "Success"
}