Spatial Filter via the map (How to link the geometries of the features shown in the current bounding box along with their properties?)
Hello,
I would like to know if there is a way to link the data shown on the bounding box (left) with their properties (right). For instance, for the attached image, I would like to have only three rows (right) showing the properties of the three features (left).

I'm guessing that it should be in https://github.com/geopython/pygeoapi/blob/master/pygeoapi/templates/collections/items/index.html but I don't know what/where to modify.
Thanks
index.html certainly is the template to update https://github.com/geopython/pygeoapi/blob/87de3cf4d162e84f39ec49da9f87dfe76cfe5ba8/pygeoapi/templates/collections/items/index.html#L139
try something like
map.on('zoomend', function() {
setMapFilter(map.bounds)
});
map.on('dragend', function() {
setMapFilter(map.bounds)
});
setMapFilter = function(bounds) {
location.href += '&bbox='+bounds;
}
On the zoom-in/out event; we would need to update the url of the page to include &bbox={new bounds}, eg. https://demo.pygeoapi.io/stable/collections/dutch_windmills/items?bbox=2,50,4,53
We should probably add a small wait, in case people use scroll and may fire multiple events
Potentially ajax can be used to update the page partially
Sorry if I jump in and don't know if you have already considered this potential issue but the specification states that f=json and f=html should provide different view formats of the same data underneath.
So in practice, the template could be potentially considered a static view despite the zoom functionality.
Otherwise, it could look like the HTML view is diverging from this principle and behaves as an application per se rather than as an API view
Thank you for the comment @francbartoli, exactly for this reason my suggestion is to update the url with a box filter when zooming, so in case people ask the same url as json, it will present the same features
You indicate: html template should not evolve to what is received as an ‘application’, is that from a maintenance or standards design perspective? In my opinion the html representation should be as usable as possible to be successful
Thank you for the comment @francbartoli, exactly for this reason my suggestion is to update the url with a box filter when zooming, so in case people ask the same url as json, it will present the same features
that would work IMHO as long as the user action to zoom in/out would trigger a reload of the page with the bbox parameter so that the f=html page will continue to be stateless and coherent with the link f=json of the JSON representation
You indicate: html template should not evolve to what is received as an ‘application’, is that from a maintenance or standards design perspective?
standards design perspective, as per the above statement the issue could be to break the principle of being stateless and behaving like an application (with states) rather than an API
In my opinion the html representation should be as usable as possible to be successful
As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.
As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.