Hi,

since your question is not about GeoExt, but GXP, it would have been better to 
ask at http://getsatisfaction.com/opengeo.

Anyway, your code would work fine with OpenLayers 2.8. There is a change in 
2.9.1 which makes it fail. I just created a ticket to fix this in OpenLayers. 
See http://trac.openlayers.org/ticket/2796

Regards,
Andreas.

On Aug 20, 2010, at 09:31 , Eoin Mac Aoidh wrote:

> Dear all,
> I am trying to breakdown and understand the QueryPanel example, which allows 
> you to add WFS layers matching given criteria to a map. Original example 
> hosted at: http://gxp.opengeo.org/trunk/core/examples/query.html
> 
> I am having trouble with two things:
> 1: returning a filtered XML containing only the objects meeting the query 
> criteria (the xml file returned contains All objects)
> 2: adding the new layer to the map.
> 
> My attempt is online at: 
> https://fishpoptrace.jrc.ec.europa.eu/newmap/query.html
> 
> An example query would be "CODE = FI" (to highlight Finland)
> Firebug shows the xml returned, which does not filter out the other countries 
> (it returns all countries)
> Placing breakpoints in the javascript, it appears to stall during the code 
> for the listener to the query button, which should add the layer to the map, 
> (code snippet for listener below).
> 
> I would be really grateful if any of you could help point me in the right 
> direction so that I could add the filtered layer to the map.
> Many thanks,
> Eoin
> 
> listeners: {
>             storeload: function(panel, store) {
>                 vector.destroyFeatures();
>                 var features = [];
>                 store.each(function(record) {
>                     features.push(record.get("feature"));
>                 });
>                 vector.addFeatures(features);
>             }
>         }
> 
> The code appears to stall at the lines:
>   
> store.each(function(record) {
>                     features.push(record.get("feature"));
>                 });
>  
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to