Skip to content

Instantly share code, notes, and snippets.

Last active Sep 3, 2018
What would you like to do?
Getting multiple features with multiple cql filters at the same time
const axios = require('axios')
const geosolutions = ''
const URL = (typeNames, cqlFilter, propertyName) => `${geosolutions}/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=${typeNames}&propertyName=${propertyName}&cql_filter=${cqlFilter}&outputFormat=application/json`
const typeNames = '(topp:tasmania_water_bodies)(topp:tasmania_roads)'
const cqlFilter = `AREA<1066494066;TYPE='alley'`
const propertyName = '(CNTRY_NAME)(TYPE)'
const wfs = URL(typeNames, cqlFilter, propertyName)`Requesting WFS to ${wfs}`)
axios.get(wfs).then((response) => {
}).catch(err => console.error(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment