add special empty map

I am deeply unhappy about ugly disclaimer handling though right now I have no good ideas how to provide nicer display
This commit is contained in:
Mateusz Konieczny 2022-11-21 22:10:44 +01:00
parent 5ba6e270f2
commit bec6277706
5 changed files with 21 additions and 2 deletions

View File

@ -308,6 +308,8 @@
<LineSymbolizer stroke="#888" stroke-width="3.0"/> <LineSymbolizer stroke="#888" stroke-width="3.0"/>
</Rule> </Rule>
</Style> </Style>
<Style name="empty_map">
</Style>
<Style name="conservation_area"> <Style name="conservation_area">
<Rule> <Rule>
<PolygonSymbolizer fill="#73ebaf" /> <PolygonSymbolizer fill="#73ebaf" />

View File

@ -270,6 +270,15 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
{ color: '#8500d4', text: 'In Archaeological Priority Area'}, { color: '#8500d4', text: 'In Archaeological Priority Area'},
] ]
}, },
},
{
mapStyle: 'empty_map',
legend: {
title: 'Empty map',
disclaimer: 'This is an empty map to see overlays without distraction.',
elements: [
]
},
} }
], ],
[Category.Sustainability]: [{ [Category.Sustainability]: [{

View File

@ -17,6 +17,7 @@ export type BuildingMapTileset = 'date_year' |
'planning_applications_status' | 'planning_applications_status' |
'planning_applications_status_secretary_of_state' | 'planning_applications_status_secretary_of_state' |
'planning_combined' | 'planning_combined' |
'empty_map' |
'sust_dec' | 'sust_dec' |
'building_attachment_form' | 'building_attachment_form' |
'landuse' | 'landuse' |

View File

@ -81,7 +81,7 @@ export const Legend : FC<LegendProps> = ({
} }
{ {
elements.length === 0 ? elements.length === 0 ?
<p className="data-intro">Coming soon</p> : ( disclaimer ? <ul className={collapseList ? 'collapse data-legend' : 'data-legend'} ><p className='legend-disclaimer'>{disclaimer}</p></ul> : <p className="data-intro">Coming soon</p>) :
<ul className={collapseList ? 'collapse data-legend' : 'data-legend'} > <ul className={collapseList ? 'collapse data-legend' : 'data-legend'} >
{ {
disclaimer && <p className='legend-disclaimer'>{disclaimer}</p> disclaimer && <p className='legend-disclaimer'>{disclaimer}</p>

View File

@ -193,7 +193,14 @@ const LAYER_QUERIES = {
OR planning_heritage_at_risk_url <> '' OR planning_heritage_at_risk_url <> ''
OR planning_in_apa_url <> '' OR planning_in_apa_url <> ''
`, `,
conservation_area: ` empty_map: `
SELECT
geometry_id
FROM
buildings
WHERE
sust_dec IS NOT NULL`,
conservation_area: `
SELECT SELECT
geometry_id geometry_id
FROM FROM