Hello list,   I have a function stored in PostGIS in 'sql' language that 
performs pgRouting and returns the geometry of my road network as well. In the 
DATA section of the layer that renders this geometry, it is as follows:
   DATA "geom FROM (SELECT * FROM routing_function(%source%, %target%)) AS foo 
USING UNIQUE seq using srid=2100"
My VALIDATION section is in the layer level as:     VALIDATION             
"source" "^[0-9]+$"            "target" "^[0-9]+$"       END
But the results are a bit weird...
In map mode:  if I pass the parameters in the url like 
..&source=100&target=1000  I get a static map with my route correctly. In WMS 
request (as SERVICE=WMS&....&source=100&target=1000): it works fine as well 
returning a static image with the route.In browse mode:  the first time invoked 
the result is fine returning the route along with my template. But with the 
route already calculated, if I click on pan or zoom in for example, I get the 
following error in the MS_ERRORFILE: 
Error (ERROR:  syntax error at or near "%"LINE 1: ...hex') as geom,"seq" from 
(SELECT * FROM routing_function(%source%, ...
The same occurs also if I use the OpenLayers template like  
...&template=openlayers=&source=100&target=1000.
What am I missing here ?
Thank you very much.
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to