Skip to content

Commit

Permalink
Merge pull request #858 from stadtnavi/feat/additional-geojson-layers
Browse files Browse the repository at this point in the history
feat(map-layer): add additional geojson layers
  • Loading branch information
hbruch authored Dec 19, 2024
2 parents 22adfcb + ef349c1 commit 06921b7
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 40 deletions.
13 changes: 10 additions & 3 deletions app/component/MapLayersDialogContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class MapLayersDialogContent extends React.Component {
]
.concat(
this.layerOptionsByCategory(
'bicycle',
'bicycle_car',
config.geoJson?.layers,
geoJson,
this.props.lang,
Expand Down Expand Up @@ -454,7 +454,7 @@ class MapLayersDialogContent extends React.Component {
.concat(getPoiLayers(leisureAndTourismLayer))
.concat(
this.layerOptionsByCategory(
'other',
'leisure_and_tourism',
config.geoJson?.layers,
geoJson,
this.props.lang,
Expand Down Expand Up @@ -486,7 +486,14 @@ class MapLayersDialogContent extends React.Component {
defaultMessage: 'Health & Social Services',
})}
onChange={this.updateSetting}
options={getPoiLayers(healthAndSocialServicesLayer)}
options={getPoiLayers(healthAndSocialServicesLayer).concat(
this.layerOptionsByCategory(
'health_and_social_services',
config.geoJson?.layers,
geoJson,
this.props.lang,
),
)}
/>
</div>

Expand Down
112 changes: 75 additions & 37 deletions app/configurations/config.herrenberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,43 +351,81 @@ export default configMerger(parentConfig, {

// adding assets/geoJson/hb-layers layers
geoJson: {
layers: [
// bicycleinfrastructure includes shops, repair stations,
{
name: {
fi: '',
en: 'Service stations and stores',
de: "Service Stationen und Läden",
},
url: 'https://data.mfdz.de/hbg/dt-layers/bicycleinfrastructure.geojson',
category: 'bicycle',
icon: 'icon-icon_bike_repair',
},
// LoRaWan map layer
{
name: {
fi: '',
en: 'LoRaWAN Gateways',
de: 'LoRaWAN Gateways',
},
url: 'https://data.mfdz.de/hbg/dt-layers/lorawan-gateways.geojson',
category: 'other',
isOffByDefault: true,
icon: 'icon-icon_gateways',
},
// Nette Toilette layer
{
name: {
fi: '',
en: 'Public Toilets',
de: 'Nette Toilette',
},
url: 'https://data.mfdz.de/hbg/dt-layers/toilet.geojson',
category: 'other',
isOffByDefault: true,
icon: 'icon-icon_public_toilets',
},
],
layers: [
// bicycleinfrastructure includes shops, repair stations,
{
name: {
fi: '',
en: 'Service stations and stores',
de: 'Service Stationen und Läden',
},
url: 'https://data.mfdz.de/hbg/dt-layers/bicycleinfrastructure.geojson',
category: 'bicycle_car',
icon: 'icon-icon_bike_repair',
},
// Bicycle network layer
{
name: {
fi: '',
en: "Bicycle network",
de: 'Radnetz',
},
category: 'bicycle_car',
url: 'https://api.mobidata-bw.de/geoserver/MobiData-BW/wms',
icon: 'icon-icon_radnetz',
isOffByDefault: true,
minZoom: 12,
type: 'wmst',
layers: 'MobiData-BW:radvis_cycle_network',
attribution: 'RadNETZ-BW',
},
// LoRaWan map layer
{
name: {
fi: '',
en: 'LoRaWAN Gateways',
de: 'LoRaWAN Gateways',
},
url: 'https://data.mfdz.de/hbg/dt-layers/lorawan-gateways.geojson',
category: 'leisure_and_tourism',
isOffByDefault: true,
icon: 'icon-icon_gateways',
},
// Nette Toilette layer
{
name: {
fi: '',
en: 'Public Toilets',
de: 'Nette Toilette',
},
url: 'https://data.mfdz.de/hbg/dt-layers/toilet.geojson',
category: 'leisure_and_tourism',
isOffByDefault: true,
icon: 'icon-icon_public_toilets',
},
{
name: {
fi: '',
en: 'sights',
de: 'Sehenswürdigkeiten',
},
url: 'https://data.mfdz.de/hbg/dt-layers/sights.geojson',
category: 'leisure_and_tourism',
isOffByDefault: true,
icon: 'icon-icon_sights',
},
{
name: {
fi: '',
en: 'School route map',
de: 'Schulwegplan',
},
url: 'https://data.mfdz.de/hbg/dt-layers/school_routes.geojson',
category: 'health_and_social_services',
isOffByDefault: true,
icon: 'icon-icon_school_bus',
},
],
},

layers,
Expand Down
1 change: 1 addition & 0 deletions static/svg-icons/stadtnavi/icon-icon_school_bus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/svg-icons/stadtnavi/icon-icon_sights.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 06921b7

Please sign in to comment.