Simple marker symbol

View on GitHub
Sample viewer app

Show a simple marker symbol on a map.

Image of simple marker symbol

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 SimpleMarkerSymbol.
  2. Create a Graphic passing in a Point and the simple marker symbol as parameters.
  3. Add the graphic to the graphics overlay with graphicsOverlay.getGraphics().add(graphic).

Relevant API

  • Graphic
  • GraphicsOverlay
  • Point
  • SimpleMarkerSymbol


symbol, visualization

Sample Code
/* Copyright 2016 ESRI
 * All rights reserved under the copyright laws of the United States
 * and applicable international laws, treaties, and conventions.
 * You may freely redistribute and use this sample code, with or
 * without modification, provided you include the original copyright
 * notice and use restrictions.
 * See the Sample code usage restrictions document for further information.

package com.esri.arcgisruntime.sample.simplemarkersymbol;

import android.os.Bundle;

import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
import com.esri.arcgisruntime.geometry.Point;
import com.esri.arcgisruntime.geometry.SpatialReferences;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.BasemapStyle;
import com.esri.arcgisruntime.mapping.Viewpoint;
import com.esri.arcgisruntime.mapping.view.Graphic;
import com.esri.arcgisruntime.mapping.view.GraphicsOverlay;
import com.esri.arcgisruntime.mapping.view.MapView;
import com.esri.arcgisruntime.symbology.SimpleMarkerSymbol;

public class MainActivity extends AppCompatActivity {

  private MapView mMapView;

  protected void onCreate(Bundle savedInstanceState) {

    // authentication with an API key or named user is required to access basemaps and other
    // location services

    // inflate MapView from layout
    mMapView = findViewById(;

    // create a map with the imagery basemap
    ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_IMAGERY);

    // set the map to be displayed in the mapview
    mMapView.setViewpoint(new Viewpoint(new Point(-226773, 6550477, SpatialReferences.getWebMercator()), 7500));

    // create a new graphics overlay and add it to the map view
    GraphicsOverlay graphicsOverlay = new GraphicsOverlay();

    //[DocRef: Name=Point graphic with symbol, Category=Fundamentals, Topic=Symbols and Renderers]
    //create a simple marker symbol
    SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.CIRCLE, Color.RED, 12);

    //add a new graphic with a new point geometry
    Point graphicPoint = new Point(-226773, 6550477, SpatialReferences.getWebMercator());
    Graphic graphic = new Graphic(graphicPoint, symbol);
    //[DocRef: END]


  protected void onPause() {
    // pause MapView

  protected void onResume() {
    // resume MapView

  protected void onDestroy() {
    // dispose MapView