Fix issue 339 partially
This commit is contained in:
parent
1b4025ab4a
commit
a22d16ca5d
3 changed files with 11 additions and 8 deletions
|
@ -15,16 +15,15 @@ public class ToDoConstants {
|
|||
|
||||
|
||||
// === Common issues ===
|
||||
// || 104 || Add activity to show current loaded indexes and information about them (Issue 366) ||
|
||||
// || 123 || Improve gpx file showing (very slow for big files) (Issue 412) ||
|
||||
// || 124 || Animated transition using only raster images (?) - skip animations (!) - don not render vectoring for animations (Issue 238) ||
|
||||
// || 122 || Frozen sqlite db images (bug?). When images are loaded into sqlite the whole map is frozen (issue 413) ||
|
||||
// || 120 || Show icons over poi circle (issue 414) ||
|
||||
// || 110 || Use android voice for pronounce command (could be used in future to pronounce street) (Issue 70) ||
|
||||
// || 119 || Dialog on main screen tips and tricks (Issue 415) ||
|
||||
// || 112 || Investigate exiting/minimizing app (Issue 214) ||
|
||||
// || 118 || Config switching between maps on different zoom levels <14 (using raster), > 14 vector (Issue 419) ||
|
||||
// || 97 || For voice navigation consider current speed of vehicle. Especially when speed > 50 pronounce more than 200 m (Issue 420) ||
|
||||
// || 104 || Add activity to show current loaded indexes and information about them (Issue 366) ||
|
||||
// || 111 || Investigate showing street name while driving (Issue 286) ||
|
||||
// || 86 || Allow to add/edit custom tags to POI objects (Issue 44) ||
|
||||
// || 92 || Support poi index with standard map index and unify POI categories (unify done +, works very slow) (Issue 417) ||
|
||||
|
@ -46,7 +45,8 @@ public class ToDoConstants {
|
|||
|
||||
/////////////////////////// DONE //////////////////////////////
|
||||
// DONE ANDROID :
|
||||
|
||||
// || 112 || Investigate exiting/minimizing app (Issue 214) ||
|
||||
|
||||
// DONE SWING
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class OsmAndFormatter {
|
|||
}
|
||||
|
||||
if (meters >= 100 * mainUnitInMeters) {
|
||||
return ((int) meters / mainUnitInMeters) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
|
||||
return (int) (meters / mainUnitInMeters) + " " + ctx.getString(mainUnitStr); //$NON-NLS-1$
|
||||
} else if (meters > 1.5f * mainUnitInMeters) {
|
||||
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
|
||||
} else if (meters > 0.9f * mainUnitInMeters) {
|
||||
|
|
|
@ -350,11 +350,11 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
|
||||
|
||||
final ZoomControls zoomControls = (ZoomControls) findViewById(R.id.ZoomControls);
|
||||
updateZoomControls(zoomControls, mapView.getZoom());
|
||||
zoomControls.setOnZoomInClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
zoomControls.setIsZoomInEnabled(mapView.getZoom() + 1 < mapView.getMaximumShownMapZoom());
|
||||
zoomControls.setIsZoomOutEnabled(mapView.getZoom() + 1 > mapView.getMinimumShownMapZoom());
|
||||
updateZoomControls(zoomControls, mapView.getZoom() + 1);
|
||||
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
||||
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() + 1);
|
||||
showAndHideMapPosition();
|
||||
|
@ -367,8 +367,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
zoomControls.setOnZoomOutClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
zoomControls.setIsZoomInEnabled(mapView.getZoom() - 1 < mapView.getMaximumShownMapZoom());
|
||||
zoomControls.setIsZoomOutEnabled(mapView.getZoom() - 1 > mapView.getMinimumShownMapZoom());
|
||||
updateZoomControls(zoomControls, mapView.getZoom() - 1);
|
||||
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
||||
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() - 1);
|
||||
showAndHideMapPosition();
|
||||
|
@ -410,6 +409,10 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
|
||||
}
|
||||
|
||||
private void updateZoomControls(ZoomControls zoomControls, int zoom){
|
||||
zoomControls.setIsZoomInEnabled(zoom < mapView.getMaximumShownMapZoom());
|
||||
zoomControls.setIsZoomOutEnabled(zoom > mapView.getMinimumShownMapZoom());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
|
|
Loading…
Reference in a new issue