private void initializeMap() { mapView.setSatellite(settingsHelper.isSatelliteView()); if (settingsHelper.isFirstLaunch()) { mapView.getController().setZoom(16); Location location = locationHelper.getLastLocation(); if (location != null) { GeoPoint geoPoint = geoPoint(location); mapView.getController().setCenter(geoPoint); } settingsHelper.setFirstLaunch(false); } }
protected void centerMap() { if (locationHelper.getLastLocation() != null) { GeoPoint geoPoint = geoPoint(locationHelper.getLastLocation()); MapController controller = mapView.getController(); controller.animateTo(geoPoint); } }
public void noteClicked(OverlayItem item, int index) { suppressNextTap(); mapView.getController().animateTo(item.getPoint()); noteClicked(index); }
private void showSession() { if (sessionManager.isSessionSaved() && zoomToSession) { LocationConversionHelper.BoundingBox boundingBox = boundingBox(sessionManager.getSession()); mapView.getController().zoomToSpan(boundingBox.getLatSpan(), boundingBox.getLonSpan()); mapView.getController().animateTo(boundingBox.getCenter()); } }
@Override public void onClick(View view) { switch (view.getId()) { case R.id.toggle_heat_map_button: toggleHeatMapVisibility(); updateButtons(); break; case R.id.zoom_in: mapView.getController().zoomIn(); break; case R.id.zoom_out: mapView.getController().zoomOut(); break; case R.id.locate: centerMap(); break; case R.id.view_photo: Intents.viewPhoto(this, photoUri()); break; default: super.onClick(view); } }
@Subscribe public void onEvent(DoubleTapEvent event) { mapView.getController().zoomIn(); }