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); } }
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.