[TinyOWS-dev] Problems with showing a WFS feature with OpenLayers

Ermond Parllaku erndal02 at hotmail.com
Tue Apr 10 11:57:30 EST 2012


Hello to all,

First of all, I would like to say that I am very new with the Open-Source technologies (Apache especially). I have had experience only in MS technologies, so I am sorry for any mistakes in explaining the problems.

I installed MS4W with OpenLayers (in port 81) and I think I finally managed to configure also the TinyOWS (which I need for saving the data in PostGIS db). I configured the file config.xml in this way:

<tinyows online_resource="http://127.0.0.1:81/cgi-bin/tinyows.exe"
  schema_dir="http://127.0.0.1:81/tinyows/schema/"
         log="http://127.0.0.1:81/tinyows/tinyows.log">
  <pg host="localhost" user="postgres" password="olives001" dbname="olives_gis1" port="5432"/>
  <metadata name="TinyOWS Server"
         title="TinyOWS Server - WFS-T Frida Service" />

  <layer retrievable="1"
         writable="1"
         ns_prefix="tows"
         ns_uri="http://127.0.0.1:81/"
         srid="32634"
        prefix="tows"
        server="http://127.0.0.1:81/"
         schema="public"
         name="GLP_Zone"
         title="GLP_Zone" />
</tinyows>


In the html page, I am trying to configure two layers: one WMS layer (raster image) and one WFS layer (the layer for which I want to edit data). The WMS layer works well and is shown in the map viewer. Meanwhile the WFS layer doesn't show any features. The code for configuring the WFS layer is below:

    wfs = new OpenLayers.Layer.Vector("Editable Features", {
        styleMap: styles,
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        projection: new OpenLayers.Projection("EPSG:32634"),
        protocol: new OpenLayers.Protocol.WFS({
            version: "1.1.0",
            srsName: "EPSG:32634",
            url: "http://127.0.0.1:81/cgi-bin/tinyows",
            featureNS: "http://127.0.0.1:81/",
            featureType: "GLP_Zone",
            geometryName: "tows:the_geom",
            schema: "http://127.0.0.1:81/cgi-bin/tinyows?service=wfs&request=DescribeFeatureType&version=1.1.0&typename=tows:GLP_Zone"
        })
    });
    map.addLayer(wfs);

If I try the WFS layer with QGIS it shows correctly (by the URL: http://127.0.0.1:81/cgi-bin/tinyows) and I can even edit data from the QGIS. But from the mapviewer it just doesn't show any features. It looks like the code for configuring the wfs layer within the map viewer is not correct, but I just cannot find what error am I doing (I tried to copy the example from the MapServer page but obviously I am doing something wrong).

I am using MS4W 3.0.4 (with OL included) and tinyows-1.0.0rc3. The database is in PostgreSQL & PostGIS.

Thanks a lot in advance for any help!

Ermond



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-dev/attachments/20120410/811f89e9/attachment.htm 


More information about the TinyOWS-dev mailing list