Skip to content

Commit

Permalink
Add forests and boundaries layer (#82)
Browse files Browse the repository at this point in the history
* Add Forest tms

* Update default styles

* Add tooltips for popup links

* Use dev branch to deploy to /dev #55 (#57)

action: static.yml Deploy main and dev content to amche.in via GitHub Pages

 When code is pushed to either main or dev branch:
 - main branch content gets deployed to the root (amche.in/)
 - dev branch content gets deployed to /dev/ (amche.in/dev/)
Every push triggers deployment of BOTH branches, regardless of which branch received the push.
this ensures both environments stay in sync with each deployment.

* remove feedback modal, link it directly (#60)

* remove unused js (#63)

* Update to GL style spec

* Fix color

* Fix layer styling

* Fix forest boundaries

* Add local boundary layer

* Update local boundaries legend

* Update forest legend

* Adjust styling of sidebar

* Add hover styling to sidebar layers

---------

Co-authored-by: Pratap Vardhan <[email protected]>
  • Loading branch information
planemad and pratapvardhan authored Jan 14, 2025
1 parent 3c76775 commit 5b4686e
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 88 deletions.
Binary file added assets/map-layer-forest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/map-layer-local-boundaries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 118 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,46 +216,36 @@ <h1 class="text-l"><a href="https://amche.in" class="text-white hover:underline"
let layersConfig = [
{
title: 'Community Pins',
description: 'Community Added Locations',
description: 'Pin your notes on the map for the rest of the community to see',
headerImage: 'assets/map-layer-pins.png',
type: 'markers',
id: 'community-pins',
dataUrl: 'https://docs.google.com/spreadsheets/d/1Y0l4aSIdks8G3lmxSxSKxuzLoARL-FCiYbTL9a0b3O0/gviz/tq?tqx=out:json&tq&gid=0',
attribution: 'Locations added by the community',
attribution: 'Source: Collected by amche.in | <a href="https://docs.google.com/spreadsheets/d/1Y0l4aSIdks8G3lmxSxSKxuzLoARL-FCiYbTL9a0b3O0/edit?resourcekey=&gid=485622101#gid=485622101">View Source Spreadsheet</a>',
style: {
color: '#FF4136',
radius: 8
'circle-color': '#FF4136',
'circle-radius': 8
},
inspect: {
title: 'Pin Details',
label: 'name',
fields: ['Location Name', 'Latitude', 'Longitude', 'Additional Notes (optional)', 'Timestamp_ago'],
fieldTitles: ['Name', 'Lat', 'Lon', 'Notes', 'Added'],
fields: ['Location Name', 'Additional Notes (optional)', 'Timestamp_ago'],
fieldTitles: ['Name', 'Notes', 'Added'],
}
},
{
title: 'Survey Plot Boundaries',
description: 'Cadastral Boundaries',
headerImage: 'assets/map-layer-survey.png',
type: 'vector',
id: 'goa-cadastral',
url: 'https://indianopenmaps.fly.dev/not-so-open/cadastrals/goa/bhunaksha/{z}/{x}/{y}.pbf',
sourceLayer: 'Goa_Bhunaksha_Cadastrals',
attribution: 'Source: <a href="https://bhunaksha.goa.gov.in/bhunaksha/">Goa Bhunaksha</a> - Collected by <a href="https://datameet.org">Datameet Community</a>',
style: {
color: 'hsla(0, 0%, 33%, .8)',
width: 1,
fillOpacity: 0.2
},
initiallyChecked: true,
inspect: {
id: 'id',
title: 'Survey Number',
label: 'kide',
fields: ['VillageNam', 'TalName'],
fieldTitles: ['Village', 'Taluk'],
customHtml: 'Source: <a href="https://bhunaksha.goa.gov.in/bhunaksha/" target="_blank">Bhunaksha Goa</a> | <a href="https://goaonline.gov.in/Appln/Uil/DeptServices?__DocId=REV&__ServiceId=REV31" target="_blank">View RoR</a>'
}
id: 'goa-local-body',
title: 'Local Body Boundaries',
description: '<span style="display: inline-block; width: 30px; height: 12px; border: 3px dashed hsl(269, 100%, 45%);margin-right:5px"></span>Municipal Boundaries <br><span style="display: inline-block; width: 30px; height: 12px; border: 1px dashed hsl(269, 100%, 45%);margin-right:5px"></span>Panchayat Boundaries',
headerImage: 'assets/map-layer-local-boundaries.png',
type: 'layer-group',
groups: [
{
id: 'goa-local-body',
title: 'Bhuvan Panchayat',
attribution: 'https://grammanchitra.gov.in/gm4MVC',
}
]
},
{
id: 'slope-zones',
Expand All @@ -265,18 +255,18 @@ <h1 class="text-l"><a href="https://amche.in" class="text-white hover:underline"
headerImage: 'assets/map-layer-slope.png',
legendImage: 'assets/map-layer-slope-legend.png',
groups: [
{
id: 'cartodem-2-5-m',
title: 'ISRO CartoDEM 2.5m (Partial)',
attribution: 'https://bhuvan-app3.nrsc.gov.in/data/',
location: 'Guirim'
},
{
id: 'nasadem-30-m',
title: 'NASA NASADEM 30m',
attribution: 'https://asterweb.jpl.nasa.gov/gdem.asp',
location: 'Goa'
},
{
id: 'cartodem-2-5-m',
title: 'ISRO CartoDEM 2.5m (Partial)',
attribution: 'https://bhuvan-app3.nrsc.gov.in/data/',
location: 'Guirim'
},
{
id: 'aster slope',
title: 'NASA Aster 30m (Goa Coast)',
Expand All @@ -285,6 +275,100 @@ <h1 class="text-l"><a href="https://amche.in" class="text-white hover:underline"
}
]
},
{
title: 'Survey Plot Boundaries',
description: 'Cadastral Boundaries',
headerImage: 'assets/map-layer-survey.png',
type: 'vector',
id: 'goa-cadastral',
url: 'https://indianopenmaps.fly.dev/not-so-open/cadastrals/goa/bhunaksha/{z}/{x}/{y}.pbf',
sourceLayer: 'Goa_Bhunaksha_Cadastrals',
maxzoom: 16,
attribution: 'Source: <a href="https://bhunaksha.goa.gov.in/bhunaksha/">Goa Bhunaksha</a> - Collected by <a href="https://datameet.org">Datameet Community</a>',
style: {
'fill-color': [
'interpolate',
['linear'],
['zoom'],
13, 'rgba(0, 0, 0, 0)',
16, 'rgba(0, 0, 0, 0.5)'
],
'line-color': 'black',
'line-width': [
'interpolate',
['linear'],
['zoom'],
14, [
'case',
['boolean', ['feature-state', 'selected'], false],
2,
['boolean', ['feature-state', 'hover'], false],
1.5,
0
],
18, [
'case',
['boolean', ['feature-state', 'selected'], false],
6,
['boolean', ['feature-state', 'hover'], false],
5,
.5
]
]
},
initiallyChecked: true,
inspect: {
id: 'id',
title: 'Survey Number',
label: 'kide',
fields: ['VillageNam', 'TalName'],
fieldTitles: ['Village', 'Taluk'],
customHtml: 'Source: <a href="https://bhunaksha.goa.gov.in/bhunaksha/" target="_blank">Bhunaksha Goa</a> | <a href="https://goaonline.gov.in/Appln/Uil/DeptServices?__DocId=REV&__ServiceId=REV31" target="_blank">View RoR</a>'
}
},
{
title: 'Reserve Forests',
description: 'Forest beat boundaries',
headerImage: 'assets/map-layer-forest.png',
type: 'vector',
id: 'india-forest',
url: 'https://indianopenmaps.fly.dev/not-so-open/forests/beats/fsi/{z}/{x}/{y}.pbf',
sourceLayer: 'FSI_Beats',
maxzoom: 11,
attribution: 'Source: <a href="https://bharatmaps.gov.in/BharatMaps/Home/Map">Bharatmaps/Forest Survey of India</a> - Collected by <a href="https://datameet.org">Datameet Community</a>',
style: {
'line-color': '#006400',
'line-width': [
'interpolate',
['linear'],
['zoom'],
14, [
'case',
['boolean', ['feature-state', 'selected'], false],
4,
['boolean', ['feature-state', 'hover'], false],
3,
1
],
18, [
'case',
['boolean', ['feature-state', 'selected'], false],
8,
['boolean', ['feature-state', 'hover'], false],
5,
.5
]
],
'fill-color': 'green'
},
inspect: {
id: 'OBJECTID_12',
title: 'Forest Range',
label: 'Beat_Name',
fields: ['Range'],
customHtml: 'Source: <a href="https://bhunaksha.goa.gov.in/bhunaksha/" target="_blank">Bharatmaps</a>'
}
},
{
title: 'Landuse Zoning Plans',
description: 'Regional Development Plans 2021',
Expand Down
Loading

0 comments on commit 5b4686e

Please sign in to comment.