LocalData / localdata-tiles

A tileserver for LocalData
5 stars 2 forks source link

Filters with key=val select old responses #154

Open hampelm opened 9 years ago

hampelm commented 9 years ago

Let's say we have two responses for a parcel:

  1. New response: occupied
  2. Old response: vacant

If we filter the map for status=vacant, the old result will be rendered on the map, even though it is superseded by the new response and shouldn't show up on the map as vacant. (If we just filter by "status", the map will look correct)

Can we easily filter to only the most recent entry's responses?

(this is mostly a note to self since I don't have time to dive into the code right now)

hampelm commented 9 years ago

Our entries list responses from oldest to newest. This means that the newest responses get rendered on top of old responses, which provides visually correct output in other situations.

That ordering means we can't use entries.0.responses... to select only the most recent result. We might be able to use slice to get the last response?

Oof.