Hi there,
I’m trying to apply some changes on custom profile per request like speed using:
curl -s -X POST "http://localhost:8989/route?ch.disable=true&lm.disable=true" -H "Content-Type: application/json" -d '{
"profile": "bike2",
"points": [[-79.485863, 43.657139],[-79.465264, 43.687931]],
"custom_model": {
"speed": [{"if": "true", "multiply_by": 1.0}],
"priority": [{"if": "road_class == CYCLEWAY", "multiply_by": 1.5}]
},
"points_encoded": false,
"instructions": true
}'
but i got error:
{"message":"The 'custom_model' parameter is currently not supported for speed mode, you need to disable speed mode with `ch.disable=true`.
here is my config.yml:
graphhopper:
profiles:
- name: bike
custom_model_files: [bike.json, bike_elevation.json]
- name: bike2
weighting: custom
custom_model_files: [bike2.json]
profiles_ch:
- profile: bike
profiles_lm: []
routing:
ch:
disabling_allowed: true
Thanks.