This PR addresses issue #28, by adding support for a matrixed s query parameter when rquesting a tile. -- This allows for additional properties to be added to features, beyond what's specified in the layer defintion.
will also add properties named foo and name to each feature on each layer, populating them from ES source fields bar and nested.property, respectively.
RFC
These additional properties are currently applied across all requested layers. -- We could enhance this by making the source field parameter layer specific, such as <layername>:<propertyname>:<elastic_source_field_path>, with _all for <layername> referring to all layers again.
Implementation
The cleanest way to add support for this was to construct a new, temporary ElasticsearchSource instance for the lifetime of a request that has extra source field requests in doGetFeature. -- That temporary ElasticsearchSource contains those extra source fields and is then used for the remainder of the request, hence making the addition of extra fields transparent to the rest of the code.
Testing Done
Panning around on a map and using a URL that passes extra source field requests to tilenol and then confirming that they get properly attached to features.
Using wget to poke tilenol directly to test queries that do not use this new feature still work, and that malformed s arguments return an HTTP 400 error.
Description
This PR addresses issue #28, by adding support for a matrixed
s
query parameter when rquesting a tile. -- This allows for additional properties to be added to features, beyond what's specified in the layer defintion.For example, a request like
will also add properties named
foo
andname
to each feature on each layer, populating them from ES source fieldsbar
andnested.property
, respectively.RFC
These additional properties are currently applied across all requested layers. -- We could enhance this by making the source field parameter layer specific, such as
<layername>:<propertyname>:<elastic_source_field_path>
, with_all
for<layername>
referring to all layers again.Implementation
The cleanest way to add support for this was to construct a new, temporary
ElasticsearchSource
instance for the lifetime of a request that has extra source field requests indoGetFeature
. -- That temporaryElasticsearchSource
contains those extra source fields and is then used for the remainder of the request, hence making the addition of extra fields transparent to the rest of the code.Testing Done
tilenol
and then confirming that they get properly attached to features.wget
to poketilenol
directly to test queries that do not use this new feature still work, and that malformeds
arguments return an HTTP 400 error.