-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
214 lines (208 loc) · 9.59 KB
/
index.html
File metadata and controls
214 lines (208 loc) · 9.59 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="author" content="mitxel-m"> <meta name="keywords" content="IGN,ATES">
<link rel="stylesheet" href="css/leaflet.css">
<link rel="stylesheet" href="css/qgis2web.css"><link rel="stylesheet" href="css/fontawesome-all.min.css">
<style>
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
width: 98vw;
}
</style>
<title>mitxel-m_webmap_example</title>
</head>
<body>
<div id="map">
</div>
<script src="js/qgis2web_expressions.js"></script>
<script src="js/leaflet.js"></script>
<script src="js/leaflet-svg-shape-markers.min.js"></script>
<script src="js/leaflet.rotatedMarker.js"></script>
<script src="js/leaflet.pattern.js"></script>
<script src="js/leaflet-hash.js"></script>
<script src="js/Autolinker.min.js"></script>
<script src="js/rbush.min.js"></script>
<script src="js/labelgun.min.js"></script>
<script src="js/labels.js"></script>
<script src="js/leaflet-tilelayer-wmts.js"></script>
<script src="data/ATES_0.js"></script>
<script src="data/Avalanchas_1.js"></script>
<script src="data/Itinerarios_2.js"></script>
<script src="data/Puntosdedecisin_3.js"></script>
<script>
var map = L.map('map', {
zoomControl:true, maxZoom:16, minZoom:10, zoomDelta:2, zoomSnap:2, center: [42.80, -0.27], zoom: 12, maxBounds: ([[42.70,-0.80],[42.90,-0.15]]),
});
var hash = new L.Hash(map);
map.attributionControl.setPrefix('<a href="https://github.com/tomchadwin/qgis2web" target="_blank">qgis2web</a> · <a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> · <a href="https://qgis.org">QGIS</a>');
var bounds_group = new L.featureGroup([]);
map.createPane('pane_base_0');
map.getPane('pane_base_0').style.zIndex = 100;
var layer_IGN = L.tileLayer.wmts('http://www.ign.es/wmts/mapa-raster?', {
layer: 'MTN',
tilematrixSet: 'GoogleMapsCompatible',
format: 'image/jpeg',
style: 'default',
className: 'base',
uppercase: true,
transparent: false,
continuousWorld : false,
opacity: 1.0,
attribution: '<a href="https://www.ign.es" target="_blank">IGN</a>',
});
map.addLayer(layer_IGN);
bounds_group.addLayer(layer_IGN);
map.createPane('pane_ATES_0');
map.getPane('pane_ATES_0').style.zIndex = 400;
map.getPane('pane_ATES_0').style['mix-blend-mode'] = 'multiply';
var layer_ATES_0 = new L.tileLayer('tiles/{z}/{x}/{y}.png', {
minZoom: 12,
maxZoom: 16,
tms: true,
pane: 'pane_ATES_0',
attribution: '<a href="https://montanasegura.com/cartografia-ates-en-el-macizo-de-infiernos/" target="_blank">ATES</a>'
});
bounds_group.addLayer(layer_ATES_0);
map.addLayer(layer_ATES_0);
function pop_Avalanchas_1(feature, layer) {
var popupContent = '<table>\
<tr>\
<td colspan="2">' + (feature.properties['Name'] !== null ? Autolinker.link(String(feature.properties['Name'])) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['description'] !== null ? Autolinker.link(String(feature.properties['description'])) : '') + '</td>\
</tr>\
</table>';
layer.bindPopup(popupContent, {maxHeight: 400});
}
function style_Avalanchas_1_0() {
return {
pane: 'pane_Avalanchas_1',
opacity: 1,
color: 'rgba(247,99,0,1.0)',
dashArray: '',
lineCap: 'round',
lineJoin: 'bevel',
weight: 5.0,
fillOpacity: 0,
interactive: false,
}
}
map.createPane('pane_Avalanchas_1');
map.getPane('pane_Avalanchas_1').style.zIndex = 401;
map.getPane('pane_Avalanchas_1').style['mix-blend-mode'] = 'normal';
var layer_Avalanchas_1 = new L.geoJson(json_Avalanchas_1, {
attribution: '',
interactive: false,
dataVar: 'json_Avalanchas_1',
layerName: 'layer_Avalanchas_1',
pane: 'pane_Avalanchas_1',
onEachFeature: pop_Avalanchas_1,
style: style_Avalanchas_1_0,
});
bounds_group.addLayer(layer_Avalanchas_1);
map.addLayer(layer_Avalanchas_1);
function pop_Itinerarios_2(feature, layer) {
var popupContent = '<table>\
<tr>\
<td colspan="2"><strong>Name</strong><br />' + (feature.properties['Name'] !== null ? Autolinker.link(String(feature.properties['Name'])) : '') + '</td>\
</tr>\
<tr>\
<th scope="row">description</th>\
<td>' + (feature.properties['description'] !== null ? Autolinker.link(String(feature.properties['description'])) : '') + '</td>\
</tr>\
</table>';
layer.bindPopup(popupContent, {maxHeight: 400});
}
function style_Itinerarios_2_0() {
return {
pane: 'pane_Itinerarios_2',
opacity: 1,
color: 'rgba(255,255,0,1.0)',
dashArray: '5, 5',
lineCap: 'round',
lineJoin: 'round',
weight: 3.0,
fillOpacity: 0,
interactive: false,
}
}
map.createPane('pane_Itinerarios_2');
map.getPane('pane_Itinerarios_2').style.zIndex = 402;
map.getPane('pane_Itinerarios_2').style['mix-blend-mode'] = 'normal';
var layer_Itinerarios_2 = new L.geoJson(json_Itinerarios_2, {
attribution: '',
interactive: false,
dataVar: 'json_Itinerarios_2',
layerName: 'layer_Itinerarios_2',
pane: 'pane_Itinerarios_2',
style: style_Itinerarios_2_0,
});
bounds_group.addLayer(layer_Itinerarios_2);
map.addLayer(layer_Itinerarios_2);
function pop_Puntosdedecisin_3(feature, layer) {
var popupContent = '<table>\
<tr>\
<td colspan="2">' + (feature.properties['fid'] !== null ? Autolinker.link(String(feature.properties['fid'])) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Name'] !== null ? Autolinker.link(String(feature.properties['Name'])) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['description'] !== null ? Autolinker.link(String(feature.properties['description'])) : '') + '</td>\
</tr>\
</table>';
layer.bindPopup(popupContent, {maxHeight: 400});
}
function style_Puntosdedecisin_3_0() {
return {
pane: 'pane_Puntosdedecisin_3',
shape: 'diamond',
radius: 8.8,
opacity: 1,
color: 'rgba(0,0,0,1.0)',
dashArray: '',
lineCap: 'butt',
lineJoin: 'miter',
weight: 2.0,
fill: true,
fillOpacity: 1,
fillColor: 'rgba(255,255,0,1.0)',
interactive: true,
}
}
map.createPane('pane_Puntosdedecisin_3');
map.getPane('pane_Puntosdedecisin_3').style.zIndex = 403;
map.getPane('pane_Puntosdedecisin_3').style['mix-blend-mode'] = 'normal';
var layer_Puntosdedecisin_3 = new L.geoJson(json_Puntosdedecisin_3, {
attribution: '',
interactive: true,
dataVar: 'json_Puntosdedecisin_3',
layerName: 'layer_Puntosdedecisin_3',
pane: 'pane_Puntosdedecisin_3',
onEachFeature: pop_Puntosdedecisin_3,
pointToLayer: function (feature, latlng) {
var context = {
feature: feature,
variables: {}
};
return L.shapeMarker(latlng, style_Puntosdedecisin_3_0(feature));
},
});
bounds_group.addLayer(layer_Puntosdedecisin_3);
map.addLayer(layer_Puntosdedecisin_3);
var baseMaps = {};
L.control.layers(baseMaps,{'<img src="legend/Puntosdedecisin_3.png" /> Puntos cruciales': layer_Puntosdedecisin_3,'<img src="legend/Itinerarios_2.png" /> Itinerarios': layer_Itinerarios_2,'<img src="legend/Avalanchas_1.png" /> Avalanchas': layer_Avalanchas_1,'Terreno:<br /><table><tr><td style="text-align: center;"><img src="legend/ATES_0_Simple0.png" /></td><td> Simple</td></tr><tr><td style="text-align: center;"><img src="legend/ATES_0_Exigente1.png" /></td><td> Exigente</td></tr><tr><td style="text-align: center;"><img src="legend/ATES_0_Complejo2.png" /></td><td> Complejo</td></tr></table>': layer_ATES_0,},{collapsed:true}).addTo(map);
</script>
</body>
</html>