Difference between revisions of "Range Layers"
Jump to navigation
Jump to search
Line 54: | Line 54: | ||
} | } | ||
function style2(feature) { | function style2(feature) { | ||
− | + | switch (feature.properties.subspecies) { | |
− | + | case 'ellioti': return {color: "#ff0000"}; | |
− | + | case 'schweinfurthii': return {color: "#0000ff"}; | |
− | + | case 'troglodytes': return {color: "#78c679"}; | |
− | + | case 'verus': return {color: "#31a354"}; | |
− | + | } | |
} | } | ||
// 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}); | + | var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2}); |
$.getJSON(url, function(data) { stateLayer.addData(data);}); | $.getJSON(url, function(data) { stateLayer.addData(data);}); |
Revision as of 11:04, 25 February 2022
Avaiable Layers:
Ape range Download: Geographic shapefile (ZIP; 171 kB)]
Refugia after Maley 1996 Download: Geographic shapefile (ZIP; 85 kB)]