Hi, <br><br>Just would like to say that finally with the help of crschmidt and pgiraud from #OpenLayers , I managed to get the routing working. <br><br>I would like to say that the tutorial on pgRouting has some old things that I suggest should be changed to reflect the new
OpenLayers.js <br><br>function displayRoute(response) { <br><br>if (response && response.responseXML) { <br><br>// erase the previous results result.removeFeatures(result.features); <br><br>// parse the features var edges =
response.responseXML.getElementsByTagName('edge'); var features = []; for (var i = 0; i < edges.length; i++) { <br><br>var wkt = edges[i].getElementsByTagName('wkt')[0].textContent; var g = parser.read(wkt);
features.push(g); <br><br>} result.addFeatures(features); <br><br>} <br><br>} <br><br>In the function on the wiki, there is features.push(new OpenLayers.Feature.Vector(g)); which now should just be changed with features.push
(g); since g is already a Feature.Vector array so no need to mention it again. <br><br>Thanks alot for your support, and hope this thread helps others with my problem :) <br><br>Cheers<br><br><br><div><span class="gmail_quote">
On 11/22/07, <b class="gmail_sendername">Matthew Pulis</b> <<a href="mailto:mpulis@gmail.com">mpulis@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
Thanks Roald for your Interest<br><br>I tried to make the "edge" instead of 'edge' and also tried "wkt" instead of 'wkt' but to no avail :(<br><br>I also rechecked the characterset : doesn't appear to me I should rechange the charset .. u have anymore info why I should please?
<br><br>Thanks again<div><span class="e" id="q_11666a065e3e6fcd_1"><br><br><div><span class="gmail_quote">On 11/22/07, <b class="gmail_sendername">Roald de Wit</b> <<a href="mailto:rdewit@users.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
rdewit@users.sourceforge.net</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
<br>On Wed, 2007-11-21 at 11:47 +0100, Matthew Pulis wrote:<br>> Hi guys :)<br>><br><snip><br>> I get this error :<br>><br>> String contains an invalid character" code: "5<br>> <a href="http://yancho.no-ip.org/~yancho/OpenLayers.js" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://yancho.no-ip.org/~yancho/OpenLayers.js</a><br>> Line 554<br>><br><br>Not sure: could it be your XML is in another character set (in<br>ISO-8859-1 for example) than it says it is (UTF-8)?<br>I see you use a single quote for your edge id. What happens when you
<br>make that a double quote?<br><br>Or maybe you tried to do something like this:<br><a href="http://www.nabble.com/DrawFeature:-box-supported--t4627077.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.nabble.com/DrawFeature:-box-supported--t4627077.html </a><br><br>If so, you tried to feed the data in a wrong format to a method, or<br>maybe the right format to the wrong method... ;-)<br><br>Kind regards,<br>
<br>Roald<br>--<br>Roald de Wit<br>Software Engineer<br><a href="mailto:roald.dewit@lisasoft.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> roald.dewit@lisasoft.com</a><br><br>Commercial Support for Open Source GIS Software
<br><a href="http://lisasoft.com/LISAsoft/SupportedProducts/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lisasoft.com/LISAsoft/SupportedProducts/</a><br><br></blockquote></div><br><br clear="all">
<br></span></div><div><span class="e" id="q_11666a065e3e6fcd_2">-- <br>Matthew Pulis<br>URL : <a href="http://www.solutions-lab.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.solutions-lab.net
</a><br>MSN : pulis_matthew[@]hotmail.com<br>ICQ : 145951110<br>Skype : <a href="http://solutions-lab.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> solutions-lab.net</a> </span></div></blockquote>
</div><br><br clear="all"><br>-- <br>Matthew Pulis<br>URL : <a href="http://www.solutions-lab.net">http://www.solutions-lab.net</a><br>MSN : pulis_matthew[@]hotmail.com<br>ICQ : 145951110<br>Skype : <a href="http://solutions-lab.net">
solutions-lab.net</a>