Skip To Content ArcGIS for Developers Sign In Dashboard

ArcGIS Runtime SDK for Qt

Simple marker symbol

Sample Viewer View Sample on GitHub

Show a simple marker symbol on a map.

Use case

Customize the appearance of a point suitable for the data. For example, a point on the map styled with a circle could represent a drilled borehole location, whereas a cross could represent the location of an old coal mine shaft.

How to use the sample

The sample loads with a predefined simple marker symbol, set as a red circle.

How it works

  1. Create a GraphicsOverlay and add a Graphic to it.
  2. The Graphic sets a Point geometry and a red circle SimpleMarkerSymbol.

Relevant API

  • Graphic
  • GraphicsOverlay
  • Point
  • SimpleMarkerSymbol


SimpleMarkerSymbol, symbol

Sample Code

import QtQuick 2.6
import Esri.ArcGISRuntime 100.9

Rectangle {
    clip: true
    width: 800
    height: 600

    // Map view UI presentation at top
    MapView {

        anchors.fill: parent

        Map {
            BasemapImagery {}

            // create initial viewpoint
            ViewpointCenter {
                targetScale: 7500

                Point {
                    x: -226773
                    y: 6550477
                    spatialReference: SpatialReference { wkid: 3857 }

        // create a new GraphicsOverlay for the MapView
        GraphicsOverlay {

            // add graphic to overlay
            Graphic {

                // define position of graphic
                Point {
                    x: -226773
                    y: 6550477
                    spatialReference: SpatialReference { wkid: 3857 }

                // set graphic to be rendered as a red circle symbol
                SimpleMarkerSymbol {
                    style: Enums.SimpleMarkerSymbolStyleCircle
                    color: "red"
                    size: 12