Difference between revisions of "Test"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
// load a tile layer | // load a tile layer | ||
− | + | L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',{ | |
attribution: '© <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map); | attribution: '© <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map); | ||
− | + | L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{ | |
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map); | attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map); | ||
// 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); | ||
Line 32: | Line 32: | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 08:43, 25 February 2022