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 ===
|
// === 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 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) ||
|
// || 111 || Investigate showing street name while driving (Issue 286) ||
|
||||||
// || 86 || Allow to add/edit custom tags to POI objects (Issue 44) ||
|
// || 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) ||
|
// || 92 || Support poi index with standard map index and unify POI categories (unify done +, works very slow) (Issue 417) ||
|
||||||
|
@ -46,6 +45,7 @@ public class ToDoConstants {
|
||||||
|
|
||||||
/////////////////////////// DONE //////////////////////////////
|
/////////////////////////// DONE //////////////////////////////
|
||||||
// DONE ANDROID :
|
// DONE ANDROID :
|
||||||
|
// || 112 || Investigate exiting/minimizing app (Issue 214) ||
|
||||||
|
|
||||||
// DONE SWING
|
// DONE SWING
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class OsmAndFormatter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meters >= 100 * mainUnitInMeters) {
|
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) {
|
} else if (meters > 1.5f * mainUnitInMeters) {
|
||||||
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
|
return MessageFormat.format("{0,number,#.#} " + ctx.getString(mainUnitStr), ((float) meters) / mainUnitInMeters); //$NON-NLS-1$
|
||||||
} else if (meters > 0.9f * mainUnitInMeters) {
|
} 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);
|
final ZoomControls zoomControls = (ZoomControls) findViewById(R.id.ZoomControls);
|
||||||
|
updateZoomControls(zoomControls, mapView.getZoom());
|
||||||
zoomControls.setOnZoomInClickListener(new OnClickListener() {
|
zoomControls.setOnZoomInClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
zoomControls.setIsZoomInEnabled(mapView.getZoom() + 1 < mapView.getMaximumShownMapZoom());
|
updateZoomControls(zoomControls, mapView.getZoom() + 1);
|
||||||
zoomControls.setIsZoomOutEnabled(mapView.getZoom() + 1 > mapView.getMinimumShownMapZoom());
|
|
||||||
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
||||||
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() + 1);
|
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() + 1);
|
||||||
showAndHideMapPosition();
|
showAndHideMapPosition();
|
||||||
|
@ -367,8 +367,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
zoomControls.setOnZoomOutClickListener(new OnClickListener() {
|
zoomControls.setOnZoomOutClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
zoomControls.setIsZoomInEnabled(mapView.getZoom() - 1 < mapView.getMaximumShownMapZoom());
|
updateZoomControls(zoomControls, mapView.getZoom() - 1);
|
||||||
zoomControls.setIsZoomOutEnabled(mapView.getZoom() - 1 > mapView.getMinimumShownMapZoom());
|
|
||||||
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
mapView.getAnimatedDraggingThread().stopAnimatingSync();
|
||||||
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() - 1);
|
mapView.getAnimatedDraggingThread().startZooming(mapView.getZoom(), mapView.getZoom() - 1);
|
||||||
showAndHideMapPosition();
|
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
|
@Override
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
|
Loading…
Reference in a new issue