Difference between revisions of "African great ape layers"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
+ | |||
+ | [[Spatial Layers]] > [[African great ape layers]] | ||
+ | |||
[[Spatial Layers]] > [[African great ape layers]] | [[Spatial Layers]] > [[African great ape layers]] | ||
Line 24: | Line 27: | ||
// var gadendist2021 = 'files/african_great_apes/great_ape_dendist_ION2021.geojson'; | // var gadendist2021 = 'files/african_great_apes/great_ape_dendist_ION2021.geojson'; | ||
var gaabundance = 'files/african_great_apes/afr_great_ape_ab.geojson'; | var gaabundance = 'files/african_great_apes/afr_great_ape_ab.geojson'; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
// Create map | // Create map | ||
Line 41: | Line 39: | ||
// Set style function that sets fill color property | // Set style function that sets fill color property | ||
− | |||
function stylegaabundance(feature) { return { fillColor: '#5F0CE4', fillOpacity: 0.7, weight: 2, opacity: 0.7, color: '#5F0CE4', dashArray: '3' }; } | function stylegaabundance(feature) { return { fillColor: '#5F0CE4', fillOpacity: 0.7, weight: 2, opacity: 0.7, color: '#5F0CE4', dashArray: '3' }; } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
// Null variable that will hold layer // took out onEachFeature: forEachFeature, | // Null variable that will hold layer // took out onEachFeature: forEachFeature, | ||
var gaabundanceLayer = L.geoJson(null, {style: stylegaabundance}); | var gaabundanceLayer = L.geoJson(null, {style: stylegaabundance}); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
$.getJSON(gaabundance, function(data) { gaabundanceLayer.addData(data);}); gaabundanceLayer.addTo(map); | $.getJSON(gaabundance, function(data) { gaabundanceLayer.addData(data);}); gaabundanceLayer.addTo(map); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
// for Layer Control | // for Layer Control | ||
Line 72: | Line 54: | ||
// not showing ga densdist 2021 here because it takes ages to load... | // not showing ga densdist 2021 here because it takes ages to load... | ||
var overlayMaps = { | var overlayMaps = { | ||
− | |||
"Great ape abundance per site": gaabundanceLayer, | "Great ape abundance per site": gaabundanceLayer, | ||
− | + | }; | |
− | |||
− | |||
Line 85: | Line 64: | ||
</body> | </body> | ||
</html> | </html> | ||
+ | |||
Revision as of 02:06, 15 June 2022
Spatial Layers > African great ape layers
Spatial Layers > African great ape layers