irceline / opendataviewer

A light weight viewer for displaying air quality data throughout Belgium, customisable via URL-parameters
Apache License 2.0
3 stars 1 forks source link

onclick pop-up with time series via `getFeatureInfo` #9

Open opeeters opened 4 years ago

opeeters commented 4 years ago

Currently, when clicking on a station, you get e.g. this:

Screenshot 2020-01-10 at 12 35 41

When clicking in between stations, this pop-up generated via L.WMS is empty:

Screenshot 2020-01-10 at 12 36 02

Instead, the click-event could trigger a graph generation (concentration versus time) for interval:

Example getFeatureInfo:

stevenvdbosch commented 4 years ago

@opeeters as library we could use chart.js. I've made a small sample: https://jsfiddle.net/vf2okq8y/

As estimation i would say 2 days. It seems fairly easy to make a single chart, but we should take in to account:

Some initial questions: Can you inform me about how to use the getFeatureInfo service? Can i give a bbox of 2 times the point where was clicked? or does it need to be an enclosing bbox? Is it possible to get multiple times in one request? or do we have to do really 24 requests (for the 24 different hours) for hmean? (this seems a lot and rather inefficient)