use of org.mapsforge.core.model.MapPosition in project RSAndroidApp by RailwayStations.
the class MapsActivity method onPause.
@Override
protected void onPause() {
if (this.layer instanceof TileDownloadLayer) {
((TileDownloadLayer) this.layer).onPause();
}
unregisterLocationManager();
final MapPosition mapPosition = binding.map.mapView.getModel().mapViewPosition.getMapPosition();
baseApplication.setLastMapPosition(mapPosition);
destroyClusterManager();
super.onPause();
}
use of org.mapsforge.core.model.MapPosition in project RSAndroidApp by RailwayStations.
the class MapsActivity method initializePosition.
/**
* initializes the map view position.
*
* @param mvp the map view position to be set
*/
protected void initializePosition(final IMapViewPosition mvp) {
if (myPos != null) {
mvp.setMapPosition(new MapPosition(myPos, baseApplication.getZoomLevelDefault()));
} else {
mvp.setMapPosition(baseApplication.getLastMapPosition());
}
mvp.setZoomLevelMax(getZoomLevelMax());
mvp.setZoomLevelMin(getZoomLevelMin());
}
Aggregations