Difference between revisions of "African great ape layers"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | <link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" /> | ||
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script> | <script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script> | ||
− | |||
<style> | <style> | ||
Line 22: | Line 21: | ||
<script> | <script> | ||
// GEOJSON FILES | // GEOJSON FILES | ||
− | + | var gaabundance = '../files/african_great_apes/afr_great_ape_ab.geojson'; | |
+ | |||
// Create map | // Create map | ||
var map = L.map('map').setView([-0, 6], 4); | var map = L.map('map').setView([-0, 6], 4); | ||
Line 37: | Line 37: | ||
// 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}); | |
− | + | ||
+ | $.getJSON(gaabundance); gaabundanceLayer.addTo(map); | ||
// for Layer Control | // for Layer Control | ||
Line 56: | Line 57: | ||
</script> | </script> | ||
− | |||
− | |||
</body> | </body> | ||
</html> | </html> |