Create a graphics layer

Graphics layers allow you to dynamically display graphics on a map. A graphics layer contains one or more graphic features. It could, for example, be used to hold polygons or lines drawn by a user or display features that satisfy the results of a task such as query or geoprocessing.

Add a graphics layer

The graphics layer contains graphics that are displayed on the map. Each graphic is nested within the GraphicsLayer component and must contain the following:

  • A symbol that defines how the graphic is presented
  • A geometry that represents where the graphic is displayed
GraphicsLayer {
    id: myGraphicsLayer
    Graphic {
        id: redCircle
        geometry: Point {
            json: {"spatialReference":{"latestWkid":3857,"wkid":102100}, "x": 9000000, "y": 6000000 }
        symbol: SimpleMarkerSymbol {
            style: Enums.SimpleMarkerSymbolStyleCircle
            color: "red"
            size: 24

In this topic
  1. Add a graphics layer