Merge branch 'master' into colouring-core
This commit is contained in:
commit
a1c69fdc13
@ -3,6 +3,7 @@ import React, { Fragment } from 'react';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import CheckboxDataEntry from '../data-components/checkbox-data-entry';
|
||||
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
import NumericDataEntryWithFormattedLink from '../data-components/numeric-data-entry-with-formatted-link';import DataEntry from '../data-components/data-entry';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
@ -71,8 +72,91 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
/>
|
||||
*/}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Planning contraints and building protection" collapsed={false} >
|
||||
<DataEntryGroup name="Building protection" collapsed={false} >
|
||||
<DataEntryGroup name="Planning zones" collapsed={true} >
|
||||
<InfoBox type='success'>
|
||||
Data in this section comes from the Greater London Authority's Planning London Datahub. Please check the original GLA source when using for planning purposes.
|
||||
</InfoBox>
|
||||
<LogicalDataEntry
|
||||
title="Is the building inside a flood zone?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
{/*
|
||||
<form className={`layer-switcher-inline`}>
|
||||
<button className="btn btn-outline btn-outline-dark"
|
||||
type="submit">
|
||||
Click to see the data mapped
|
||||
</button>
|
||||
</form>
|
||||
*/}
|
||||
<LogicalDataEntry
|
||||
title="Is the building in a strategic development zone for housing?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
{/*
|
||||
<form className={`layer-switcher-inline`}>
|
||||
<button className="btn btn-outline btn-outline-dark"
|
||||
type="submit">
|
||||
Click to see the data mapped
|
||||
</button>
|
||||
</form>
|
||||
*/}
|
||||
<LogicalDataEntry
|
||||
title="Is the building in a strategic development zone for commerce or industry?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
{/*
|
||||
<form className={`layer-switcher-inline`}>
|
||||
<button className="btn btn-outline btn-outline-dark"
|
||||
type="submit">
|
||||
Click to see the data mapped
|
||||
</button>
|
||||
</form>
|
||||
*/}
|
||||
<LogicalDataEntry
|
||||
title="Is the building within a protected sightline?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
{/*
|
||||
<form className={`layer-switcher-inline`}>
|
||||
<button className="btn btn-outline btn-outline-dark"
|
||||
type="submit">
|
||||
Click to see the data mapped
|
||||
</button>
|
||||
</form>
|
||||
*/}
|
||||
{/*
|
||||
<DataEntry
|
||||
title={dataFields.planning_glher_url.title}
|
||||
slug="planning_glher_url"
|
||||
value={props.building.planning_glher_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_glher_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_glher_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_glher_url")}
|
||||
user_verified_as={props.user_verified.planning_glher_url}
|
||||
verified_count={props.building.verified.planning_glher_url}
|
||||
/>
|
||||
*/}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Building protection" collapsed={true} >
|
||||
<InfoBox type='success'>
|
||||
This section provides information on heritage assets and building protection. To produce the most accurate spatial map possible we need to combine official data with crowdsourced data. Help us create this map together by checking, verifying and adding information.
|
||||
</InfoBox>
|
||||
<NumericDataEntryWithFormattedLink
|
||||
title={dataFields.planning_list_id.title}
|
||||
slug="planning_list_id"
|
||||
@ -80,7 +164,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="If yes, add ID"
|
||||
placeholder="If yes, add ID here"
|
||||
linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } }
|
||||
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
||||
/>
|
||||
@ -140,7 +224,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="If yes, add ID"
|
||||
placeholder="If yes, add ID here"
|
||||
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
|
||||
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
||||
/>
|
||||
@ -170,9 +254,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.planning_local_list_url}
|
||||
verified_count={props.building.verified.planning_local_list_url}
|
||||
/>
|
||||
<InfoBox msg="Designation data is currently incomplete. We are aiming for 100% coverage by April 2023." />
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Area protection" collapsed={false} >
|
||||
|
||||
{/*
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_conservation_area_id.title}
|
||||
slug="planning_in_conservation_area_id"
|
||||
@ -190,6 +273,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.planning_in_conservation_area_url}
|
||||
verified_count={props.building.verified.planning_in_conservation_area_url}
|
||||
/>
|
||||
*/}
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_conservation_area_url.title}
|
||||
slug="planning_in_conservation_area_url"
|
||||
@ -200,6 +284,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
isUrl={true}
|
||||
placeholder="Please add CA appraisal link here"
|
||||
/>
|
||||
{/*
|
||||
<DataEntry
|
||||
title={dataFields.planning_conservation_area_name.title}
|
||||
slug="planning_conservation_area_name"
|
||||
@ -216,6 +301,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.planning_conservation_area_name}
|
||||
verified_count={props.building.verified.planning_conservation_area_name}
|
||||
/>
|
||||
*/}
|
||||
<DataEntry
|
||||
title={dataFields.planning_historic_area_assessment_url.title}
|
||||
slug="planning_historic_area_assessment_url"
|
||||
@ -253,86 +339,10 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Other types of zoning" collapsed={false} >
|
||||
<CheckboxDataEntry
|
||||
title="Is the building inside a flood zone?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building in a strategic development zone for housing?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building in a strategic development zone for commerce or industry?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building within a protected sightline?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
{/*
|
||||
<DataEntry
|
||||
title={dataFields.planning_glher_url.title}
|
||||
slug="planning_glher_url"
|
||||
value={props.building.planning_glher_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_glher_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_glher_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_glher_url")}
|
||||
user_verified_as={props.user_verified.planning_glher_url}
|
||||
verified_count={props.building.verified.planning_glher_url}
|
||||
/>
|
||||
*/}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Land parcel ownership" collapsed={false} >
|
||||
<DataEntryGroup name="Land ownership type" collapsed={true} >
|
||||
<InfoBox type='success'>
|
||||
This section is designed to provide information on land parcels and their ownership type. Can you help us to crowdsource this information?
|
||||
</InfoBox>
|
||||
<SelectDataEntry
|
||||
slug='community_public_ownership'
|
||||
title={"What type of owner owns this land parcel? "}
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
interface InfoBoxProps {
|
||||
msg?: string;
|
||||
type?: 'info' | 'warning'
|
||||
type?: 'info' | 'warning' | 'success'
|
||||
}
|
||||
|
||||
const InfoBox: React.FC<InfoBoxProps> = ({msg, children, type = 'info'}) => (
|
||||
|
@ -143,7 +143,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
mapStyle: 'community_expected_planning_application_total',
|
||||
legend: {
|
||||
title: 'Expected planning application',
|
||||
description: 'People who think the building will be affected by a planning application in the near future',
|
||||
description: 'Sites identified by users as likely to be subject to planning application over the next six months',
|
||||
elements: [
|
||||
{ color: '#bd0026', text: '100+' },
|
||||
{ color: '#e31a1c', text: '50–99' },
|
||||
@ -171,7 +171,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
mapStyle: 'planning_combined',
|
||||
legend: {
|
||||
title: 'Designation/protection',
|
||||
disclaimer: 'All data relating to designated buildings should be checked on the National Heritage List for England or local authority websites where used for planning or development purposes',
|
||||
disclaimer: 'All data relating to designated buildings should be checked against the National Heritage List for England and local authority websites. Designation data is currently incomplete. We are aiming for 100% coverage by April 2023.',
|
||||
elements: [
|
||||
{ color: '#95beba', text: 'In Conservation Area'},
|
||||
{ color: '#c72e08', text: 'Grade I Listed'},
|
||||
|
@ -109,7 +109,7 @@ export const buildingUserFields = {
|
||||
community_expected_planning_application: {
|
||||
perUser: true,
|
||||
category: Category.Community,
|
||||
title: "Do you expect this site to be affected by a planning application in the near future?",
|
||||
title: "Select any building that you think may be subject to a planning application over the next six months and tick the box below to colour it.",
|
||||
example: true
|
||||
}
|
||||
};
|
||||
@ -508,7 +508,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
planning_historic_area_assessment_url: {
|
||||
category: Category.Planning,
|
||||
title: "Does it have any other type of <a href=\"https://historicengland.org.uk/images-books/publications/understanding-place-historic-area-assessments/\" target=\"_blank\">Historic Area Assessment</a>?",
|
||||
title: "Does it have an <a href=\"https://historicengland.org.uk/images-books/publications/understanding-place-historic-area-assessments/\" target=\"_blank\">Historic Area Assessment</a>?",
|
||||
example: "",
|
||||
//tooltip: ,
|
||||
},
|
||||
|
@ -38,16 +38,16 @@ router.get('/:tileset/:z/:x/:y(\\d+):scale(@\\dx)?.png', handleTileRequest);
|
||||
function parseTileParams(params: any): TileParams {
|
||||
const { tileset, z, x, y, scale } = params;
|
||||
|
||||
if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset');
|
||||
if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset: ' + tileset);
|
||||
|
||||
const intZ = strictParseInt(z);
|
||||
if (isNaN(intZ)) throw new Error('Invalid value for z');
|
||||
if (isNaN(intZ)) throw new Error('Invalid value for z: ' + intZ);
|
||||
|
||||
const intX = strictParseInt(x);
|
||||
if (isNaN(intX)) throw new Error('Invalid value for x');
|
||||
if (isNaN(intX)) throw new Error('Invalid value for x: ' + intX);
|
||||
|
||||
const intY = strictParseInt(y);
|
||||
if (isNaN(intY)) throw new Error('Invalid value for y');
|
||||
if (isNaN(intY)) throw new Error('Invalid value for y: ' + intY);
|
||||
|
||||
let intScale: number;
|
||||
if (scale === '@2x') {
|
||||
|
Loading…
Reference in New Issue
Block a user