[OpenLayers-Users] Problems with parsing filter with BBOX

Alexandre Djioev djioev at gmail.com
Thu Jan 30 20:26:56 PST 2014


Hi everyone,

I have a filter string:








*<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc>">  <ogc:BBOX>
<ogc:PropertyName>the_geom</ogc:PropertyName>    <gml:Envelope
xmlns:gml="http://www.opengis.net/gml <http://www.opengis.net/gml>">
<gml:lowerCorner>-11578473.668571 5520333.6626814</gml:lowerCorner>
<gml:upperCorner>-11520954.804795 5536041.4719918</gml:upperCorner>
</gml:Envelope>  </ogc:BBOX></ogc:Filter>*

And I'm trying to parse it:

var parser = new OpenLayers.Format.Filter.v1_1_0();
var xml = new OpenLayers.Format.XML();
var filter = parser.read(xml.read(str).documentElement); //.firstChild

But filter is null. So I can generate above string wth Filter wrtier but
reverse doesn't work.
I checked the code in OpenLayers.Format.Filter.v1.js and other filter
versions and I can't find a reader function for BBOX. Also parsing for
other filters works fine, its just this particular one fails. So does OL
support read operation for ogc:BBOX or do I need extend filter parser
somehow?


Best regards, Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140131/443e154e/attachment.html>


More information about the Users mailing list