From f8588c34fa6394b2f92727ab15cec592ac9b8c64 Mon Sep 17 00:00:00 2001 From: charliemcgrady <48264189+charliemcgrady@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:04:52 -0800 Subject: [PATCH] Bump tiles to december release (#183) Co-authored-by: Charles Mcgrady --- site/src/Layers.js | 56 +++++++++++++++---------- site/src/Map.jsx | 4 +- site/src/inspector_panel/SourcesRow.jsx | 1 + 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/site/src/Layers.js b/site/src/Layers.js index ccb8f7a..5d73cce 100644 --- a/site/src/Layers.js +++ b/site/src/Layers.js @@ -18,32 +18,44 @@ export const layers = [ color: "hsla(31, 100%, 90%, 0.33)", fillOutlineColor: "hsla(31, 100%, 90%)", activeColor: "hsla(30, 96%, 79%, 0.66)", - labelColor:"hsla(28, 100%, 46%, 1)", + labelColor: "hsla(28, 100%, 46%, 1)", }, { theme: "base", type: "land_cover", polygon: true, - color: [ "match", ["get", "subtype"], + color: [ + "match", + ["get", "subtype"], //greens - "moss", "hsla(98, 19%, 80%, 1)", - "forest", "hsla(98, 39%, 80%, 1)", - "grass", "hsla(98, 39%, 84%, 1)", - "crop", "hsla(98, 39%, 88%, 1)", + "moss", + "hsla(98, 19%, 80%, 1)", + "forest", + "hsla(98, 39%, 80%, 1)", + "grass", + "hsla(98, 39%, 84%, 1)", + "crop", + "hsla(98, 39%, 88%, 1)", //browns - "shrub", "hsla(80, 39%, 86%, 1)", - "barren", "hsla(62, 39%, 84%, 1)", + "shrub", + "hsla(80, 39%, 86%, 1)", + "barren", + "hsla(62, 39%, 84%, 1)", //teals - "wetland", "hsla(194, 39%, 80%, 1)", - "mangrove", "hsla(194, 39%, 84%, 1)", + "wetland", + "hsla(194, 39%, 80%, 1)", + "mangrove", + "hsla(194, 39%, 84%, 1)", //grays - "urban", "hsla(213, 19%, 89%, 1)", - "snow", "hsla(100, 0%, 96%, 1)", + "urban", + "hsla(213, 19%, 89%, 1)", + "snow", + "hsla(100, 0%, 96%, 1)", "hsla(0, 0%, 0%, 0)", ], fillOutlineColor: "hsla(208, 15%, 78%, 0)", activeColor: "hsla(183, 76%, 30%, 0.25)", - labelColor:"hsla(222, 49%, 91%, 0)", + labelColor: "hsla(222, 49%, 91%, 0)", }, { theme: "base", @@ -53,8 +65,8 @@ export const layers = [ minzoom: 13, color: "hsla(222, 49%, 91%, 1)", fillOutlineColor: "hsla(222, 49%, 81%, 1)", - activeColor:"hsla(222, 49%, 91%, 1)", - labelColor:"hsla(254, 100%, 66%, 1)", + activeColor: "hsla(222, 49%, 91%, 1)", + labelColor: "hsla(254, 100%, 66%, 1)", }, { theme: "base", @@ -65,8 +77,8 @@ export const layers = [ activeOnly: true, minzoom: 13, color: "hsla(222, 49%, 81%, 1)", - activeColor:"hsla(222, 49%, 91%, 1)", - labelColor:"hsla(254, 100%, 66%, 1)", + activeColor: "hsla(222, 49%, 91%, 1)", + labelColor: "hsla(254, 100%, 66%, 1)", }, { theme: "base", @@ -77,7 +89,7 @@ export const layers = [ color: "hsla(195, 71%, 90%, 1)", fillOutlineColor: "hsla(195, 71%, 89%, 1)", activeColor: "hsla(195, 77%, 85%, 1)", - labelColor:"hsla(209, 100%, 49%, 1)", + labelColor: "hsla(209, 100%, 49%, 1)", }, { theme: "base", @@ -89,7 +101,7 @@ export const layers = [ activeColor: "hsla(210, 15%, 65%, 0.25)", fillOutlineColor: "hsla(209, 13%, 52%, 0.5)", color: "hsla(209, 15%, 58%, 1)", - labelColor:"hsla(207, 17%, 37%, 1)", + labelColor: "hsla(207, 17%, 37%, 1)", }, { theme: "transportation", @@ -97,7 +109,7 @@ export const layers = [ line: true, color: "hsla(210, 16%, 82%, 0.4)", activeColor: "hsla(209, 100%, 72%, 0.5)", - labelColor:"hsla(214, 100%, 40%, 1)", + labelColor: "hsla(214, 100%, 40%, 1)", }, { theme: "transportation", @@ -105,7 +117,7 @@ export const layers = [ point: true, color: "hsla(210, 16%, 82%, 0.5)", activeColor: "hsla(209, 100%, 72%, 0.5)", - labelColor:"hsla(214, 100%, 40%, 1)", + labelColor: "hsla(214, 100%, 40%, 1)", pointSize: 5, }, { @@ -149,7 +161,7 @@ export const layers = [ line: true, color: "hsla(210, 16%, 82%, 1)", activeColor: "hsla(210, 16%, 82%, 1)", - labelColor: "hsla(201, 29%, 15%, 1)" + labelColor: "hsla(201, 29%, 15%, 1)", }, ]; diff --git a/site/src/Map.jsx b/site/src/Map.jsx index c5293ac..be44e88 100644 --- a/site/src/Map.jsx +++ b/site/src/Map.jsx @@ -21,7 +21,7 @@ import ThemeTypeLayer from "./ThemeTypeLayer"; import FeaturePopup from "./FeatureSelector"; const PMTILES_URL = - "pmtiles://https://d3c1b7bog2u1nn.cloudfront.net/2024-11-13/"; + "pmtiles://https://d3c1b7bog2u1nn.cloudfront.net/2024-12-18/"; const INITIAL_VIEW_STATE = { latitude: 38.90678, @@ -58,7 +58,7 @@ export default function Map({ navigatorOpen, setNavigatorOpen, themeRef, - visibleTypes, + visibleTypes, setVisibleTypes, }) { const mapRef = useRef(); diff --git a/site/src/inspector_panel/SourcesRow.jsx b/site/src/inspector_panel/SourcesRow.jsx index 033c1e0..158881d 100644 --- a/site/src/inspector_panel/SourcesRow.jsx +++ b/site/src/inspector_panel/SourcesRow.jsx @@ -10,6 +10,7 @@ function SourcesRow({ entity, mode, tips }) { case "meta": return `https://facebook.com/${source.record_id}`; case "OpenStreetMap": { + if (!source.record_id) return null; const match = source.record_id.match(/^([nwr])(\d+)(@\d+)?$/i); if (!match) return null;