public boolean onOptionsItemSelected(MenuItem item) { // handle item selection switch (item.getItemId()) { case R.id.World_Street_Map: mMapView.removeAll(); mMapView.addLayer(basemapStreet); return true; case R.id.World_Topo: mMapView.removeAll(); mMapView.addLayer(basemapTopo); return true; case R.id.NatGeo: mMapView.removeAll(); mMapView.addLayer(basemapNatGeo); return true; case R.id.Ocean_Basemap: mMapView.removeAll(); mMapView.addLayer(basemapOcean); default: return super.onOptionsItemSelected(item); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.