I've now added the following line to my code:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"> <script type="text/javascript" src="/proj4js/lib/proj4js.js"></script><br>
</blockquote><div> </div><div>Is that sufficient or do I have to add someting like a reprojection-statement in my WFS-definition?<br>Cheers<br>Andreia <br></div><br><div class="gmail_quote">2010/8/16 Adam Ratcliffe <span dir="ltr"><<a href="mailto:adam@prema.co.nz">adam@prema.co.nz</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div>You may need to include the Proj4js library, if you're not already, as your map projection is not spherical mercator.</div>
<div><br></div><div>Cheers</div><div>Adam</div><div><div></div><div class="h5"><br><div><div>On 16/08/2010, at 10:01 PM, andreia farrér wrote:</div><br><blockquote type="cite">Hi Adam,<br>thanks a lot for the quick reply.<br>
I now activated the 'extent'-option, but the result is still the same, no feature-rendering. I don't think it's related to the missing "zoom/center"-options, but as I'm quite new to GeoExt/OL so I can't rule it out for sure.<br>
Cheers<br>Andreia<br><br><br><br><div class="gmail_quote">2010/8/16 Adam Ratcliffe <span dir="ltr"><<a href="mailto:adam@prema.co.nz" target="_blank">adam@prema.co.nz</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
HI Andreia,<br>
<br>
I note that you've commented out the 'extent' option in the MapPanel<br>
configuration and you have no 'zoom' and 'center' options specified -<br>
could that be the problem?<br>
<br>
You could try adding the vector layer to the map and letting the<br>
MapPanel create a LayerStore for you from the map's 'layers' array,<br>
though looking at the docs the 2 approaches look like they should be<br>
equivalent.<br>
<br>
Cheers<br>
Adam<br>
<div><div></div><div><br>
On Mon, Aug 16, 2010 at 9:24 PM, andreia farrér<br>
<<a href="mailto:andreia.farrer@gmail.com" target="_blank">andreia.farrer@gmail.com</a>> wrote:<br>
> Dear List<br>
> I am trying to build a WFS-T-application with GeoExt/Openlayers. The<br>
> features are stored in a PostGIS-DB and are served by Geoserver.<br>
> I managed to retrieve the features (as stated by HttpFox), but somehow they<br>
> won't show up in my mappanel. The code is based on the<br>
> wfs-states.html-example<br>
> (<a href="http://openlayers.org/dev/examples/wfs-states.html" target="_blank">http://openlayers.org/dev/examples/wfs-states.html</a>). I simply can't figure<br>
> out why the features aren't rendered.<br>
> Here's my snippet:<br>
><br>
>> Ext.BLANK_IMAGE_URL = "../ext/resources/images/default/s.gif";<br>
>><br>
>> Ext.onReady(function() {<br>
>> OpenLayers.ProxyHost = "../cgi-bin/proxy.cgi?url=";<br>
>><br>
>> var map_options = {maxExtent: new OpenLayers.Bounds(10000, -240000,<br>
>> 1380000, 580000),<br>
>> numZoomLevels: 12, maxScale: 5000, minScale: 2000000,<br>
>> units: 'm', projection: 'EPSG:21781'};<br>
>><br>
>> var map = new OpenLayers.Map(map, map_options,{<br>
>> allOverlays: true<br>
>> });<br>
>><br>
>> var modifyControl = new<br>
>> OpenLayers.Control.ModifyFeature(ogmlines); //ÄNDERN!<br>
>> map.addControl(modifyControl);<br>
>> modifyControl.activate();<br>
>><br>
>><br>
>> var saveStrategy = new OpenLayers.Strategy.Save({<br>
>> onCommit: function() {<br>
>> saveStrategy.ogm_lines.refresh();<br>
>> }<br>
>> });<br>
>><br>
>> ogmlines = new OpenLayers.Layer.Vector("lines",{<br>
>> strategies:[<br>
>> new OpenLayers.Strategy.BBOX(),<br>
>> saveStrategy<br>
>> ],<br>
>> projection: new OpenLayers.Projection("EPSG:21781"),<br>
>> protocol: new OpenLayers.Protocol.WFS({<br>
>> version: '1.1.0',<br>
>> srsName: 'EPSG:21781',<br>
>> url: '<a href="http://localhost:8090/geoserver/wfs" target="_blank">http://localhost:8090/geoserver/wfs</a>',<br>
>> //?strict=true<br>
>> featureType: 'ogm_lines',<br>
>> featurePrefix: 'OpenGeoMap',<br>
>> geometryName: 'the_geom',<br>
>> extractAttribute: true<br>
>> }),<br>
>> });<br>
>><br>
>> var mapPanel = new GeoExt.MapPanel({<br>
>> title: "Map",<br>
>> region: "west",<br>
>> width: 600,<br>
>> map: map,<br>
>> layers: [ogmlines],<br>
>> //extent: new OpenLayers.Bounds(485000, 63000, 833000,<br>
>> 296000),<br>
>> bbar: [<br>
>> new GeoExt.Action({<br>
>> control: new OpenLayers.Control.DrawFeature(<br>
>> ogmlines, OpenLayers.Handler.Polygon, {<br>
>> //ogmlines!<br>
>> handlerOptions: {multi: true}<br>
>> }<br>
>> ),<br>
>> text: "Create",<br>
>> toggleGroup: "tools",<br>
>> map: map<br>
>> }), {<br>
>> text: "Delete",<br>
>> handler: function() {<br>
>><br>
>> gridPanel.getSelectionModel().each(function(rec) {<br>
>> var feature = rec.get("feature");<br>
>> modifyControl.unselectFeature(feature);<br>
>> gridPanel.store.remove(rec);<br>
>> if(feature.state !==<br>
>> OpenLayers.State.INSERT) {<br>
>> feature.state =<br>
>> OpenLayers.State.DELETE;<br>
>> ogm_polygons.addFeatures([feature]);<br>
>> }<br>
>> })<br>
>> }<br>
>> }, "->", {<br>
>> text: "Save",<br>
>> handler: function() {<br>
>> store_polygons.commitChanges();<br>
>> saveStrategy.save();<br>
>> }<br>
>> }<br>
>><br>
>> ]<br>
>> });<br>
>> }<br>
><br>
> Any help is HIGHLY appreciated.<br>
> Kind regards<br>
> Andreia<br>
><br>
> --<br>
> Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93<br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>
> <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br>Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93<br>
</blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><br>-- <br>Andreia Farrér, Birmensdorferstr. 260, 8055 Zürich; phone: +41 78 825 44 93<br>