This control is used to select points from a layer. If layer is 
geoserver, then works fine.

                         
pointSelectControl[i].events.register("featureadded", this, function(e){
                             var protocol = new 
OpenLayers.Protocol.WFS.v1_1_0({
                                 url: 
layerobj[0].layers[combo.value].spatialQuery[0].url,
                                 geometryName: "SHAPE",
                                 featurePrefix: 
layerobj[0].layers[combo.value].spatialQuery[0].featurePrefix,
                                 featureType: 
layerobj[0].layers[combo.value].spatialQuery[0].featureType,
                                 srsName: (projstr=="EPSG:900913" && 
(layerobj[0].layers[combo.value].serverUrl.search(/arcgis/)>=0)) ? 
"EPSG:102113" : projstr
                             });
                             clearData();
                             protocol.read({
                                 filter: new OpenLayers.Filter.Spatial({
                                     type: 
OpenLayers.Filter.Spatial.DWITHIN,
                                     distance: 
map.getExtent().getHeight() / 10000000,
                                     distanceUnits: "m",
                                     value: e.feature.geometry
                                 }),
                                 callback: processSpatialQuery,
                                 scope: strategy
                             });
                         });

This generates:
|<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"; service="WFS" 
version="1.1.0" xsi:schemaLocation||="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; 
xmlns:xsi="http://www.w3.org||/2001/XMLSchema-instance"><wfs:Query 
typeName="Petroleum_wells" srsName="EPSG:102113"><ogc:Filter 
xmlns||:ogc="http://www.opengis.net/ogc";><ogc:DWithin><ogc:PropertyName>SHAPE</ogc:PropertyName><gml:Point
 
xmlns||:gml="http://www.opengis.net/gml"; 
srsName="EPSG:102113"><gml:pos>19386414.338657 
-4738138.3627612</gml||:pos></gml:Point><ogc:Distance 
units="meter">0.15605383691906002</ogc:Distance></ogc:DWithin></ogc:Filter||></wfs:Query></wfs:GetFeature>

|If layer is arcgis, then I get exception:

|<ows:ExceptionReport version='1.1.0' language='en' 
xmlns:ows='http://www.opengis.net/ows'><ows:Exception||  
exceptionCode='InvalidParameterValue'><ows:ExceptionText>The spatial operation 
is invalid (invalid name||  or namespace for distance 
element).</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

Anyone got idea on what this error means?

Oddly, polygon selection works and works whatever distance units I put in.
|


-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232


Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to