I am using the MapMatching from Github Packages in a project. Now I had a look at the source code from Github vs. the source code from Github Pacakges.
I am using:
<dependency>
<groupId>com.graphhopper</groupId>
<artifactId>graphhopper-map-matching-web-bundle</artifactId>
<version>86d880fdad4901c2372141217d4e492b12cfbb01</version>
</dependency>
The source code here is:
hints.putObject("vehicle", vehicleStr);
hints.putObject(MAX_VISITED_NODES, maxVisitedNodes);
// resolve profile and remove legacy vehicle/weighting parameters
String profile = profileResolver.resolveProfile(hints).getName();
The source code in Github Packages (read through intelliJ) is:
hints.putObject(MAX_VISITED_NODES, maxVisitedNodes);
String weightingVehicleLogStr = "weighting: " + hints.getString("weighting", "") + ", vehicle: " + hints.getString("vehicle", "");
if (Helper.isEmpty(profile)) {
// resolve profile and remove legacy vehicle/weighting parameters
// we need to explicitly disable CH here because map matching does not use it
PMap pMap = new PMap(hints).putObject(Parameters.CH.DISABLE, true);
profile = profileResolver.resolveProfile(pMap).getName();
removeLegacyParameters(hints);
}
How can this be? Am I missing something? More importantly, the code from Github Packages seems like the better code to me, as the one from master fails for me when using the profile parameter, as vehicle will always be set to car (car is the default value for vehicleStr).