<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello OLusers<br>
<br>
I have probelm with confusing display bahavior of vectorlayer from
goeserver as WFS.<br>
I created a rasterlayer from Mapserver and vector layer from Geoserver
as folows:<br>
<br>
<small><small>var options = {<br>
projection: new OpenLayers.Projection("EPSG:2180"),<br>
units: "m",<br>
maxResolution: 10,<br>
maxExtent: new
OpenLayers.Bounds(545440,226900,586250,261950)<br>
};<br>
<br>
map = new OpenLayers.Map('map',options);<br>
<br>
var topo = new OpenLayers.Layer.WMS( "Mapa
topo",<a class="moz-txt-link-rfc2396E" href="http://myserver/cgi-bin/wms?">"http://myserver/cgi-bin/wms?"</a>, <br>
{layers: 'topo', format: 'image/png',projection:
"EPSG:2180" },{'buffer':0} );<br>
<br>
map.addLayers([topo]);<br>
<br>
wfs = new OpenLayers.Layer.WFS(<br>
"WFS czysty",<br>
<a class="moz-txt-link-rfc2396E" href="http://myserver:8080/geoserver/wfs">"http://myserver:8080/geoserver/wfs"</a>,<br>
{typename: 'komunikacja:przystanki_mk'},<br>
{<br>
typename: "komunikacja:przystanki_mk"<br>
//featureNS: <a class="moz-txt-link-rfc2396E" href="http://www.openplans.org/topp">"http://www.openplans.org/topp"</a>,<br>
//extractAttributes: false,<br>
<br>
}<br>
);<br>
<br>
map.addLayers([wfs]);</small></small><br>
<br>
The topo layer displays correctly in all cases. Wfs-layer don't
displays points in Mozilla 3.6.3. In IE 8 I see my vectorpoints
correctly.<br>
Please tell me wat should I add to my code to see vectorlayer in
Mozilla?<br>
<br>
In the geoserver log I see:<br>
<small><small>/geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=559123,241606,572573,247236</small></small><br>
<br>
Also the geoserver give me the gml file and I can see this as<br>
<small><small><a class="moz-txt-link-freetext" href="http://myserver:8080/geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=562938,243383.5,569768,246168.5">http://myserver:8080/geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=562938,243383.5,569768,246168.5</a></small></small><br>
<small><small><small><small><br>
<wfs:FeatureCollection
xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://localhost:8080/komunikacjahttp://myserverl:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=komunikacja%3Aprzystanki_mkhttp://www.opengis.net/wfshttp://myserverl:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">"http://localhost:8080/komunikacja
http://myserverl:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=komunikacja%3Aprzystanki_mk
http://www.opengis.net/wfs
http://myserverl:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"</a>><br>
−<br>
<gml:boundedBy><br>
<gml:null>unknown</gml:null><br>
</gml:boundedBy><br>
−<br>
<gml:featureMember><br>
−<br>
<komunikacja:przystanki_mk fid="przystanki_mk.39"><br>
<komunikacja:name>Dworzec Główny Wschód</komunikacja:name><br>
<komunikacja:idkomunika>461</komunikacja:idkomunika><br>
<komunikacja:a_t>a</komunikacja:a_t><br>
−<br>
<komunikacja:the_geom><br>
−<br>
<gml:Point srsName=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml/srs/epsg.xml#2180">"http://www.opengis.net/gml/srs/epsg.xml#2180"</a>><br>
<gml:coordinates decimal="." cs="," ts="
">567877.55357216,245038.45782074</gml:coordinates><br>
</gml:Point><br>
</komunikacja:the_geom><br>
<komunikacja:klucz>dworzec główny wschód</komunikacja:klucz><br>
</komunikacja:przystanki_mk><br>
</gml:featureMember><br>
−<br>
<gml:featureMember><br>
−<br>
<komunikacja:przystanki_mk fid="przystanki_mk.40"><br>
<komunikacja:name>Dworzec Główny Wschód</komunikacja:name><br>
<komunikacja:idkomunika>461</komunikacja:idkomunika><br>
<komunikacja:a_t>a</komunikacja:a_t><br>
−<br>
<komunikacja:the_geom><br>
−<br>
<gml:Point srsName=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml/srs/epsg.xml#2180">"http://www.opengis.net/gml/srs/epsg.xml#2180"</a>><br>
<gml:coordinates decimal="." cs="," ts="
">567911.75531243,245032.42086227</gml:coordinates><br>
</gml:Point><br>
</komunikacja:the_geom></small></small></small></small><br>
...<br>
<br>
I tried to define point layer as vectorlayer with protocol WFS (as I
found in OL discussions):<br>
<br>
<small><small>var przystanki_wfs = new OpenLayers.Layer.Vector("WFS
przystanki protocol", {<br>
strategies: [new OpenLayers.Strategy.BBOX()],<br>
protocol: new OpenLayers.Protocol.WFS({<br>
//protocol: new OpenLayers.Protocol.WFS.v1_1_0({<br>
url: <a class="moz-txt-link-rfc2396E" href="http://myserver:8080/geoserver/wfs">"http://myserver:8080/geoserver/wfs"</a>,<br>
featureType: "komunikacja:przystanki_mk",
//featureType {String} Local (without prefix) feature typeName
(required). //TYPENAME=komunikacja:przystanki<br>
//featureNS: "komunikacja", //featureNS
{String} Feature namespace (optional). <a class="moz-txt-link-rfc2396E" href="http://opengeo.org">"http://opengeo.org"</a>
<a class="moz-txt-link-rfc2396E" href="http://postgis.org">"http://postgis.org"</a><br>
//featurePrefix:"komunikacja" , //Feature
namespace alias (optional - only used if featureNS is provided).
Default is ‘feature’.<br>
//featureNS: "komunikacja",<br>
srsName: "EPSG:2180",<br>
version: "1.0.0" //</small></small><small><small>version:
"1.1.0</small></small><small><small><br>
//schema:
<a class="moz-txt-link-rfc2396E" href="http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki">"http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki"</a>,<br>
})<br>
});<br>
map.addLayers([ przystanki_wfs]);<br>
</small></small><br>
Now I see no one point in this layer in Mozilla and no one in IE<br>
<br>
When I display the layer <small><small><big><big>przystanki_wfs</big></big>
</small></small>in Mozilla I see that Geoserver logs has new lines:<br>
<br>
<small>91.150.223.134 - - [29/maj/2010:16:52:22 +0000] "OPTIONS
/geoserver/wfs HTTP/1.1" 200 0<br>
91.150.223.134 - - [29/maj/2010:16:52:24 +0000] "OPTIONS
/geoserver/wfs HTTP/1.1" 200 0</small><br>
<br>
When I show the new layer in IE the log looks like so:<br>
<small>91.150.223.134 - - [29/maj/2010:16:54:39 +0000] "POST
/geoserver/wfs HTTP/1.1" 200 23047<br>
91.150.223.134 - - [29/maj/2010:16:54:56 +0000] "POST /geoserver/wfs
HTTP/1.1" 200 19968</small><br>
<br>
I tried change the version of WFS: to version: "1.1.0", <br>
enter a schema: as: schema:
<a class="moz-txt-link-rfc2396E" href="http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki">"http://myserver:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=komunikacja:przystanki"</a>,<br>
change the: strategies: [new OpenLayers.Strategy.Fixed()],<br>
It don't helped.<br>
<br>
I generated the gml file from Geoserver log<br>
<small><small>/geoserver/wfs?TYPENAME=komunikacja%3Aprzystanki_mk&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A2180&BBOX=559018,241636,572678,247206</small></small><br>
<br>
and defined the layer as GML layer<br>
<small><small>var gml = new OpenLayers.Layer.GML("GML",
"przystanki_gml.xml", {<br>
format: OpenLayers.Format.GML<br>
})<br>
map.addLayer(gml);<br>
</small></small>Now I see the points correctly in Mozilla and in IE.<br>
<br>
Pleace tell me what I'm doing wrong. I would like to user geoserver as
WSF-T to edit the points. What is the reason of so confusing behavior.<br>
<br>
Thanks<br>
<br>
Bartek<br>
<small><small> </small></small>
</body>
</html>