Difference between revisions of "Range layers"
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
− | + | function forEachFeature(feature, layer) { | |
− | var popupContent = "<p><b> | + | var popupContent = "<p><b>Species: </b>"+ feature.properties.BINOMIAL +'</p>'; |
− | |||
layer.bindPopup(popupContent); | layer.bindPopup(popupContent); | ||
} | } | ||
Line 46: | Line 45: | ||
} | } | ||
// Null variable that will hold layer | // Null variable that will hold layer | ||
− | var hoolockhoolockLayer = L.geoJson(null, {style: stylehoolockhoolock}); | + | var hoolockhoolockLayer = L.geoJson(null, {onEachFeature: forEachFeature, style: stylehoolockhoolock}); |
$.getJSON(hoolockhoolock, function(data) { hoolockhoolockLayer.addData(data);}); | $.getJSON(hoolockhoolock, function(data) { hoolockhoolockLayer.addData(data);}); |
Revision as of 03:35, 2 March 2022
Species | Shapefile | GeoJSON | Source |
---|---|---|---|
Hoolock hoolock | Hoolock hoolock shapefile (ZIP; 110 kB)] |