Hi, I’m using version 0.9 and integrate graphhopper-core and reader-osm.jar through maven.
Then I want to block certains nodes when routing and follow your sample code
But there are some problemes:
- no class call WeightingMap is found
- no constructor AvoidEdgesWeighting(FlagEncoder)
Did I miss anything?
are you trying to override Graphhopper#createWeighting? The method looks like this:
public Weighting createWeighting(HintsMap hintsMap, FlagEncoder encoder, Graph graph). The documentation seems to be outdated, thanks for pointing this out, I will update the docs.
The constructor of AvoidEdgesWeighting looks like this
public AvoidEdgesWeighting(Weighting superWeighting).
Yes I’m trying. But how can I get the parameter Weighting when initialize AvoidEdgesWeighting?
the AvoidEdgesWeighting is only used in addition with another Weighting. So you could combine it with for example the FastestWeighting or the ShortestWeighting, depending on your use-case.