Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a vector GML layer using a WFS query with a filter. The layer renders fine . However, the layer does not appear to have any features associated with it (layer.features.length is 0 )

I need to get the center lat/lon of this layer to do further processing. This is how I create the layer

layer= new OpenLayers.Layer.Vector("GML", {
               strategies: [new OpenLayers.Strategy.Fixed()],
               protocol: new OpenLayers.Protocol.WFS({
                        url:  <url>,
                featureType: "xxx",
                featureNS: "yyy",
                featurePrefix: "zzz"
               filter: new OpenLayers.Filter.Comparison({
                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
                    property: 'aa',
                    value: bb
share|improve this question
Welcome to SE-GIS! Would you be able to revise your question to make it more obvious what you are asking, please? The inclusion of a question mark in both the Title and Question will usually do that. I aslo added a tag for OpenLayers because you appear to be using that. – PolyGeo Apr 21 '13 at 7:29
You have first said that the layer renders fine, but later you have said that there are no features. Can you clarify? – Devdatta Tengshe Apr 26 '13 at 16:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.