Difference between revisions of "Range test"

From A.P.E.S. wiki
Jump to navigation Jump to search
(Created page with "<html> <head> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> <script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></scrip...")
 
Line 20: Line 20:
 
       // GEOJSON FILES  
 
       // GEOJSON FILES  
 
       var hoolockhoolock = 'files/Hoolock_hoolock.geojson';  
 
       var hoolockhoolock = 'files/Hoolock_hoolock.geojson';  
 +
      var hoolockleuconedys = 'files/Hoolock_leuconedys.geojson';
 
        
 
        
 
var map = L.map('map').setView([10, 110], 4);  
 
var map = L.map('map').setView([10, 110], 4);  
Line 43: Line 44:
 
         };
 
         };
 
       }
 
       }
 +
 +
function stylehoolockleuconedys(feature) {
 +
        return {
 +
          fillColor: 'purple',
 +
          fillOpacity: 0.7, 
 +
          weight: 2,
 +
          opacity: 0.7,
 +
          color: 'purple',
 +
          dashArray: '3'
 +
        };
 +
      }
 +
 
       // Null variable that will hold layer
 
       // Null variable that will hold layer
 
       var hoolockhoolockLayer = L.geoJson(null, {onEachFeature: forEachFeature, style: stylehoolockhoolock});
 
       var hoolockhoolockLayer = L.geoJson(null, {onEachFeature: forEachFeature, style: stylehoolockhoolock});
 +
      var hoolockleuconedysLayer = L.geoJson(null, {onEachFeature: forEachFeature, style: stylehoolockleuconedys});
  
 
       $.getJSON(hoolockhoolock, function(data) { hoolockhoolockLayer.addData(data);});
 
       $.getJSON(hoolockhoolock, function(data) { hoolockhoolockLayer.addData(data);});
 
       hoolockhoolockLayer.addTo(map);
 
       hoolockhoolockLayer.addTo(map);
 +
 +
      $.getJSON(hoolockleuconedys, function(data) { hoolockleuconedysLayer.addData(data);});
 +
      hoolockleuconedysLayer.addTo(map);
  
 
       // for Layer Control
 
       // for Layer Control
Line 57: Line 74:
 
       var overlayMaps = {
 
       var overlayMaps = {
 
       "Hoolock hoolock range": hoolockhoolockLayer,
 
       "Hoolock hoolock range": hoolockhoolockLayer,
 +
      "Hoolock leuconedys range" : holoockleuconedysLayer
 
       };
 
       };
  

Revision as of 04:40, 6 March 2022


Download available layers
Species Shapefile GeoJSON Source
Hoolock hoolock Hoolock hoolock shapefile (ZIP; 110 kB)]