Toggle menu
44
33
34
2.1K
Landrace.Wiki - The Landrace Cannabis Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

North Bengal Plains: Difference between revisions

From Landrace.Wiki - The Landrace Cannabis Wiki
Created page with "== Accession Map == <div id="region-map" style="height: 500px; width: 100%;"></div> <script> var accessionData = { "type": "FeatureCollection", "features": [ {{#ask: Has growing region::North Bengal Plains |?Has GPS coordinates#lat=lat |?Has GPS coordinates#long=lon |?Has descriptive name=name |?Has conservation priority=status |?Has accession ID=id |format=template |template=Map/AccessionGeoJSON |sep=, }} ] }; (function() { var map = L.map('region-map').se..."
 
No edit summary
Line 1: Line 1:
== Accession Map ==
== Accession Map ==
<div id="region-map" style="height: 500px; width: 100%;"></div>
<div class="lw-map" data-accessions='{"type":"FeatureCollection","features":[{{#ask: [[Has growing region::North Bengal Plains]]
 
<script>
var accessionData = {
  "type": "FeatureCollection",
  "features": [
{{#ask: [[Has growing region::North Bengal Plains]]
|?Has GPS coordinates#lat=lat
|?Has GPS coordinates#lat=lat
|?Has GPS coordinates#long=lon
|?Has GPS coordinates#long=lon
Line 15: Line 9:
|template=Map/AccessionGeoJSON
|template=Map/AccessionGeoJSON
|sep=,
|sep=,
}}
}}]}'></div>
  ]
};
 
(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('<strong>' + props.name + '</strong><br>' +
                'ID: <a href="/wiki/' + props.id + '">' + props.id + '</a><br>' +
                '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>

Revision as of 09:19, 11 January 2026

Accession Map