diff --git a/src/App.tsx b/src/App.tsx index a3fc1c5..cf073b6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -78,7 +78,6 @@ const getCellVisualization = (union: s2.CellUnion): FeatureCollection => { console.error("polygonize error"); console.error(e); } - return collection; }); return { @@ -106,12 +105,12 @@ function App() { let covering; switch (snapshot[0].properties.mode) { case "rectangle": { - console.error("rectangle covering"); + console.info("rectangle covering"); covering = getCovering(regionCoverer, polygons, rectBuilder); break; } default: { - console.error("polygon covering"); + console.info("polygon covering"); covering = getCovering(regionCoverer, polygons, polygonBuilder); } } @@ -185,6 +184,20 @@ function App() { "line-color": "yellow", }, }); + map.addLayer({ + id: "covering-label", + type: "symbol", + source: "covering", + filter: ["<=", ["get", "level"], ["+", ["zoom"], 3]], + layout: { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "level"], + "text-size": 10, + }, + paint: { + "text-color": "yellow", + }, + }); }); }); @@ -194,9 +207,7 @@ function App() {