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); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.