Difference between revisions of "Range Layers"

From A.P.E.S. wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 30: Line 30:
 
       var url = 'files/REFUGIA_MALEY96.json';  // my GeoJSON data source, in same folder as my html page.
 
       var url = 'files/REFUGIA_MALEY96.json';  // my GeoJSON data source, in same folder as my html page.
 
       var url2 = 'files/species_15933.geojson';  // my GeoJSON data source, in same folder as my html page.
 
       var url2 = 'files/species_15933.geojson';  // my GeoJSON data source, in same folder as my html page.
 
+
      var gibbon1 = 'files/Hoolock_hoolock.geojson';
       var map = L.map('map').setView([-0, 6], 4);  
+
        
 +
var map = L.map('map').setView([-0, 6], 4);  
  
 
       var topo=new L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',{attribution: '&copy; <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map);
 
       var topo=new L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',{attribution: '&copy; <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map);
Line 45: Line 46:
 
       function style(feature) {
 
       function style(feature) {
 
         return {
 
         return {
           fillColor: 'green',  
+
           fillColor: '#bf31d8',  
           fillOpacity: 0.5,   
+
           fillOpacity: 0.7,   
 
           weight: 2,
 
           weight: 2,
           opacity: 1,
+
           opacity: 0.7,
           color: '#ffffff',
+
           color: '#bf31d8',
 
           dashArray: '3'
 
           dashArray: '3'
 
         };
 
         };
Line 61: Line 62:
 
         }
 
         }
 
       }
 
       }
 
+
function stylegibbon(feature) {
 +
        return {
 +
          fillColor: 'red',
 +
          fillOpacity: 0.7, 
 +
          weight: 2,
 +
          opacity: 0.7,
 +
          color: 'red',
 +
          dashArray: '3'
 +
        };
 +
      }
 
       // Null variable that will hold layer
 
       // Null variable that will hold layer
 
       var stateLayer = L.geoJson(null, {style: style});
 
       var stateLayer = L.geoJson(null, {style: style});
 
       var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2});
 
       var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2});
 +
      var gibbonLayer = L.geoJson(null, {style: stylegibbon});
  
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});
Line 71: Line 82:
 
       $.getJSON(url2, function(data) { stateLayer2.addData(data); });
 
       $.getJSON(url2, function(data) { stateLayer2.addData(data); });
 
       stateLayer2.addTo(map);
 
       stateLayer2.addTo(map);
 +
 +
      $.getJSON(gibbon1, function(data) { gibbonLayer.addData(data);});
 +
      gibbonLayer.addTo(map);
  
 
       // for Layer Control
 
       // for Layer Control
Line 81: Line 95:
 
       "Refugia":stateLayer,
 
       "Refugia":stateLayer,
 
       "Ape range":stateLayer2,
 
       "Ape range":stateLayer2,
 +
      "Gibbon range": gibbonLayer,
 
       };
 
       };
  

Latest revision as of 08:06, 1 March 2022

Avaiable Layers:[edit]

Ape range Download: Geographic shapefile (ZIP; 171 kB)]

Refugia after Maley 1996 Download: Geographic shapefile (ZIP; 85 kB)]