fix(geoportal): font 404s + slim tile views for performance
- Labels: add text-font ["Noto Sans Regular"] (OpenFreeMap compatible) - Optimize views: gis_features/terenuri/cladiri/administrativ now exclude attributes, enrichment, timestamps (huge JSON columns that made tiles slow) - Views only include: id, layer_id, siruta, object_id, cadastral_ref, area_value, is_active, geom Run optimize-views again after deploy to apply slimmer views. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -381,7 +381,7 @@ export const MapViewer = forwardRef<MapViewerHandle, MapViewerProps>(
|
||||
map.addLayer({ id: LAYER_IDS.uatsZ8Line, type: "line", source: SOURCES.uatsZ8, "source-layer": SOURCES.uatsZ8, minzoom: 8, maxzoom: 12,
|
||||
paint: { "line-color": "#7c3aed", "line-width": 1 } });
|
||||
map.addLayer({ id: LAYER_IDS.uatsZ8Label, type: "symbol", source: SOURCES.uatsZ8, "source-layer": SOURCES.uatsZ8, minzoom: 9, maxzoom: 12,
|
||||
layout: { "text-field": ["coalesce", ["get", "name"], ""], "text-size": 10, "text-anchor": "center", "text-allow-overlap": false },
|
||||
layout: { "text-field": ["coalesce", ["get", "name"], ""], "text-font": ["Noto Sans Regular"], "text-size": 10, "text-anchor": "center", "text-allow-overlap": false },
|
||||
paint: { "text-color": "#5b21b6", "text-halo-color": "#fff", "text-halo-width": 1.5 } });
|
||||
|
||||
// === UAT z12+: full detail (no simplification) ===
|
||||
@@ -391,7 +391,7 @@ export const MapViewer = forwardRef<MapViewerHandle, MapViewerProps>(
|
||||
map.addLayer({ id: LAYER_IDS.uatsZ12Line, type: "line", source: SOURCES.uatsZ12, "source-layer": SOURCES.uatsZ12, minzoom: 12,
|
||||
paint: { "line-color": "#7c3aed", "line-width": 2 } });
|
||||
map.addLayer({ id: LAYER_IDS.uatsZ12Label, type: "symbol", source: SOURCES.uatsZ12, "source-layer": SOURCES.uatsZ12, minzoom: 12,
|
||||
layout: { "text-field": ["coalesce", ["get", "name"], ""], "text-size": 13, "text-anchor": "center", "text-allow-overlap": false },
|
||||
layout: { "text-field": ["coalesce", ["get", "name"], ""], "text-font": ["Noto Sans Regular"], "text-size": 13, "text-anchor": "center", "text-allow-overlap": false },
|
||||
paint: { "text-color": "#5b21b6", "text-halo-color": "#fff", "text-halo-width": 1.5 } });
|
||||
|
||||
// === Intravilan — double line (black outer + orange inner), no fill, z13+ ===
|
||||
@@ -411,6 +411,7 @@ export const MapViewer = forwardRef<MapViewerHandle, MapViewerProps>(
|
||||
map.addLayer({ id: LAYER_IDS.terenuriLabel, type: "symbol", source: SOURCES.terenuri, "source-layer": SOURCES.terenuri, minzoom: 16,
|
||||
layout: {
|
||||
"text-field": ["coalesce", ["get", "cadastral_ref"], ""],
|
||||
"text-font": ["Noto Sans Regular"],
|
||||
"text-size": 10, "text-anchor": "center", "text-allow-overlap": false,
|
||||
"text-max-width": 8,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user