[GIS] How to get routes and download them from OpenLayers

openlayers-2routing

I am trying to generate a route in openlayers with a start and end points and some points during track.

I read about openroute: http://wiki.openstreetmap.org/wiki/OpenRouteService#RouteLink

But I don't know how can I include it on my webpage. My idea is about to have a button which when you press it, it generate the route between all markers in map.

I want that possibility of download it would be available.

In openroute webpage you can introduce points and it generates the route but I don't find an api to see how I can introduce it on my webpage.

Do you know other way to generate route in openlayers?

Best Answer

there are some source on net when you googling. you can check following links for some information.

1.Graphserver - The open-source multi-modal trip planner.

2.pgRouting III: PHP + OpenLayers Interface

3.pgRouting 1.01 with OpenLayers 2.5 on Ubuntu 7.10

4.Getting the OpenLayers-Code for the Routing-application

EDIT:

if you search ready to use service of routing you can use ArcGIS Online locator and routing services. For some information you should read this. But you must know that you are restirected with European Routing and North American Routing.It has multi - language support.

For north Amerikan support the service details are there and when you want to use this you shoul write your details here

So from arcgis service you can add json result to openlayers in this way. i have my routing service on arcgis and i âm using this way for routing....

i hope it helps you