-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmfy-base-sandbox.js
214 lines (88 loc) · 7.33 KB
/
mfy-base-sandbox.js
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
// delete div du splash screen
setTimeout(fade_out, 5000);
function fade_out() {
$("#mydiv").fadeOut().empty();
}
// normal
var params = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
params[key] = value;
});
var lat = params.lat || init.lat;
var lng = params.lng || init.lng;
var map = L.map('map', {
center: [lat, lng],
maxBounds: bounds,
// crs: L.CRS.EPSG4326,
minZoom: minZoom,
maxZoom:maxZoom,
zoom: params.zoom || init.zoom,
layers: [mapbase, hillshading],
zoomControl: true,
loadingControl: true,
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
}
});
// left menu
var contents = '<h2>Allow geolocation</h2>';
contents += '<i>Geolocatie toestaan. Geolokalisierung zulassen. Activar geolocalización. Autoriser la géolocalisation. Geolocation a cheadú. Loyva geolocation. Leyfa landfræðilega staðsetningu. Attiva la geolocalizione. Autorizar a geolocalização. Aktive jeolokalizasyon</i>';
contents += '<p>Add http://mappingforyou.eu to the address:</p>';
contents += '<i>Toevoegen http://mappingforyou.eu aan adres: Hinzufügen http://mappingforyou.eu unter der Adresse: Agregar http://mappingforyou.eu a la dirección: Leggja afturat http://mappingforyou.eu: Ajouter http://mappingforyou.eu à l adresse : Cuir http://mappingforyou.eu ag an seoladh: Bæta við http://mappingforyou.eu til bústaður: Aggiungi http://mappingforyou.eu all indirizzo: Adicionar http://mappingforyou.eu ao endereço:</i>';
contents += '<h3>chrome://flags/#unsafely-treat-insecure-origin-as-secure</h3>';
contents += '<h2>Availiable maps</h2>';
contents += '<a href="http://mappingforyou.eu/benelux/?zoom=8&lat=50.586&lng=5.002">🇧🇪België </a>';
contents += '<a href="http://mappingforyou.eu/deutschland">🇩🇪 Deutschland </a>';
contents += '<a href="http://mappingforyou.eu/espana">🇪🇸 Espana </a>';
contents += '<a href="http://mappingforyou.eu/icelandfaroe/?zoom=9&lat=62.004&lng=-6.371">🇩🇰 Føroyar </a>';
contents += '<a href="http://mappingforyou.eu/france">🇫🇷 France </a>';
contents += '<a href="http://mappingforyou.eu/atlasfrancilien">🇫🇷 Paris - Atlas francilien </a>';
contents += '<a href="http://mappingforyou.eu/ellada"🇬🇷 Ellada </a>';
contents += '<a href="http://mappingforyou.eu/ukir/?zoom=8&lat=53.439&lng=-6.891">🇮🇪 Ireland </a>';
contents += '<a href="http://mappingforyou.eu/icelandfaroe/?zoom=7&lat=64.86&lng=-18.781">🇮🇸 Ísland </a>';
contents += '<a href="http://mappingforyou.eu/italia">🇮🇹 Italia </a>';
contents += '<a href="http://mappingforyou.eu/benelux/?zoom=8&lat=52.463&lng=5.002">🇳🇱 Nederland </a>';
contents += '<a href="http://mappingforyou.eu/paysalpins/?zoom=8&lat=47.828&lng=13.900">🇦🇹 Oesterreich </a>';
contents += '<a href="http://mappingforyou.eu/portugal">🇵🇹 Portugal </a>';
contents += '<a href="http://mappingforyou.eu/paysalpins/?zoom=8&lat=47.093&lng=9.110">🇨🇭Schweiz </a>';
contents += '<a href="http://mappingforyou.eu/ukir/?zoom=7&lat=53.63&lng=-4.499">🇬🇧 United Kingdom </a>';
contents += '<h3>Cartes du monde (maps of the world)</h3>';
contents += '<a href="http://mappingforyou.eu/monde">🇺🇳 Monde </a>';
contents += '<a href="http://mappingforyou.eu/histoire">🇺🇳 History </a>';
contents += '<a href="http://mappingforyou.eu/usa">🇺🇸 United States </a>';
contents += '<a href="http://mappingforyou.eu/antillesguyane">🇫🇷 Antilles Guyane </a>';
contents += '<a href="http://mappingforyou.eu/reunionmayotte">🇫🇷 Réunion Mayotte </a>';
contents += '<h2>Origin of data</h2>';
contents += '<i>Source des données</i>';
contents += '<p>(C) Openstreetmap contributors, ESRI, Diva-Gis, EAA, Ministère de la Culture français, plateforme opendata du gouv.français, CAUE départementaux de France, IGN France, British Crown Copyright, USDA, Ministero Italiano della Cultura, dell Ambiante, Gobierno espanol (IGN), http://www2.jpl.nasa.gov/srtm (NASA SRTM 2 hillshade)</p>';
contents += '<h2>Contact (contact)</h2>';
contents += '<p>Vincent Dechartres, Mapping for you, France, mail(-at-)mappingforyou.eu</p>';
contents += '<h2>Features</h2>';
contents += '<i>Fonctionnalités</i>';
contents += '<p>Opening geojson, GPX and shape files, drawing shapes of all kinds, basic labelling and downloading them in gpx or geojson.</p>';
contents += '<input type="text" id="number" value="15"><button onclick="myFunction()">Disabled buffer</button><p id="demo"></p>';
contents += ' <p>Send zipped SHP</p> <input type="file" id="file"><input type="submit" id="submit"> <span id="warning"></span></p>';
contents += '<h2>Corine Land Cover key</h2>';
contents += ' <img src="../icons/legend.png">';
L.control.slideMenu(contents).addTo(map);
// right menu
// var slideMenu = L.control.slideMenu('', {position: 'topright', menuposition: 'topright', width: '30%', height: '400px', delay: '50', icon: 'fa-chevron-left'}).addTo(map);
// slideMenu.setContents(right + contents);
// flickr publics
var flickr = new L.Flickr('41b399eb7bedfbeccddd276e68b21c87',{maxLoad: 25, maxTotal: 75});
// specify popup options
var customOptions =
{
maxHeight: 200, maxWidth: 200
};
// Controle couches
function styled(feature) {
return {
weight: 9,
opacity: 1,
color: color,
fillColor: fillColor,
fillOpacity: 0.5,
};
}