Difference between revisions of "Test"

From A.P.E.S. wiki
Jump to navigation Jump to search
Line 19: Line 19:
 
       var map = L.map('map').setView([10, 5], 5);  
 
       var map = L.map('map').setView([10, 5], 5);  
  
 +
      // load a tile layer
 
       var topo=new L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',{  
 
       var topo=new L.tileLayer('http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',{  
 
             attribution: '&copy; <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map);
 
             attribution: '&copy; <a href="http://osm.org/copyright">OpenTopoMap</a> contributors'}).addTo(map);
Line 24: Line 25:
 
             attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);
 
             attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);
  
// load GeoJSON from an external file
+
  // load GeoJSON from an external file
   fetch("usa.geojson").then(res => res.json()).then(data => {
+
   $.getJSON("REFUGIA_MALEY96.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);
   });  
+
   });
      // for Layer Control
+
 
 +
 
 +
  // for Layer Control
 
       var baseMaps = {
 
       var baseMaps = {
 
         "Open Street Map": osm, 
 
         "Open Street Map": osm, 

Revision as of 08:41, 25 February 2022