Hi list members,
I want to identify all polygon features within distance of 100km to a
given point location. This is my code:
var qLayerSp = new OpenLayers.Layer.Vector( "spatial", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url:
"http://localhost/cgi-bin/mapserv.exe?map=c:/MS4W/apps/A/wfsCuad10.map",
featureType: 'Dlyr',
featurePrefix: 'ms',
srsName: "EPSG:25830",
version: '1.0.0',
extractAttributes: true
}),
filter: new OpenLayers.Filter.Spatial({
type: OpenLayers.Filter.Spatial.DWITHIN,
property: 'the_geom',
value: pnt_1, //OpenLayers.Geometry
in the same projection
distance: 100000,
distanceUnits: 'm'
}),
styleMap: cuadStyleMapFilterSp
}
);
This should identify all features within 100km distance to the point.
The point is rendered at the right position, but only the feature that
contains the point is selected.
According to Firebug, the filter is initialized twice: the first time
all options are returned as specified, but then something goes wrong:
the filtertype turns to BBOX (default??) with a value (bounds) that are
a total mystery to me.
Can anybody give me a clue?
Best regards
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users