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
- Create a
SimpleMarkerSymbol(SimpleMarkerSymbol.Style, color, size)
. - Create a
Graphic
passing in aPoint
and the simple marker symbol as parameters. - Add the graphic to the graphics overlay with
graphicsOverlay.Graphics.Add(graphic)
.
Relevant API
- Graphic
- GraphicsOverlay
- Point
- SimpleMarkerSymbol
Tags
symbol
Sample Code
<UserControl
x:Class="ArcGIS.UWP.Samples.RenderSimpleMarkers.RenderSimpleMarkers"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<esriUI:MapView x:Name="MyMapView"/>
</Grid>
</UserControl>