Difference between revisions of "African great ape layers"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
// 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 36: | ||
// 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 | + | $.getJSON(gaabundance); gaabundanceLayer.addTo(map); |
− | |||
− | |||
− | |||
− | |||
− | |||
// for Layer Control | // for Layer Control | ||
Line 72: | Line 51: | ||
// 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, | ||
− | + | }; | |
− | |||
− | |||