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 vieles mehr. Neu hier? Erstelle kostenlos ein Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.