This is the front-end of Land Explorer, intended to be used with the back-end, which can be viewed here.
This is a Digital Commons Cooperative project. Please follow our contributor guidelines if you wish to participate in building Land Explorer.
- Node 16
- Yarn 1.22
- Clone this repo
yarn install- create a .env file in the config folder, copying and replacing the values in the .env.example
yarn start
-
Create a new tileset in Mapbox Studio from .geojson, .shp or .mbtiles data
-
Create a new style layer in "Land Explorer Styles" using the new tileset as data source.
-
Get map id - (click on tileset menu -> map ID (looks like "joolzt.4i2tzpgj"))
-
Append map id to data/mapSources.js composite url
-
Append map id to MapLandDataLayers.js Source component (tileJsonSource url).
-
Add new Layer component to MapLandDataLayers.js
- id is the style layer id (from Land Explorer Styles in mapbox studio, e.g. local-authority-greenbelt-bou-9r44t6)
- sourceId is composite (as we appended it to the composite source url in the last step)
- sourceLayer is the name of the source tileset (e.g Local_Authority_Greenbelt_bou-9r44t6)
- paint is taken from the json of the style layer (</> icon in the menu)
- fillOpacity is used to toggle the layers when active
"fill-opacity": activeLayers.indexOf('historic-flood-map-5y05ao') !== -1 ? .4 : 0,
-
Add new LandDataLayerToggle component to LeftPaneLandData.js, layerId is the style layer id (e.g. e.g. local-authority-greenbelt-bou-9r44t6)
-
Add layer key definition to
src/data/mapLayerKeyConfig.js
https://developer.ordnancesurvey.co.uk/
- Create a new account
- Complete profile
- Accept terms and conditions
- Choose a free trial plan for OS Maps for Enterprise api
- Choose a free trial plan for OS Places api
- Add one new key for OS Maps API Enterprise
- Add one new key containing all 3 OS Places APIs
- On next screen, click on the keys you just created to get the keys
- Put keys in constants.js
