[OpenLayers-Users] Problems with parsing filter with BBOX

Bart van den Eijnden bartvde at boundlessgeo.com
Thu Jan 30 23:47:48 PST 2014


It seems to me there is no reader for BBOX, a pull request to add that would be welcome.

Best regards,
Bart

--
Bart van den Eijnden
Front-end Developer | Boundless
@boundlessgeo

On 31 Jan 2014, at 05:26, Alexandre Djioev <djioev at gmail.com> wrote:

> Hi everyone,
> 
> I have a filter string:
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>   <ogc:BBOX>
>     <ogc:PropertyName>the_geom</ogc:PropertyName>
>     <gml:Envelope xmlns: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
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140131/6ed0df5b/attachment.html>


More information about the Users mailing list