From 441e4d45b108bb575b6444f0cad1643d61c2d973 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 20 Mar 2026 17:07:31 +0000 Subject: [PATCH] Add parcel overlay to raster tile map Makes it easier to tell what parcel we're talking about. --- html/static/js/map-proxied-arcgis-tile.js | 8 ++++---- html/template/sync/review/pool.html | 25 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/html/static/js/map-proxied-arcgis-tile.js b/html/static/js/map-proxied-arcgis-tile.js index f41cc785..4d26f179 100644 --- a/html/static/js/map-proxied-arcgis-tile.js +++ b/html/static/js/map-proxied-arcgis-tile.js @@ -106,7 +106,7 @@ class MapProxiedArcgisTile extends HTMLElement { }); }); for (const on of this._preOns) { - this._map.on(on.a, on.b); + this._map.on(...on); } } @@ -134,11 +134,11 @@ class MapProxiedArcgisTile extends HTMLElement { jumpTo(args) { return this._map.jumpTo(args); } - on(a, b) { + on(...args) { if (this._map != null) { - return this._map.on(a, b); + return this._map.on(...args); } else { - this._preOns.push({ a: a, b: b }); + this._preOns.push(args); } } once(a, b) { diff --git a/html/template/sync/review/pool.html b/html/template/sync/review/pool.html index 738e69fc..fa2d7975 100644 --- a/html/template/sync/review/pool.html +++ b/html/template/sync/review/pool.html @@ -137,6 +137,31 @@ popup.remove(); }); }); + const map_tile = document.querySelector("map-proxied-arcgis-tile"); + map_tile.on("load", () => { + map_tile.addLayer({ + id: "parcel", + minzoom: 14, + paint: { + "line-color": "#0f0", + }, + source: "tegola", + "source-layer": "parcel", + type: "line", + }); + map_tile.addLayer({ + id: "pools", + paint: { + "circle-color": "#0D6EfD", + "circle-radius": 7, + "circle-stroke-width": 2, + "circle-stroke-color": "#024AB6", + }, + source: "tegola", + "source-layer": "feature-pool", + type: "circle", + }); + }); }); await this.fetchTasks(); },