[mapserver-users] WFS-Mapscript

Dzilberte Bekode jancis2 at yahoo.com
Wed Jul 9 15:44:11 PDT 2008


Hi everybody.
I'm trying to handle WFS with Mapscript but it's not working for me.
Output of the code below supose to be the name of the GML file, but it's only empty string. 
What's wrong??

CODE::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<?php
 dl('php_mapscript.dll');  
 $map_path="/ms4w/apps/test/";
        
$map = ms_newMapObj($map_path."lol.map");
$kokot = $map->getLayerByName("MyWFS");
$GMLname= "= ".$kokot->executeWFSGetfeature()." =";
?>
<HTML>
   <HEAD>
     <TITLE>WFS-pokus</TITLE>
  </HEAD>
  <BODY>  
  <IMG SRC=<?php echo $image_url; ?> >
  <?php echo $GMLname; ?>
  </BODY>
 </HTML>


MAPFILE::::::::::::::::::::::::::::::

MAP
  NAME "demoPlugins"
  SIZE    600 400
  STATUS ON
  EXTENT -600000 -1334715 -159000 -1132715
  IMAGECOLOR 255 255 255
  UNITS METERS
  
  PROJECTION
    "init=EPSG:102067"
  END

   WEB
        IMAGEPATH "/ms4w/tmp/ms_tmp/"
        IMAGEURL "/ms_tmp/"
    METADATA
     "wfs_title" "msCross WFS Server" ## REQUIRED
     "wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv?" ## Recommended
     "wfs_srs" "EPSG:102067 EPSG:3064 EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326" ## Recommended
     END 
    END
    
  LEGEND
    STATUS EMBED
    KEYSIZE 20 15
  END

  ##########
  # LAYERS #
  ##########
 
  
  LAYER 
   NAME "MyWFS"
  CONNECTIONTYPE postgis
         CONNECTION "user=JAVLLAR password=kreator host=localhost dbname=SlovGis"
        DATA "the_geom FROM setl"
   METADATA
   WMS_SRS "EPSG:28992"
       "wfs_title" "MyWFS"      ## REQUIRED
        "gml_featureid" "id" ## REQUIRED
       "gml_include_items" "id" ## Optional (serves all attributes for layer)
     END 
   DUMP TRUE       ## REQUIRED
   STATUS ON
   TYPE POINT
    CLASS 
    NAME "WFSvrstva"
   STYLE
         SIZE 5
         COLOR 0 0 0 
     END 
    END  
  END
  
END


Thanks for help.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080709/41614663/attachment.htm>


More information about the MapServer-users mailing list