OpenLayers Routing, with a little help from my friends

So, one of the things I learned on Monday here at FOSS4G was how to set up pgRouting. pgRouting is a Postgres-based routing engine, originally developed by those wonderful Camptocamp folks, and since taken over by Orkney. The workshop showed us how to do routing with OpenLayers and pgRouting over Google Maps with free Canadian data.

With some urging from Erik, I put together a demo of this functionality — but of course, I couldn’t stop at just that, and instead had to go farther and do on-the-fly routing as you drag:

View the Demo on another page

Or, if you’ve got an SVG/VML supporting browser (Almost all of them, these days), check out the live demo of Boston.

2 Responses to “OpenLayers Routing, with a little help from my friends”

  1. osgisfyp Says:

    Hi Christopher,

    I’m really interested in how you did this. I followed the pgrouting example online and everything worked until the call to the ax_routing.php file, located in the same directory as the webpage.

    I looked at the source of your live example and you appear to be calling a completely different file “/webprocessingserver/wps.cgi/routing”, which I believe is a python file.

    Did you write this file yourself, or can I get it from somewhere?

    Im using win xp, geoserver and openlayers. Im pretty new to both of these and have only the basic install of geoserver, so if any additional software has to be installed please let me know.

    Thanks
    osgisfyp

  2. Vishal Agarwal Says:

    Hey Chris,

    Nice stuff here.

    I would love to get my hands on this. Is there a document or something that can be used to do this integration you have shown with open layers?

    Love to have some feedback on this.

    Thanks,
    Vishal