demo (#22) - Problem with tutorial Workshop pgRouting in Open Layers (2.8) (#352) - Message List

Problem with tutorial Workshop pgRouting in Open Layers (2.8)

Hi all,

I have a problem with the tutorial http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM

I am trying to reproduce this tutorial under Windows! It successfully works with Firefox 3.6 but NOT with IE8.

After clicking the "calcualte route" button IE8 shows only the alert popup. Presumably there is something wrong with the parseWKT function. IE8 does not show the route. Astonishingly the same code works with Firefox. This bug must be IE8 specific.

Any help?

Thanks and Regards, R.L.

  • Message #1460

    Try this one http://pgrouting.postlbs.org/wiki/WorkshopOL2.7andOSM . It's an updated version of the 2007 workshop. That time there was no IE 8.

    • Message #1461

      Hi Daniel,

      You have linked exactly the same tutorial. Is the code from the web pages different from the downloadable zip archive? The parseWKT function looks the same. I think it is only a minor but tricky javasript problem which prevents IE8 from showing the route.

      Thanks and Regards, R.L.

      • Message #1462

        Oh, right! The same link. Sorry!
        I have no idea about the problem and can't test it, because I have no Internet Explorer. But have you tried with "compatibility mode", that makes IE8 behave like IE7?

        I think it's a problem with OpenLayers?, so maybe you could ask there if you can find the Javascript where it stops working.

  • Message #1519

    I just encountered this error and after a bit of searching I found the problem.

    At the end of the displayRoute function, I changed

    var g = parseWKT(edges[i].getElementsByTagName('wkt')[0].textContent);

    to

    var g = parseWKT(edges[i].getElementsByTagName('wkt')[0].childNodes[0].nodeValue);

    textContent doesn't work in IE, so I accessed the value using DOM.