This commit is contained in:
Alexey Kulish 2016-04-04 13:32:32 +03:00
parent 2422198dad
commit cf80f25d19
4 changed files with 8 additions and 7 deletions

View file

@ -46,18 +46,18 @@ public class CurrentPositionHelper {
} else if (am.isDerivedRoutingFrom(ApplicationMode.CAR)) {
p = GeneralRouterProfile.CAR;
} else {
p = GeneralRouterProfile.PEDESTRIAN;
p = GeneralRouterProfile.CAR;
}
RoutingConfiguration cfg = app.getDefaultRoutingConfig().build(p.name().toLowerCase(), 10,
new HashMap<String, String>());
ctx = new RoutePlannerFrontEnd(false).buildRoutingContext(cfg, null, app.getResourceManager().getRoutingMapFiles());
RoutingConfiguration defCfg = app.getDefaultRoutingConfig().build(GeneralRouterProfile.CAR.name().toLowerCase(), 10,
new HashMap<String, String>());
BinaryMapIndexReader[] rs = new BinaryMapIndexReader[app.getResourceManager().getAddressRepositories().size()];
int i = 0;
for (RegionAddressRepository rep : app.getResourceManager().getAddressRepositories()) {
rs[i++] = rep.getFile();
}
RoutingConfiguration cfg = app.getDefaultRoutingConfig().build(p.name().toLowerCase(), 10,
new HashMap<String, String>());
ctx = new RoutePlannerFrontEnd(false).buildRoutingContext(cfg, null, rs);
RoutingConfiguration defCfg = app.getDefaultRoutingConfig().build(GeneralRouterProfile.CAR.name().toLowerCase(), 10,
new HashMap<String, String>());
defCtx = new RoutePlannerFrontEnd(false).buildRoutingContext(defCfg, null, rs);
}

View file

@ -29,6 +29,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
final Dialog dialog = new Dialog(getActivity(), themeId);
dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
dialog.getWindow().getAttributes().windowAnimations = R.style.Animations_PopUpMenu_Bottom;
dialog.setCanceledOnTouchOutside(true);
return dialog;
}

View file

@ -168,6 +168,7 @@ public class AvoidSpecificRoads {
if (menu.isActive() && menu.getLatLon().equals(loc)) {
menu.close();
}
activity.refreshMap();
}
return true;
}

View file

@ -172,7 +172,6 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements ContextMenuL
activity.getMyApplication().getAvoidSpecificRoads().addImpassableRoad(
activity, latLon, false);
}
activity.refreshMap();
return true;
}
};