Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Fix labels in layer switcher

Russ Garrett1a2c40a733d8
diff --git a/web/src/openinframap.ts b/web/src/openinframap.ts
index ea5d3d0..9501c23 100644
--- a/web/src/openinframap.ts
+++ b/web/src/openinframap.ts
@@ -56,7 +56,7 @@ export default class OpenInfraMap {
[
new LayerGroup(t('layers.background'), [
new Layer('N', t('layers.nighttime-lights'), 'black_marble', false),
- new Layer('L', t('layers.labels'), 'place_', true)
+ new Layer('L', t('layers.labels'), 'label_', true)
]),
new LayerGroup(t('layers.heatmaps'), [
new Layer('S', t('layers.solar-generation'), 'heatmap_', false)
diff --git a/web/src/style/style_labels.ts b/web/src/style/style_labels.ts
index 6f42098..ed63ff1 100644
--- a/web/src/style/style_labels.ts
+++ b/web/src/style/style_labels.ts
@@ -13,7 +13,7 @@ function pmLabel(lang: string): DataDrivenPropertyValueSpecification<string> {
export default function layers(lang: string): LayerSpecificationWithZIndex[] {
return [
{
- id: 'address_label',
+ id: 'label_address',
type: 'symbol',
source: 'basemap',
'source-layer': 'buildings',
@@ -32,7 +32,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'water_waterway_label',
+ id: 'label_water_waterway',
type: 'symbol',
source: 'basemap',
'source-layer': 'water',
@@ -52,7 +52,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'roads_labels_minor',
+ id: 'label_roads_minor',
type: 'symbol',
source: 'basemap',
'source-layer': 'roads',
@@ -72,7 +72,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'roads_labels_major',
+ id: 'label_roads_major',
type: 'symbol',
source: 'basemap',
'source-layer': 'roads',
@@ -92,7 +92,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'places_subplace',
+ id: 'label_places_subplace',
type: 'symbol',
source: 'basemap',
'source-layer': 'places',
@@ -115,7 +115,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'places_locality',
+ id: 'label_places_locality',
type: 'symbol',
source: 'basemap',
'source-layer': 'places',
@@ -154,7 +154,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'places_region',
+ id: 'label_places_region',
type: 'symbol',
source: 'basemap',
'source-layer': 'places',
@@ -176,7 +176,7 @@ export default function layers(lang: string): LayerSpecificationWithZIndex[] {
}
},
{
- id: 'places_country',
+ id: 'label_places_country',
type: 'symbol',
source: 'basemap',
'source-layer': 'places',