Skip to content

Commit 2bb872a

Browse files
authored
Update weighting.md
1 parent 887c83b commit 2bb872a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docs/core/weighting.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ In order to create a custom Weighting you need to do the following:
55
1. implement the Weighting class
66
2. create a subclass of GraphHopper and overwrite createWeighting where you return a new instance of your custom weighting if e.g. the string 'customweighting' is specified. Otherwise let the super class handle it.
77

8-
See AvoidEdgesWeighting for an example of a weighting which avoids certain edges (i.e. returns infinity weight)
8+
See AvoidEdgesWeighting for an example of a weighting which avoids certain edges (i.e. returns infinity weight).
9+
If your blocking edges change per-request you need to disable the speed mode e.g. via `ch.disable=true` as URL or Java hints parameter.
910

1011
Now you need to create your custom GraphHopper:
1112

@@ -36,5 +37,3 @@ class MyGraphHopper extends GraphHopper {
3637

3738
For `forbiddenEdges` you need to determine the edges from some GPS coordinates.
3839
Have a look into the [location index docs](./location-index.md).
39-
40-
If your blocking edges change per-request you need to disable the speed mode e.g. via `prepare.ch.weightings=no`

0 commit comments

Comments
 (0)