public void showBudburstSpeciesOnMap(boolean hasHandler) { // TODO Auto-generated method stub otDBH = new OneTimeDBHelper(MapViewMain.this); GeoPoint gPoint = new GeoPoint((int) (mLatitude * 1000000), (int) (mLongitude * 1000000)); mMapView.setBuiltInZoomControls(true); mMapView.invalidate(); if (getMyListsFromDB()) { Log.i("K", "Get species lists from the database"); // add overlays on the map mMapView.getOverlays().clear(); mMapView.getOverlays().add(new SpeciesMapOverlay(mMapView, mMarker, mPlantList)); mMapView.getOverlays().add(mMyOverLay); titleBar.setText("Total number of species : " + mPlantList.size()); mMapController.setCenter(gPoint); if (hasHandler) { mHandlerDone = true; mHandler.sendEmptyMessage(GET_MY_OBSERVED_LISTS); mMapController.setZoom(12); } } else { Toast.makeText(MapViewMain.this, "Please make your own observation", Toast.LENGTH_SHORT) .show(); Log.i("K", "No species lists in the database."); } }
public void getOtherUsersListsFromServer(int category) { // clear overlays mMapView.getOverlays().clear(); Log.i("K", "MapViewMain(category) : " + category); // call the list of species based on the category. SpeciesOthersFromServer getSpecies = new SpeciesOthersFromServer( MapViewMain.this, mMapView, mMyOverLay, category, mLatitude, mLongitude); getSpecies.execute( getString(R.string.get_onetimeob_others) + "?latitude=" + mLatitude + "&longitude=" + mLongitude); }