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

Pelord ogc filter ui ol olx v2 #132

Merged
merged 4 commits into from
Apr 11, 2018
Merged

Conversation

pelord
Copy link
Member

@pelord pelord commented Apr 11, 2018

Following my previous PR (Replace olx with ol.olx #130 )

This PR add an ui to the ogc filter previously merged into IGO2-lib

The UI can be used on any WFS source and on WMS (Geoserver and Mapserver 7.2 (not yet released)).

Into the context.json, we cant control the behavior of the component

"isOgcFilterable": true,
"ogcFilters": {"filtersAreEditable": true,"filters": {"operator": "Intersects", "propertyName": "geometry", "wkt_geometry": "POLYGON((-8015003 5942074,-8015003 5780349,-7792364 5780349,-7792364 5942074,-8015003 5942074))"}}
"sourceFields": [{"name": "nom_unite_","alias": "Nom unité administrative"}]

Option # 1 define if the source is ogcFilterable (based on server's capabilities)
Option # 2 allow to control if user can edit the filter in the UI. The other property allow to define filter that will be loaded into the ui and filter the datasource on initialisation of the layer.
Option # 3 allow to restrict which fields can be used into the UI. An alias can also be defined. No translation for the alias. In some case, the property "values" can be set to controls values exposed into the ui. Only these will be shown. ex: "values" : ['a','b','c'].

For WMS source, a WFS source cand be linked by adding this property to the layer. The wfs source will provide field name and values for the UI.
"wfsSource": { "url": "https://ahocevar.com/geoserver/wms", "featureTypes": "water_areas", "fieldNameGeometry": "the_geom", "maxFeatures": 10000, "version": "1.1.0", "outputFormat": "application/json", "outputFormatDownload": "application/vnd.google-earth.kml+xml" }

Whe way WFS source or WMS source with wfs linked get fields and values:
If service is WFS 2.0.0, then a GetPropertyValue operation is done.
For WFS < 2.0.0, a GetFeature call is made (200 first occurences) . This call is omiting the geometry field. Be carefull, GML do not return geometry field IF this field is not asked in the query. For Geojson outputformat, the geometry is returned by the server. This query can be very heavy for the server OR for the bandwidth.

@mbarbeau mbarbeau merged commit 9c57dff into master Apr 11, 2018
@mbarbeau mbarbeau deleted the pelord-ogc_filter_ui_ol_olx_v2 branch April 11, 2018 15:34
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

Successfully merging this pull request may close these issues.

2 participants