Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Improve power plant label placement

Russ Garrettdb9ecb08d716
diff --git a/web/src/style/style_oim_power.ts b/web/src/style/style_oim_power.ts
index 9754b65..d1979cc 100644
--- a/web/src/style/style_oim_power.ts
+++ b/web/src/style/style_oim_power.ts
@@ -1105,8 +1105,14 @@ export default function layers(): LayerSpecificationWithZIndex[] {
'text-font': font,
'text-anchor': 'top',
'text-offset': interpolate(zoom, [
- [6, literal([0, 1])],
- [13, literal([0, 1.5])],
+ [7, literal([0, 1])],
+ [
+ 13,
+ interpolate(output, [
+ [0, literal([0, 1])],
+ [1000, literal([0, 1.5])]
+ ])
+ ],
[14, literal([0, 0])]
]),
'text-size': interpolate(zoom, [