-
Notifications
You must be signed in to change notification settings - Fork 23
/
3dbuildings.html
73 lines (63 loc) · 2.17 KB
/
3dbuildings.html
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
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>3D Buildings</title>
<script type="text/javascript" src="src/leaflet/leaflet.js"></script>
<link type="text/css" rel="stylesheet" href="src/leaflet/leaflet.css" />
<script src="src/listBaseLayers.js" type="text/javascript"></script>
<link rel="stylesheet" href="src/leaflet/locate/L.Control.Locate.css" />
<link rel="stylesheet" href="src/leaflet/gcc_geosearch/l.gcc_geosearch.css" />
<!--[if lt IE 9]>
<link rel="stylesheet" href="src/leaflet/locate/L.Control.Locate.ie.css" />
<link rel="stylesheet" href="src/leaflet/gcc_geosearch/l.gcc_geosearch.ie.css" />
<![endif]-->
<script src="src/leaflet/gcc_geosearch/gcc_geosearch.js"></script>
<script src="src/leaflet/locate/L.Control.Locate.js"></script>
<script src="src/jquery/jquery-1.7.1.min.js"></script>
<script src="src/lib/proj4js-combined.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<script src="src/leaflet/L.BuildingsLayer.js"></script>
<style>
body { margin:0; padding:0; }
#map {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
height: 100%;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
var center = new L.LatLng(-42.8337,147.2749);
var map = new L.Map('map', { center: center, zoom: 18, attributionControl:true, zoomControl:false});
//Define layers
var baselayers = {
"LIST Aerial Imagery": LISTAerial,
"LIST Topographic": LISTTopographic
};
map.addLayer(LISTTopographic)
//Location control
L.control.locate({
position: 'topright',
drawCircle: false,
follow: false
}).addTo(map);
//Zoom control
L.control.zoom().addTo(map);
//Layer control
L.control.layers(baselayers, {}, {position: 'topleft'}).addTo(map);
//Search control
L.control.searchControl().addTo(map);
var buildings = null;
$.getJSON("data/buildings_CBD.geojson", function(json) {
buildings = new L.BuildingsLayer().addTo(map).geoJSON(json);
//console.log(json); // this will show the info it in firebug console
});
</script>
</body>
</html