-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathedificios.html
More file actions
72 lines (56 loc) · 2.34 KB
/
edificios.html
File metadata and controls
72 lines (56 loc) · 2.34 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
67
68
69
70
71
72
<html>
<head>
<meta charset="utf-8" />
<title>Edificios</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v2.12.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v2.12.0/mapbox-gl.css" rel="stylesheet" />
<script src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js"></script>
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css" type="text/css">
<link href="css/estilobase.css" rel="stylesheet" />
<script src="js/edificios.js"></script>
<script src='js/3d.js'></script>
<script>
//Añadir vuestor token y/o estilo !!
var map;
function init() {
mapboxgl.accessToken =
"pk.eyJ1IjoiZ2lzbWFzdGVybTIiLCJhIjoiY2plZHhubTQxMTNoYzMza3Rqa3kxYTdrOCJ9.53B1E6mKD_EQOVb2Y0-SsA";
map = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/dark-v10",
center: [2.16859, 41.3954],
zoom: 15,
attributionControl: false,
pitch: 45,
hash: true,
});
map.addControl(new mapboxgl.AttributionControl({
compact: true
}));
map.addControl(new mapboxgl.NavigationControl());
map.addControl(
new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl,
collapsed: true,
bbox: [2.1066, 41.3000, 2.2536, 41.4468]
}));
map.on("load", function() {
addEdificiosCapa();
addPopupToMapEdificios("edificios");
add3D();
}); //fin onload
} // final init
</script>
</head>
<body onload="init()">
<div class="panelTopIzquierda">
<label id="altura">Más de 0 pisos</label>
<input id="slider" onChange="filtrarEdificios(this.value)" type="range" min="1" max="50" step="1" value="0" />
<hr>
<input checked onChange="activarEdificios(this.checked)" type="checkbox">Capa edificios
</div>
<div id="map"></div>
</body>
</html>