public class REGEULActivity extends Activity { MapView mMapView = null; // create MapOptions for each basemap MapOptions topo; MapOptions streets; MapOptions natGeo; MapOptions ocean; // used to maintain extent when switching basemaps Polygon extent;
/** Called when the activity is first created. */ /* (non-Javadoc) * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);
// Retrieve the map and initial extent from XML layout mMapView = (MapView) findViewById(R.id.map);
// attribute ESRI logo to map mMapView.setEsriLogoVisible(true); // enable map to wrap around date line mMapView.enableWrapAround(true); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.items, menu); return super.onCreateOptionsMenu(menu); } @Override protected void onDestroy() { super.onDestroy(); } @Override protected void onPause() { super.onPause(); mMapView.pause(); } @Override protected void onResume() { super.onResume(); mMapView.unpause(); }