private void CreateLayout()
{
// Create a horizontal layout for the buttons at the top
var buttonLayout = new LinearLayout(this) { Orientation = Orientation.Horizontal };
// Create button to clear the map from the map view (start over)
var newMapButton = new Button(this);
newMapButton.Text = "New Map";
newMapButton.Click += OnNewMapClicked;
// Create button to show available basemap
var basemapButton = new Button(this);
basemapButton.Text = "Basemap";
basemapButton.Click += OnBasemapsClicked;
// Create a button to save the map
var saveMapButton = new Button(this);
saveMapButton.Text = "Save Map ...";
saveMapButton.Click += OnSaveMapClicked;
// Add new map, basemap, layers, and save buttons to the layout
buttonLayout.AddView(newMapButton);
buttonLayout.AddView(basemapButton);
buttonLayout.AddView(saveMapButton);
// Create a new vertical layout for the app (buttons followed by map view)
var mainLayout = new LinearLayout(this) { Orientation = Orientation.Vertical };
// Add the button layout
mainLayout.AddView(buttonLayout);
// Add the map view to the layout
_mapView = new MapView();
mainLayout.AddView(_mapView);
// Show the layout in the app
SetContentView(mainLayout);
}