Do not show multiple vehicle in local host webapp in graphhoper expect car and foot

See the file. The default is only car, you can add more if you want. There is an upper limit, depending on which vehicles you choose, so I would advise you not to add too many.

1 Like


can not see there?

Yes, exactly.

You will get an exception. Just try to add 10, this won’t work. I think 4-5 might work, depending on the vehicles, some vehicles need more storage space than others.

1 Like

I am not able to find the limit in code base.Please

 And  Yes I getting error

Exception in thread "main" java.lang.IllegalStateException: Encoding does not match:
Graphhopper config: 

Graph: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1, dir:/home/jsroyal/Documents/india-latest.osm-gh/

at com.graphhopper.GraphHopper.load(
at com.graphhopper.GraphHopper.importOrLoad(
at com.graphhopper.http.GraphHopperModule$3.start(
at com.graphhopper.http.GHServer.start(
at com.graphhopper.http.GHServer.start(
at com.graphhopper.http.GHServer.main(

Well, it’s a bit hidden, it’s just the amount of flags.

If you change the properties file you have to delete the graph folder and reimport it. rm -r /home/jsroyal/Documents/india-latest.osm-gh/


@boldtrn one more issue with that not able to build a graph for another type of vehicles except car and foot.

 Possible options: car,foot,bike,bike2,mtb,racingbike,motorcycle (comma separated)
 bike2 takes elevation data into account (like up-hill is slower than down-hill) and requires enabling graph.elevation.provider below


I get only the map of car and foot.
please can you help :sunny:

@jsroyal, you essentially answered your own question. Please read your own question, especially the “code part”, especially the parts in “()” and compare it to your own configuration.

1 Like

@boldtrn There was one mistake I get it.There was two config files and I was updating another file.
Can you help me to turn restriction of a truck or big vehicle?
I go through one pull request but do not get much about.

The truck profiles are not (yet) part of the open source solution, but you could try the DataFlagEncoder that supports height, width and weight restrictions. The turn restrictions can be enabled e.g. via graph.flag_encoders=car|turn_costs=true

Thanks @karussell I did implement truck profile and [quote=“karussell, post:10, topic:2054”]

Enable these but does not work for u-turn.