A versatile and lightweight toolkit for building a simple web map.
This project is maintained by qqnluaq
Use a select parameter to provide a value to the query predicate that comes from the user picking a value from a drop-down list.
The drop-down list is populated dynamically from the layer by finding all unique values for "uniqueAttribute"
property.
If the request to populate the drop-down fails, the drop-down field changes to an input field.
The "choices"
property may be used as well to provide a fall-back.
DO NOT use this parameter type if you know the number of unique values will be more than a few hundred.
A parameter object is defined with these properties. Click on a property name for more information:
{ "type": "select-unique", "id": null, "title": null, "value": null, "choices": null, "uniqueAttribute": null }
"type": String
The type of parameter object.
Must be one of these values:
"constant"
,
"input"
,
"select"
,
or
"select-unique"
.
"id": String
The unique identifier for the parameter.
This MUST be unique within the layer query parameter list.
Conventionally it is all lowercase with -
separating words.
"title": String
The title to show in query form for this parameter.
"value": String
The default value for the parameter. If not provided, the user MUST provide a value to execute the query.
"choices": Array
An array of { title, value }
objects to populate a drop-down list.
The title
is optional.
"uniqueAttribute": String
The name of the attribute on the layer that will be queried to find all unique values.