Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of ol.format.OGC #6440

Closed
gevrum opened this issue Feb 3, 2017 · 1 comment
Closed

Addition of ol.format.OGC #6440

gevrum opened this issue Feb 3, 2017 · 1 comment

Comments

@gevrum
Copy link
Contributor

gevrum commented Feb 3, 2017

There is an example in documentation, which generates XML for GetFeature request.
http://openlayers.org/en/v3.20.1/apidoc/ol.format.filter.html

Is there any plans to make writer for WMS parameter from OL filter?

It could be made earlier in OL2 like this:

if (layer instanceof OpenLayers.Layer.Vector) {
            layer.filter = filter;
            layer.refresh({ force: true });
        } else if (layer instanceof OpenLayers.Layer.WMS) {
            var parser = new OpenLayers.Format.Filter.v1_1_0();    
            var filterAsXml = parser.write( filter );    
            var xml = new OpenLayers.Format.XML();
            var filterAsStringOGC = xml.write( filterAsXml );
            layer.mergeNewParams({ filter: filterAsStringOGC });
            layer.redraw();
        }
@bartvde
Copy link
Member

bartvde commented Aug 10, 2017

See: #5691

@bartvde bartvde closed this as completed Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants