Hello Bernd,
i have one (further) question/thought.
I am calculating routes by using xRoute within my own user-Interface.
Each tour (request) results in defined parameters (response).
As far - as good > this works already really well.
Now i want to visualize the response (tour) by clicking e. g. on a link/shortcut;
similar to RawRequestRunner/Visualize JSON message.
Start ____________________End _______________Km_____ Toll ________Routing
D-45888 Gelsenkirchen_____ D-72202 Nagold _____473_____ 46,77 € ______Link / Shortcut
Is it possible to save (a local) image for each succeeded request?
Or is it even possible to use an URL (e. g. each succeeded request gets an ID)?
Or do you have any (other) ideas how "to reach this goal"?
I'm looking forward to the feedback - Thanks in advance!
Best regards
Max Beermann
xRoute > Response > Visualize
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
xRoute > Response > Visualize
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: xRoute > Response > Visualize
Hello Max,
all the approaches you described seem to be meaningful. It depends on the requirements of the user as a whole.
For example you could store the routing geometry in a database and retrieve it later (without recomputing it) for visualizing it in a map interface.
Storing the image is probably the approach with the lowest amount of efforts but - no wonder - the one that is least flexible, too. (e.g. no interaction with the map)
I'm aware of customers who store not the geometry but the "parameters" of a route (waypoint coordinates + profile name) and recompute it if needed.
What do you need to be "ok" with the topic?
Best regards,
Bernd
all the approaches you described seem to be meaningful. It depends on the requirements of the user as a whole.
For example you could store the routing geometry in a database and retrieve it later (without recomputing it) for visualizing it in a map interface.
Storing the image is probably the approach with the lowest amount of efforts but - no wonder - the one that is least flexible, too. (e.g. no interaction with the map)
I'm aware of customers who store not the geometry but the "parameters" of a route (waypoint coordinates + profile name) and recompute it if needed.
What do you need to be "ok" with the topic?
Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xRoute > Response > Visualize
Hello Bernd,
each of them sound more than ok. But the third (store parameters) would be perfect.
- Especially because my xRoute-response contains routing-parameters like "avoid-countries", "speed-profile", etc.
Suppose I store my parameters (e. g. xroute-request) as a "big string".
Is it possible to create a new response (based on the big-string), which shows the corresponding routing in the map (new request)?
- At best, the user presses on a link / button, which then shows him the result (e.g. in a new browser window).
Many thanks in advance again.
I appreciate it.
Best regards
MBE
each of them sound more than ok. But the third (store parameters) would be perfect.
- Especially because my xRoute-response contains routing-parameters like "avoid-countries", "speed-profile", etc.
Suppose I store my parameters (e. g. xroute-request) as a "big string".
Is it possible to create a new response (based on the big-string), which shows the corresponding routing in the map (new request)?
- At best, the user presses on a link / button, which then shows him the result (e.g. in a new browser window).
Many thanks in advance again.
I appreciate it.
Best regards
MBE
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xRoute > Response > Visualize
Hello Bernd,
is my thought too "unclear"?
Please let me know > I will try to make it clear.
Thanks in advance for your feedback.
Best regards
Max Beermann
is my thought too "unclear"?
Please let me know > I will try to make it clear.
Thanks in advance for your feedback.
Best regards
Max Beermann
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
Re: xRoute > Response > Visualize
If you want to store parameters and actually recreate the route: I would recommend that you confine all parameter to the profile snippet so that you only have to store the coordinates of the way-points and the profile snippet string in a database. Currently we do not have an out of the box sample for this.
As for creating a web page that shows the route: i would recommend to create a template for a page that shows a map using the leaflet map control. The page can then retrieve the needed the data from the database , calculate the route and display it. For a concept of this have look at http://176.95.37.46/samplebrowser/#samp ... aflet/view . you can hit the edit button to view the sample code behind the page.
The sample uses left mouse clicks for generating input coordinates, you should replace that by a function that get's the information out of the database. I don't have a best practice example for this.
A slight alternative is that you keep all the calculation part in the middleware and only pass the line from the result to the page to draw.
As for creating a web page that shows the route: i would recommend to create a template for a page that shows a map using the leaflet map control. The page can then retrieve the needed the data from the database , calculate the route and display it. For a concept of this have look at http://176.95.37.46/samplebrowser/#samp ... aflet/view . you can hit the edit button to view the sample code behind the page.
The sample uses left mouse clicks for generating input coordinates, you should replace that by a function that get's the information out of the database. I don't have a best practice example for this.
A slight alternative is that you keep all the calculation part in the middleware and only pass the line from the result to the page to draw.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Senior Technical Consultant
PTV Benelux
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: xRoute > Response > Visualize
Thanks for answering, Joost!
And Max: no, not unclear. Just too much input in my queue
And Max: no, not unclear. Just too much input in my queue
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xRoute > Response > Visualize
Thank you very much- Joost & Bernd.
So I think I will have a new task for 2019 : )
I will let you know if/when I finished it.
Happy Christmas and Happy New Year (to all of you)!
Max Beermann
So I think I will have a new task for 2019 : )
I will let you know if/when I finished it.
Happy Christmas and Happy New Year (to all of you)!
Max Beermann
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics
- Max Beermann
- Posts: 68
- Joined: Tue Oct 30, 2018 7:36 am
Re: xRoute > Response > Visualize
Hey Bernd & Joost,
task is already finished!
I create a html for leaflet, which includes the polyline of the xRoute-response.
Works great!
Thanks for your help and motivation
Max
task is already finished!
I create a html for leaflet, which includes the polyline of the xRoute-response.
Works great!
Thanks for your help and motivation
Max
Max Beermann
Development Manager
WHEELS Logistics
Development Manager
WHEELS Logistics