[GraphHopper] GraphHopper] How to add a variable in a query

Peter K peathal at yahoo.de
Fri Feb 28 16:27:14 UTC 2014


No need to sorry.

> I have already done the fuction to modify the node,add a barrier and
delete the graphhopper-gh
> folder (they are made in a different java file)

This does not look like the solution you are after. You probably want to
introduce this per query, probably in realtime and probably even
independent for every user, right?

The first two requirements are relative easy to solve when you just
modify the graph in-memory, no need to drop the folder or even recompile
the project.

Regarding your Javascript issue: look into ghrequest.js where the
parameters are grabbed from URL (init) and when submitted they are sent
to the GraphHopperServlet (createPath, doRequest). See this servlet
method 'writePath' how to recieve&handle the external query.

Regards,
Peter.

> Sorry for the question, I am a beginner to client-server application
> so I want to modify  graphhopper query adding a variable that is set 0
> or 1 by an user's query ,  to explain is simple but to do It for me is
> something that I don't know how to do it...
> I understand that in graphhopper you do a query adding some parameter
> in an url,
> but I don't understand how you set this parameters or variables and do
> the query, or  if is possible (how to) to take the paramenter of the
> client's query and add to graphhoper's query and how to have the
> query's answer...
>
> I want to modify the query beacuse when an user send me a signal(the
> variable that he set at 0 or 1) I want to modify a node in my
> graphhopper.osm (my map) adding a barrier, delete the graphhopper-gh
> and recalculate the graph and the route.
> I have already done the fuction to modify the node,add a barrier and
> delete the graphhopper-gh folder (they are made in a different java
> file).... even If I don't know how to lay together all this java file
> in my graphhopper project.
>
> I wish you have understand what I have wrote :')

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140228/30fe2c63/attachment.html>


More information about the GraphHopper mailing list