[Users] why are my Search form results not georeferenced?

Robert Buckley robertdbuckley at yahoo.com
Sat Jul 9 14:10:56 CEST 2011


Thanks for the tip.

In firebug I see this.

<ogc:and>
<ogc:propertyislike wildCard="*" singleChar="." escape="!">
<ogc:propertyname>bez</ogc:propertyname>
<ogc:literal>WF 10</ogc:literal>
</ogc:propertyislike>
</ogc:and>
</ogc:filter>
</wfs:query>
</wfs:getfeature>

Does this reveal anything?




________________________________
Von: Antony Scott <Antony.Scott at sustain.co.uk>
An: Robert Buckley <robertdbuckley at yahoo.com>
Gesendet: Samstag, den 9. Juli 2011, 12:55:11 Uhr
Betreff: RE: [Users] why are my Search form results not georeferenced?

  
Robert
 
I've been working on the same thing, and had a similar problem - I thought I 
fixed it by including the srsName and using WFS 1.1.0, but I see you've already 
done that... Also have you looked at the WFS settings in  GeoServer?
 
Are you using Firebug to see the contents of the Post? I found this very useful 
- you can grab the GML and save to a file, then load that as a layer and see 
what happens.
 
Good luck
Antony

________________________________
 From: users-bounces at geoext.org [users-bounces at geoext.org] On Behalf Of Robert 
Buckley [robertdbuckley at yahoo.com]
Sent: 09 July 2011 10:46
To: users at geoext.org
Subject: [Users] why are my Search form results not georeferenced?


Hi,

After trying to install a search form into my project, I have had limited 
success. I can run the search and get correct results. The only problem is that 
all results are positioned at 0,0 off the coase of Africa and not where they are 
supposed to be.

I have obviously overlooked something rudimentary here. This type of issue is 
usually due to the wrong SRS being assigned, but if this were the case, why does 
the grid work fine before the search is actived?

To understand the problem try it out here.

http://maps.zgb.de/www/eeg/eeg_portal.html


Here is the code for the search. I am using the protocol from the source layer 
"layer_wea".

//layer_wea
var layer_wea = new OpenLayers.Layer.Vector("Windkraftanlagestandort", {
        styleMap: style_wea,
        projection: "EPSG:4326",
        strategies: [new OpenLayers.Strategy.Fixed()],
        protocol: new OpenLayers.Protocol.WFS({
            url: "http://maps.zgb.de/geoserver/wfs?",
            version: "1.1.0",
            featureType: "wea_wgs84",
            featureNS: "http://www.zgb.de/postgis",
            srsName: "EPSG:4326"
        }),
        eventListeners: {
            featuresadded: function () {
                var extent_wea = layer_wea.getDataExtent();
                mapPanel_wea.map.zoomToExtent(extent_wea);
            }
        }
    });

//search
    // create a GeoExt form panel (configured with an OpenLayers.Protocol
        // instance)
        
        
      var features = new Array();
      var formPanel = new GeoExt.form.FormPanel({
            width: 300,
            height: 200,
            region: "west",
            protocol: layer_wea.protocol,
            items: [{
                xtype: "textfield",
                name: "bez__like",
                value: "WF*",
                fieldLabel: "bez"
            }],
            listeners: {
                actioncomplete: function(form, action) {
                    // this listener triggers when the search request
                    // is complete, the OpenLayers.Protocol.Response
                    // resulting from the request is available
                    // through "action.response"
                   features = action.response.features;
                   store_wea.loadData(features);
                  
                }
            }
        });
        formPanel.addButton({
            text: "search",
            handler: function() {
                this.search();
            },
            scope: formPanel
        });
        
        var searchwin = new Ext.Window({
        title: "wfs search",
        layout: 'fit',
        width: 200,
        x:300,
        collapsible: true,
        height: 100,
        closeAction: 'hide',
        plain: true,
        items: [formPanel]
    });



If anyone has any clues i´d be grateful,

yours,

Rob



Sustain is a leading carbon reduction company. Our clients have saved
4,131,800 lifetime tCO2e through working with us (June 2011)
________________________________
 
Sustain Ltd. Registered in England No. 3384793 
Barley Wood Stables, Long Lane, Wrington, Bristol BS40 5SA, UK
________________________________
 
This e-mail and any attachments are strictly confidential and intended solely 
for the 

addressee. If you are not the intended recipient of this document then you must 
immediately inform the sender and delete this e-mail and any attachments from 
your system.
E-mail transmissions cannot be guaranteed to be secure or error free as 
information 

could be intercepted, corrupted, lost, destroyed, arrive late or incomplete. The 
sender 

does not accept liability for any errors or omissions in the content of this 
message 

which arise as a result of e-mail transmission.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110709/c5d9da62/attachment.htm 


More information about the Users mailing list