I face issue while configuring a POSTGIS Layer.
I tried many ways to set SQL for the Layer in the magnacarto "Layer Edit" form.
I set the Geometry Filed to "geom" but in the error I always get "geometry" :
Error: mapserv CGI did not return image (map[Content-Type:[application/vnd.ogc.se_xml; charset=UTF-8]])
msPostGISLayerWhichShapes(): Error (ERROR: syntax error at or near "select"
LINE 1: ...geometry"),'NDR') as geom,"city_id"::text FROM select geo...
^
) executing query: SELECT ST_AsBinary(("geometry"),'NDR') as geom,"city_id"::text FROM select geom, city_id from public.cities WHERE "geometry" && ST_GeomFromText('POLYGON((448811.428977486 6869927.25387933,448811.428977486 7091371.11930934,1098409.5757933 7091371.11930934,1098409.5757933 6869927.25387933,448811.428977486 6869927.25387933))',2154)
sql was : select geom, city_id from public.cities using srid=2154 using unique city_id
A classic mapfile works fine with :
DATA "geom from public.cities using srid=2154 using unique city_id"
trying : select geom, city_id from public.cities using unique city_id
gives :
Error: error while calling mapserv CGI (status 500)
my configuration :
- Windows 10
- Mapserver from MS4W
- i don't use Mapnik
- postgresql 9.1
I face issue while configuring a POSTGIS Layer.
I tried many ways to set SQL for the Layer in the magnacarto "Layer Edit" form.
I set the Geometry Filed to "geom" but in the error I always get "geometry" :
sql was : select geom, city_id from public.cities using srid=2154 using unique city_id
A classic mapfile works fine with :
DATA "geom from public.cities using srid=2154 using unique city_id"
trying : select geom, city_id from public.cities using unique city_id
gives :
Error: error while calling mapserv CGI (status 500)my configuration :