Differences of MapMatchingResource.java in Github Packages and Github Master

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:


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();

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).

On github we currently use https://github.com/graphhopper/map-matching/tree/recent_core as the latest development branch. (we’ll change this and likely merge the repo into the gh core repo)

Thanks for the explanation. My issue was that I thought packages would be only deployed for the master branch. Using the different branch makes sense, thanks!

1 Like
Powered by Discourse