Tonight
This commit is contained in:
parent
28323f145e
commit
94f9c0d594
76 changed files with 3238 additions and 1230 deletions
|
|
@ -19,7 +19,7 @@ export class ScreenshotCache {
|
|||
* Build a cache key by quantizing view params and hashing.
|
||||
* - lat/lon quantized to 2 decimal places
|
||||
* - zoom quantized to integer
|
||||
* - filters and POI categories sorted alphabetically
|
||||
* - filters, configurable filters, and POI categories sorted alphabetically
|
||||
*/
|
||||
buildKey(params: URLSearchParams): string {
|
||||
const normalized: Record<string, string> = {};
|
||||
|
|
@ -40,6 +40,16 @@ export class ScreenshotCache {
|
|||
normalized.filters = filters.join(',');
|
||||
}
|
||||
|
||||
const schools = params.getAll('school').sort();
|
||||
if (schools.length > 0) {
|
||||
normalized.school = schools.join(',');
|
||||
}
|
||||
|
||||
const crimes = params.getAll('crime').sort();
|
||||
if (crimes.length > 0) {
|
||||
normalized.crime = crimes.join(',');
|
||||
}
|
||||
|
||||
// Sort POI categories
|
||||
const pois = params.getAll('poi').sort();
|
||||
if (pois.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue