Update Graphic

Update an existing graphic in ArcGIS Earth.

Request URL

<baseUrl>/arcgisearth/graphics(PATCH only)

Request parameters

ParameterDescription

ID

(required)

Specifies the ID of a graphic.

Type: string

geometry

(optional)

The position and geometry type of graphic. It defines the JSON formats of the geometry and spatial reference objects. Support point and polyline geometry.

Point parameters:

  • type
    • The geometry type.
    • Possible values: "point"
    • Type: string
  • x
    • x-coordinate measured along the east–west axis.
    • Type: double
  • y
    • y-coordinate measured along the north–south axis.
    • Type: double
  • latitude
    • The latitude of the point.
    • Type: double
  • longitude
    • The longitude of the point.
    • Type: double
  • spatialReference

JSON syntax:

{ 
    "type": <type>, 
    "x": <x>, 
    "y": <y>, 
    "spatialReference": { 
        <spatialReference> 
    } 
}

Polyline parameters:

  • type
    • The geometry type.
    • Possible values: "polyline"
    • Type: string
  • paths
    • An array of paths, or line segments, that make up the polyline. Only for polyline type geometry.
    • Type: number[][][]
  • spatialReference

JSON syntax:

{ 
    "type":<type>, 
    "paths": [
        [<x11>, <y11>, <z11>],
        ...,
        [<x1N>,<y1N>, <z1N>]
    ],  
    "spatialReference":{ 
            <spatialReference> 
      } 
}

Polygon parameters:

  • type
    • The geometry type. The first vertex of each ring should always be the same as the last vertex.
    • Possible values: "polygon"
    • Type: string
  • rings
    • An array of rings.
    • Type: number[][][]
  • spatialReference

JSON syntax:

{ 
    "type":<type>, 
       "rings": [ 
            [<x11>, <y11>, <z11>], 
            …,
            [<x1N>, <y1N>, <z1N>] 
         ], 
     "spatialReference":{
        <spatialReference> 
    } 
}

symbol

(optional)

The symbol for the graphic. Choosing a symbol for a graphic depends on the geometry type of the graphic.

Type: double

  • type
    • The symbol type.
    • Possible Values: "picture-marker"| "simple-line"| "simple-fill"
    • Type: string
  • url
    • Specifies the URL or path of a PictureMarkerSymbol. Only for PictureMarkerSymbol.
    • Type: string
  • width
    • The width of the line symbol.
    • Type: number
  • height
    • The height of the image in points. Only for PictureMarkerSymbol.
    • Type: number
  • angle
    • The angle of the marker relative to the screen in degrees. Only for PictureMarkerSymbol.
    • Type: number
  • xoffset
    • The offset on the x-axis in points. Only for PictureMarkerSymbol.
    • Type: number
  • color
    • The color of the symbol.
    • Type: color
Note:

At least one of the geometry and symbol parameters is needed to update the graphic.

Example usage

A sample input for updating a point graphic in ArcGIS Earth:

{
    "id":"point-picture-marker-graphic",
    "geometry":{
        "type":"point",
        "x":-100,
        "y":40
    },
    "symbol":{
        "type":"picture-marker",
        "url":"https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png",
        "width":"128px",
        "height":"128px",
        "angle":0,
        "xoffset":"10px",
        "yoffset":"10px"
    }
}

A sample input for updating a line graphic in ArcGIS Earth:

{
    "id":"polyline-simple-line-graphic",
    "geometry":{
        "type":"polyline",
        "paths":[
            [
                -118,
                34
            ],
            [
                -100,
                40
            ],
            [
                -82,
                34
            ]
        ]
    },
    "symbol":{
        "type":"simple-line",
        "color":"#000000",
        "width":"24px"
    }
}