You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/weighting.md
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,8 @@ In order to create a custom Weighting you need to do the following:
5
5
1. implement the Weighting class
6
6
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.
7
7
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.
9
10
10
11
Now you need to create your custom GraphHopper:
11
12
@@ -36,5 +37,3 @@ class MyGraphHopper extends GraphHopper {
36
37
37
38
For `forbiddenEdges` you need to determine the edges from some GPS coordinates.
38
39
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