Simple marker symbol

View inAndroidFormsUWPWPFWinUIiOSView on GitHub

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(SimpleMarkerSymbol.Style, color, size).
  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.Graphics.Add(graphic).

Relevant API

  • Graphic
  • GraphicsOverlay
  • Point
  • SimpleMarkerSymbol

Tags

symbol

Sample Code

RenderSimpleMarkers.xamlRenderSimpleMarkers.xamlRenderSimpleMarkers.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGISRuntime.Samples.RenderSimpleMarkers.RenderSimpleMarkers"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
    </Grid>
</ContentPage>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.