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

GetFeature with WFS layer is not working as the click co-ordinates are returned in spherical co-ordinates.

using geoserver 2.1.3 and openlayer 2.11

layer information is in EPSG:4326 WMS works fine WFS trasaction works fine

trying to GetFeature information on click from the WFS layer as the total number of features are small and it is a custom vector layer.

control = new OpenLayers.Control.GetFeature({
    protocol: wfs_layer_protocol,
    box: false,
    hover: false,
    click: true
});"featureselected", this, pickNodeId);

the WFS post request has the following bounds -14710846.457064 4317003.9227542-13710750.910779 6517099.4690396

share|improve this question

try this:

control = new OpenLayers.Control.GetFeature({
  protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),
  box: true,
  hover: true,
  multipleKey: "shiftKey",
  toggleKey: "ctrlKey"
  });"featureselected", this, function(e) {
  var feat = e.feature;
  var res = feat.transform(map.getProjectionObject(), new OpenLayers.Projection("EPSG:4326"))

i hope it helps you...

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.