-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
66 lines (55 loc) · 2.14 KB
/
index.html
File metadata and controls
66 lines (55 loc) · 2.14 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<title>TEON Map</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css" />
</head>
<style>
html, body, #map {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
</style>
<body>
<div id="map"></div>
<script src="http://leafletjs.com/dist/leaflet.js"></script>
<script src="lib/ginamaplayers/dist/leaflet-adapter.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$.getJSON("./NRCS_TEON.geojson", function(data) {
var geojson = L.geoJson(data, {
onEachFeature: function (feature, layer) {
layer.bindPopup('<b>' + feature.properties.user_site_ + '</b><br>'
+ feature.properties.natural_ke + '<br><br>'
+ feature.properties.Lab_Report + '<br>'
+ feature.properties.Descriptio);
}
});
var map = L.map('map'); //.setView([66.10, -137.64], 4);
var layers = Gina.Layers.find('TILE.EPSG::3857.*');
layers['GINA Best Data Layer (BDL)'].addTo(map);
L.control.layers(layers, [], {
collapsed: true
}).addTo(map);
map.fitBounds(geojson.getBounds());
geojson.addTo(map);
$.getJSON("./TEON.geojson", function(data) {
L.geoJson(data, {
onEachFeature: function (feature, layer) {
layer.bindPopup('<b>' + feature.properties.TEON_wtrsh + '</b><br>');
}
}).addTo(map);
});
});
/*var popup = L.popup();
function onMapClick(e) {
popup.setLatLng(e.latlng).setContent("You clicked the map at " + e.latlng.toString()).openOn(map);
}
map.on('click', onMapClick);*/
</script>
</body>
</html>