[mapserver-users] tinyows

aho forum.email.a at googlemail.com
Mon Nov 12 01:05:50 PST 2012


Hi Alexandre,

thanks for the good hints! This is really great! I think its not my 
tinyows.xml or the Openlayers... but the error message tells something 
else somehow... :(...  I changed it to the following:
xml configuration of tinyows:

<tinyows online_resource="http://127.0.0.1/cgi-bin/tinyows.exe"
        schema_dir="C:\ms4w\apps\tinyows\schema\"
        log="C:\ms4w\Apache\logs\tinows.log" log_level="15">
<pg host="127.0.0.1" user="postgres" password="postgres" 
dbname="tinyows" port="5432"/>
<metadata name="TinyOWS Server"
           title="TinyOWS Server - WFS-T Frida Service" />
<contact name="TinyOWS Server"
          site="http://www.tinyows.org/"
          email="tinyows-users at lists.maptools.org" />
<layer retrievable="1"
         writable="1"
        ns_prefix="tows"
        ns_uri="http://127.0.0.1/"
        name="frida"
        title="Frida Parks" />
</tinyows>

and the OpenLayers code:

   map = new OpenLayers.Map('map', {
       projection: new OpenLayers.Projection("EPSG:31467"),
       units: "m",
       maxResolution: "auto",
       maxExtent: new OpenLayers.Bounds(3427000,5788000,3444000,5800000),
       controls: [
           new OpenLayers.Control.PanZoom()
       ]
   });
   var osm = new OpenLayers.Layer.WMS(
       "OSM by Omniscale WMS",
       "http://osm.omniscale.net/proxy/service",
       {layers: 'osm', format: 'image/jpeg'},
       {projection:"EPSG:31467",  units: "m", maxResolution: "auto", 
maxExtent: new OpenLayers.Bounds(3427000,5788000,3444000,5800000)}
   );
   var saveStrategy = new OpenLayers.Strategy.Save();
   saveStrategy.events.register("success", '', showSuccessMsg);
   saveStrategy.events.register("fail", '', showFailureMsg);
   var wfs = new OpenLayers.Layer.Vector("Editable Features", {
       strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
       projection: new OpenLayers.Projection("EPSG:31467"),
       protocol: new OpenLayers.Protocol.WFS({
             version:"1.1.0",
           url: "http://127.0.0.1/cgi-bin/tinyows.exe",
           featureType: "frida",
           outputformat:"application/json",
           readFormat: new OpenLayers.Format.GeoJSON(),
           featureNS: "http://127.0.0.1/",
           geometryName: "the_geom"
       })
});
   map.addLayers([osm, wfs]);

   map.zoomToMaxExtent();

The layer is actually in  31467 - I want to get it working for the frida 
parks example. I reduced everything else in my javascript file.

But I think I have a problem with my configuration. I am setting the 
following in OpenLayers: OpenLayers.ProxyHost = 
"/cgi-bin/proxy.cgi?url="; and I saw that you were actually refering to 
a fcgi file in your config.xml. I thought I could define there the path 
to the tinyows.exe like this: http://127.0.0.1/cgi-bin/tinyows.exe - do 
I also give the proxy there?
Could you send me the content of your weather-sites-tinyows-1.0.0.fcgi 
file? I have to say that I can´t follow your instructions for setting 
the environment variable - I made that via the control Panel :) - and 
the ScriptAlias.

I have to install the wget first on windows, but thanks for that hint - 
I will try it after the restart now!

Thanks in advance,
Anna





Am 11/9/2012 2:50 PM, schrieb Alexandre Dubé:
> ### The apache config used to bind TinyOWS to this config using a 
> different url
> FastCgiServer /usr/lib/cgi-bin/tinyows-1.0.0-weather-sites.fcgi 
> -initial-env 
> TINYOWS_CONFIG_FILE=/opt/labs/weather-sites/etc/tinyows/config.xml
> ScriptAlias "/weather-sites-tinyows-1.0.0.fcgi" 
> "/usr/lib/cgi-bin/tinyows-1.0.0-weather-sites.fcgi" 




More information about the MapServer-users mailing list