Difference between revisions of "Range Layers"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
+ | function forEachFeature(feature, layer) { | ||
+ | var popupContent = "<p><b>Species: </b>"+ feature.properties.binomial + | ||
+ | "</br>Subspecies: "+ feature.properties.subspecies +'</p>'; | ||
+ | layer.bindPopup(popupContent); | ||
+ | } | ||
// Set style function that sets fill color property | // Set style function that sets fill color property | ||
function style(feature) { | function style(feature) { | ||
Line 61: | Line 66: | ||
// 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, {style: style2}); | + | 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:36, 25 February 2022
Avaiable Layers:
Ape range Download: Geographic shapefile (ZIP; 171 kB)]
Refugia after Maley 1996 Download: Geographic shapefile (ZIP; 85 kB)]