<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Hi everybody.<br>I'm trying to handle WFS with Mapscript but it's not working for me.<br>Output of the code below supose to be the name of the GML file, but it's only empty string. <br>What's wrong??<br><br>CODE::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<br><?php<br> dl('php_mapscript.dll'); <br> $map_path="/ms4w/apps/test/";<br> <br>$map = ms_newMapObj($map_path."lol.map");<br>$kokot = $map->getLayerByName("MyWFS");<br>$GMLname= "= ".$kokot->executeWFSGetfeature()." =";<br>?><br><HTML><br> <HEAD><br> <TITLE>WFS-pokus</TITLE><br> </HEAD><br> <BODY> <br> <IMG SRC=<?php echo $image_url; ?>
><br> <?php echo $GMLname; ?><br> </BODY><br> </HTML><br><br><br>MAPFILE::::::::::::::::::::::::::::::<br><br>MAP<br> NAME "demoPlugins"<br> SIZE 600 400<br> STATUS ON<br> EXTENT -600000 -1334715 -159000 -1132715<br> IMAGECOLOR 255 255 255<br> UNITS METERS<br> <br> PROJECTION<br> "init=EPSG:102067"<br> END<br><br> WEB<br> IMAGEPATH "/ms4w/tmp/ms_tmp/"<br> IMAGEURL "/ms_tmp/"<br> METADATA<br> "wfs_title" "msCross WFS Server" ## REQUIRED<br> "wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv?" ## Recommended<br> "wfs_srs" "EPSG:102067 EPSG:3064 EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326" ## Recommended<br> END
<br> END<br> <br> LEGEND<br> STATUS EMBED<br> KEYSIZE 20 15<br> END<br><br> ##########<br> # LAYERS #<br> ##########<br> <br> <br> LAYER <br> NAME "MyWFS"<br> CONNECTIONTYPE postgis<br> CONNECTION "user=JAVLLAR password=kreator host=localhost dbname=SlovGis"<br> DATA "the_geom FROM setl"<br> METADATA<br> WMS_SRS "EPSG:28992"<br> "wfs_title" "MyWFS" ## REQUIRED<br> "gml_featureid" "id" ## REQUIRED<br> "gml_include_items" "id" ## Optional (serves all attributes for layer)<br> END <br> DUMP TRUE ##
REQUIRED<br> STATUS ON<br> TYPE POINT<br> CLASS <br> NAME "WFSvrstva"<br> STYLE<br> SIZE 5<br> COLOR 0 0 0 <br> END <br> END <br> END<br> <br>END<br><br><br>Thanks for help.<br></div><br>
</body></html>