Skip to content

Instantly share code, notes, and snippets.

@uprel
Last active November 19, 2018 08:02
Embed
What would you like to do?
Example of project settings for Extended QGIS Web Client. Features: search with project data with WMS standard using search panels and external services (MapBox) for geocoding, reverse geocoding and getting elevation data.
{
"search": [{
"title": "Places",
"useWmsRequest": true,
"queryLayer": "pop_places",
"formItems": [{
"xtype": "textfield",
"name": "name",
"fieldLabel": "Name",
"allowBlank": true,
"blankText": "Please enter a name",
"filterOp": "ILIKE"
}, {
"xtype": "textfield",
"name": "iso_cc",
"fieldLabel": "Country code",
"allowBlank": true,
"blankText": "Enter Country code (2 letters)",
"maxLength": 2,
"minLength": 2,
"filterOp": "ILIKE"
}, {
"xtype": "combo",
"name": "type",
"store": [
"National Capital",
"Provincial Capital",
"Large City",
"Town"
],
"fieldLabel": "Type",
"emptyText": "",
"typeAhead": false,
"forceSelection": true,
"selectOnFocus": true,
"filterOp": "="
}],
"gridColumns": [{
"header": "Name",
"dataIndex": "name",
"menuDisabled": true,
"renderer": "customURLFormatter"
}, {
"header": "Country code",
"dataIndex": "iso_cc",
"menuDisabled": true
}],
"selectionLayer": "pop_places",
"selectionZoom": 12,
"doZoomToExtent": false
}],
"geoCode": {
"zoom": 19,
"layers": "",
"country": "AT",
"provider": "mapbox"
},
"locationServices": [{
"name": "elevation",
"key": "your MapBox API access token",
"provider": "mapbox"
}, {
"name": "address",
"key": "your MapBox API access token",
"provider": "mapbox"
}]
}
@uprel
Copy link
Author

uprel commented Jul 27, 2017

Every part (search, geocode, locationServices) is optional, you don't need to have them all.

@uprel
Copy link
Author

uprel commented Nov 18, 2018

geocode.layers = MapBox type definition, can be address, place, poi,..., blank string for all types
geocode.country = 2 letter country code, can contain more values with comma separated. Blank string for worldwide search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment