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
<?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>