Difference between revisions of "Test"

From A.P.E.S. wiki
Jump to navigation Jump to search
Line 18: Line 18:
 
     <script>
 
     <script>
 
       var url = 'usa.json';  // my GeoJSON data source, in same folder as my html page.
 
       var url = 'usa.json';  // my GeoJSON data source, in same folder as my html page.
       var url2 = 'usa.json';  // my GeoJSON data source, in same folder as my html page.
+
       var url2 = 'REFUGIA_MALEY96.geojson';  // my GeoJSON data source, in same folder as my html page.
  
       var map = L.map('map').setView([10, 5], 5);  
+
       var map = L.map('map').setView([0, 0], 7);  
  
 
       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',{  
Line 27: Line 27:
 
             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);
  
 
+
      L.geoJSON(url2).addTo(map);
  
 
       // for Layer Control
 
       // for Layer Control

Revision as of 08:13, 25 February 2022