Skip to content

Commit 4754800

Browse files
authored
Merge pull request #793 from GIScience/fastisochrones-fix-default-params
defaut params for fastisochrones
2 parents dddc320 + bc0bb87 commit 4754800

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openrouteservice/src/main/java/org/heigit/ors/routing/configuration/RoutingManagerConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public static RoutingManagerConfiguration loadFromFile(String path) throws IOExc
8080
List<RouteProfileConfiguration> newProfiles = new ArrayList<>();
8181
List<String> fastIsochroneProfileList = IsochronesServiceSettings.getParametersList(IsochronesServiceSettings.SERVICE_NAME_FASTISOCHRONES + "profiles.active");
8282
Map<String,Object> defaultFastIsochroneParams = IsochronesServiceSettings.getParametersMap(IsochronesServiceSettings.SERVICE_NAME_FASTISOCHRONES + "profiles.default_params", true);
83+
if (defaultFastIsochroneParams == null) { // default to disabled if ors.services.isochrones.fastisochrones not available in app.config
84+
defaultFastIsochroneParams = new HashMap<>();
85+
defaultFastIsochroneParams.put("enabled", false);
86+
}
8387
List<String> profileList = RoutingServiceSettings.getParametersList("profiles.active");
8488
Map<String,Object> defaultParams = RoutingServiceSettings.getParametersMap("profiles.default_params", true);
8589
String rootGraphsPath = (defaultParams != null && defaultParams.containsKey("graphs_root_path")) ? StringUtility.trim(defaultParams.get("graphs_root_path").toString(), '"') : null;

0 commit comments

Comments
 (0)