Difference between revisions of "Test"
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
// initialize the map | // initialize the map | ||
− | var map = L.map('map').setView([42.35, -71.08], | + | var map = L.map('map').setView([42.35, -71.08], 3); |
// load a tile layer | // load a tile layer | ||
Line 30: | Line 30: | ||
// load GeoJSON from an external file | // load GeoJSON from an external file | ||
− | $.getJSON(" | + | $.getJSON("usa.geojson",function(data){ |
// add GeoJSON layer to the map once the file is loaded | // add GeoJSON layer to the map once the file is loaded | ||
L.geoJson(data).addTo(map); | L.geoJson(data).addTo(map); |
Revision as of 08:46, 25 February 2022