forked from HaydenElza/sampleplotter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
44 lines (32 loc) · 863 Bytes
/
test.html
File metadata and controls
44 lines (32 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<style>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0;}
#map{ height: 100% }
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="./js/leaflet/leaflet.js"></script>
<link rel="stylesheet" href="./js/leaflet/leaflet.css" />
<script src='js/shp.js'></script>
<script>
// Make map
map = L.map('map');
//for the shapefiles in the files folder called pandr.shp
shp("test_data/irregular_shape.zip").then(function(geojson){
// Add both GeoJSONs
var indata = L.geoJson([geojson])
indata.addTo(map);
map.fitBounds(indata.getBounds());
console.log(geojson);
});
</script>
</body>
</html>