North Bengal Plains
More actions
Accession Map
<script> var accessionData = {
"type": "FeatureCollection", "features": [
{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}},{"type":"Feature","properties":{"id":"{{{id}}}","name":"{{{name}}}","status":"{{{status}}}","page_url":"/wiki/North Bengal Plains"},"geometry":{"type":"Point","coordinates":[{{{lon}}},{{{lat}}}]}}
]
};
(function() {
var map = L.map('region-map').setView([26.3, 88.4], 9);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
var statusColors = {
'Critical': '#d32f2f',
'Endangered': '#f57c00',
'Vulnerable': '#fbc02d',
'Near Threatened': '#7cb342',
'Least Concern': '#388e3c',
'Data Deficient': '#9e9e9e'
};
accessionData.features.forEach(function(feature) {
if (feature.geometry && feature.geometry.coordinates) {
var coords = feature.geometry.coordinates;
var props = feature.properties;
var color = statusColors[props.status] || '#9e9e9e';
L.circleMarker([coords[1], coords[0]], {
radius: 8,
fillColor: color,
color: '#fff',
weight: 2,
fillOpacity: 0.8
})
.bindPopup('' + props.name + '
' +
'ID: <a href="/wiki/' + props.id + '">' + props.id + '</a>
' +
'Status: ' + props.status)
.addTo(map);
}
});
if (accessionData.features.length > 0) {
var bounds = [];
accessionData.features.forEach(function(f) {
if (f.geometry && f.geometry.coordinates) {
bounds.push([f.geometry.coordinates[1], f.geometry.coordinates[0]]);
}
});
if (bounds.length > 0) {
map.fitBounds(bounds, {padding: [20, 20]});
}
}
})(); </script>