Difference between revisions of "African great ape layers"
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
<script> | <script> | ||
// GEOJSON FILES | // GEOJSON FILES | ||
− | 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 40: | Line 40: | ||
var gaabundanceLayer = L.geoJson(null, {style: stylegaabundance}); | var gaabundanceLayer = L.geoJson(null, {style: stylegaabundance}); | ||
− | $.getJSON(gaabundance); gaabundanceLayer.addTo(map); | + | $.getJSON(gaabundance, function(data) { gaabundanceLayer.addData(data);}); gaabundanceLayer.addTo(map); |
// for Layer Control | // for Layer Control |