About max_width of GET API

I set “max_width<2.5” with API for “max_width=2.0” of Open Street Map data, but it passes through that position.
Is max_width specified in GET API correct?

URL : http://localhost:8989/maps/route?point=35.64782,139.645007&point=35.657418,139.650414&profile=car&locale=ja&max_width<2.5
Open Street Map Data : Way: ‪瀬田貫井線‬ (‪719100633‬) | OpenStreetMap

I’m trying to run the routing API using graphhopper-web-5.3.jar and Japanese PBF files.

Please see graphhopper/custom-models.md at master · graphhopper/graphhopper · GitHub on how a custom request looks like. It is only possible via a POST request and when you enable weighting: custom in the config.

Should it be a POST request?

I was able to do that by running a custom model on screen.

But when I try to call it with ajax from another port, it causes cross-origin. Are there any settings to avoid this?

Yes.

Are there any settings to avoid this?

Not sure on the client-side. But on the server side we already allow it: https://github.com/graphhopper/graphhopper/blob/7082297bd380f76b1a48754d1f50df82f42359cd/web/src/main/java/com/graphhopper/application/GraphHopperApplication.java#L56

OK. I understood about that.

Does that mean I have to set it myself?

Sorry, the json settings were different.
I was able to execute a POST request.

It was very helpful. Thank you very much.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.