perhaps using some:
console.log("WHAT IT IS GOING ON WITH": feat);
console.log("WHAT IT IS GOING ON WITH": bbox);console.log("WHAT IT IS GOING ON
WITH": center);
can help you to find the error.
__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es
necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie es
NICHT, wenn es NICHT notwendig ist.
Date: Wed, 20 Feb 2013 00:31:15 +0200
From: [email protected]
To: [email protected]
Subject: [OpenLayers-Users] GetFeature with WFS protocol doesn't return features
Hello,
When I'm trying to use GetFeature control to get features from my WFS run into
problems. The "featureselected" event never gets triggered.I debugged it little
bit and found out that the wfs request itself return a valid gml and the status
code of the request is 200. But still the features array of the result object
is empty so the code never gets to the select method of the GetFeature class.
Is this something to do with a proxy that I have set?I have set
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
I have configured GetFeature control as follows:
var select = new OpenLayers.Control.GetFeature({ protocol:
OpenLayers.Protocol.WFS({ url: "**:8080/geoserver/wfs",
featureType: "**", featureNS: "**",
geometryName: "geom" }), click:
true,
clickTolerance: 1, single: true,
hover: false }); select.events.register("featureselected", this,
function(e) {
var feat = e.feature; var bbox = feat.geometry.bounds;
var center = bbox.getCenterLonLat(); map.panTo(center); });
I would appreciate all the helpThanks
-Lauri
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users