Difference between revisions of "Range test"

From A.P.E.S. wiki
Jump to navigation Jump to search
Line 20: Line 20:
 
       // GEOJSON FILES  
 
       // GEOJSON FILES  
 
       var hoolockhoolock = 'files/gibbon/Hoolock_hoolock.geojson';  
 
       var hoolockhoolock = 'files/gibbon/Hoolock_hoolock.geojson';  
      var hoolockleuconedys = 'files/gibbon/Hoolock_leuconedys.geojson';
 
 
        
 
        
 
       var map = L.map('map').setView([10, 110], 4);  
 
       var map = L.map('map').setView([10, 110], 4);  
Line 59: Line 58:
 
       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});
 
       var hoolockleuconedysLayer = L.geoJson(null, {onEachFeature: forEachFeature, style: stylehoolockleuconedys});
 
      $.getJSON(hoolockhoolock, function(data) { hoolockhoolockLayer.addData(data);});
 
      hoolockhoolockLayer.addTo(map);
 
 
      $.getJSON(hoolockleuconedys, function(data) { hoolockleuconedysLayer.addData(data);});
 
      hoolockleuconedysLayer.addTo(map);
 
  
 
       // for Layer Control
 
       // for Layer Control
Line 72: Line 65:
 
       };
 
       };
  
      var overlayMaps = {
 
      "Hoolock hoolock range": hoolockhoolockLayer,
 
      "Hoolock leuconedys range" : holoockleuconedysLayer
 
      };
 
 
      //Add layer control
 
      L.control.layers(baseMaps, overlayMaps).addTo(map);
 
  
 
     </script>  
 
     </script>  
 
   </body>
 
   </body>
 
</html>
 
</html>

Revision as of 09:33, 7 March 2022