hide speed cameras poiTypes
This commit is contained in:
parent
f2b1836e53
commit
6cb52d9130
3 changed files with 17 additions and 0 deletions
|
@ -945,4 +945,17 @@ public class MapPoiTypes {
|
||||||
return pat.isText();
|
return pat.isText();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void excludeSpeedCameraPoiType() {
|
||||||
|
Iterator<PoiCategory> categoryIter = categories.iterator();
|
||||||
|
while (categoryIter.hasNext()) {
|
||||||
|
Iterator<PoiType> poiIter = categoryIter.next().getPoiTypes().iterator();
|
||||||
|
while (poiIter.hasNext()) {
|
||||||
|
PoiType poiType = poiIter.next();
|
||||||
|
if ("speed_camera".equals(poiType.getKeyName())) {
|
||||||
|
poiIter.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,6 +389,9 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
lockHelper.setLockUIAdapter(this);
|
lockHelper.setLockUIAdapter(this);
|
||||||
|
|
||||||
mIsDestroyed = false;
|
mIsDestroyed = false;
|
||||||
|
if (settings.SPEED_CAMERAS_UNINSTALLED.get()) {
|
||||||
|
app.getPoiTypes().excludeSpeedCameraPoiType();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void exitFromFullScreen(View view) {
|
public void exitFromFullScreen(View view) {
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class SpeedCamerasBottomSheet extends MenuBottomSheetDialogFragment {
|
||||||
app.getSettings().SPEED_CAMERAS_UNINSTALLED.set(true);
|
app.getSettings().SPEED_CAMERAS_UNINSTALLED.set(true);
|
||||||
app.getSettings().SPEAK_SPEED_CAMERA.set(false);
|
app.getSettings().SPEAK_SPEED_CAMERA.set(false);
|
||||||
app.getSettings().SHOW_CAMERAS.set(false);
|
app.getSettings().SHOW_CAMERAS.set(false);
|
||||||
|
app.getPoiTypes().excludeSpeedCameraPoiType();
|
||||||
SearchResultMatcher.setSpeedCamerasUninstalled(true);
|
SearchResultMatcher.setSpeedCamerasUninstalled(true);
|
||||||
Fragment targetFragment = getTargetFragment();
|
Fragment targetFragment = getTargetFragment();
|
||||||
if (targetFragment instanceof OnSpeedCamerasUninstallListener) {
|
if (targetFragment instanceof OnSpeedCamerasUninstallListener) {
|
||||||
|
|
Loading…
Reference in a new issue