private void CreateOverlays()
{
// This function will create the overlays that show the user clicked location and the results of the
// viewshed analysis. Note: the overlays will not be populated with any graphics at this point
// Create renderer for input graphic. Set the size and color properties for the simple renderer
SimpleRenderer myInputRenderer = new SimpleRenderer()
{
Symbol = new SimpleMarkerSymbol()
{
Size = 15,
Color = Colors.Red
}
};
// Create overlay to where input graphic is shown
_inputOverlay = new GraphicsOverlay()
{
Renderer = myInputRenderer
};
// Create fill renderer for output of the viewshed analysis. Set the color property of the simple renderer
SimpleRenderer myResultRenderer = new SimpleRenderer()
{
Symbol = new SimpleFillSymbol()
{
Color = Color.FromArgb(100, 226, 119, 40)
}
};
// Create overlay to where viewshed analysis graphic is shown
_resultOverlay = new GraphicsOverlay()
{
Renderer = myResultRenderer
};
// Add the created overlays to the MapView
MyMapView.GraphicsOverlays.Add(_inputOverlay);
MyMapView.GraphicsOverlays.Add(_resultOverlay);
}