Closed GitHubDroid closed 11 years ago
Is it something I an do in MapsActivity.java:
MapScaleBar mapScaleBar = this.mapView.getMapScaleBar();
mapScaleBar.setImperialUnits(false);
mapScaleBar.setText(TextField.KILOMETER, " km"); //$NON-NLS-1$
mapScaleBar.setText(TextField.METER, " m"); //$NON-NLS-1$
+mapScaleBar.setText(TextField.FEET, " ft");
can I set setImperialUnits(true).
Changes:
geodroid.app/src/eu/hydrologis/geopaparazzi/maps/MapsActivity.java
MapScaleBar mapScaleBar = this.mapView.getMapScaleBar();
// mapScaleBar.setImperialUnits(false);
// mapScaleBar.setText(TextField.KILOMETER, " km"); //$NON-NLS-1$
// mapScaleBar.setText(TextField.METER, " m"); //$NON-NLS-1$
boolean doImperial = preferences.getBoolean(Constants.PREFS_KEY_IMPERIAL, false);
mapScaleBar.setImperialUnits(doImperial);
if (doImperial) {
mapScaleBar.setText(TextField.FOOT, " ft"); //$NON-NLS-1$
mapScaleBar.setText(TextField.MILE, " mi"); //$NON-NLS-1$
}else{
mapScaleBar.setText(TextField.KILOMETER, " km"); //$NON-NLS-1$
mapScaleBar.setText(TextField.METER, " m"); //$NON-NLS-1$
}
Option to display the scalebar in feet.