soundquiz.js 19.9 KB
Newer Older
Patrick's avatar
Patrick committed
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
function quizAnswerOn() {


    var quiz_baustelle = ["quiz_baustelle"]
    var quiz_kirche = ["quiz_kirche"]
    var quiz_Marktplatz = ["quiz_Marktplatz"]
    var quiz_Meerschweinchen = ["quiz_Meerschweinchen"]
    var quiz_Pragfriedhof = ["quiz_Pragfriedhof"]
    var quiz_Rosensteinpark = ["quiz_Rosensteinpark"]
    var quiz_Skaten = ["quiz_Skaten"]
    var quiz_UFA_Palast = ["quiz_UFA_Palast"]

    var layers = framework.getLayers();

    for (var i = 0; i< layers.length; i++) {
    var layer = layers[i];
    if(quiz_baustelle.indexOf(layer.name) >= 0) {
    layer.activate(true);
    } else if (quiz_kirche.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_Marktplatz.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_Meerschweinchen.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_Pragfriedhof.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_Rosensteinpark.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_Skaten.indexOf(layer.name) >= 0){
        layer.activate(true);
    }else if (quiz_UFA_Palast.indexOf(layer.name) >= 0){
        layer.activate(true);
    }

  }  


}
function quizAnswerOff() {

  var quiz_baustelle = ["quiz_baustelle"]
  var quiz_kirche = ["quiz_kirche"]
  var quiz_Marktplatz = ["quiz_Marktplatz"]
  var quiz_Meerschweinchen = ["quiz_Meerschweinchen"]
  var quiz_Pragfriedhof = ["quiz_Pragfriedhof"]
  var quiz_Rosensteinpark = ["quiz_Rosensteinpark"]
  var quiz_Skaten = ["quiz_Skaten"]
  var quiz_UFA_Palast = ["quiz_UFA_Palast"]


  var layers = framework.getLayers();

  for (var i = 0; i< layers.length; i++) {
  var layer = layers[i];
    if(quiz_baustelle.indexOf(layer.name) >= 0) {
    layer.activate(false);
    }else if (quiz_kirche.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_Marktplatz.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_Meerschweinchen.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_Pragfriedhof.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_Rosensteinpark.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_Skaten.indexOf(layer.name) >= 0){
        layer.activate(false);
    }else if (quiz_UFA_Palast.indexOf(layer.name) >= 0){
        layer.activate(false);
    }

  }

}



let baustellePoint
let point_baustelle
let point_kirche
let point_marktplatz
let point_meerschweinchen
let point_pragfriedhof
let point_rosensteinpark
let point_skaten
let point_ufapalast



var poly_baustelle = turf.polygon([[[9.192030041439407,48.795435967671466],
                     [9.193216723986483,48.79495488792281],
                     [9.193868262453837,48.79608377989257],
                     [9.19323753687872,48.79624768458771],
                     [9.19272846497538,48.79547341656016],
                     [9.192181723252217,48.79565298639707],
                     [9.192030041439407,48.795435967671466]]]);
var poly_kirche = turf.polygon([[[9.188408368748892,48.795100250655054],
                    [9.188924612595006,48.795012123976335],
                    [9.189098065897257,48.79549757627021],
                    [9.188575644592794,48.7956045547285],
                    [9.188408368748892,48.795100250655054]]]);
var poly_Marktplatz = turf.polygon([[[9.190168307967882,48.79728419808009],
                    [9.1910874206942,48.79725140057769],
                    [9.191087538901344,48.79748221171445],
                    [9.190187007187546,48.79748110760161],
                    [9.190168307967882,48.79728419808009]]]);
var poly_Meerschweinchen = turf.polygon([[[9.186806098731616,48.79881951602704],
                    [9.188600335393922,48.79719781391975],
                    [9.188949173861737,48.79762091492424],
                    [9.187848177581678,48.79928734715429],
                    [9.186806098731616,48.79881951602704]]]); 
var poly_Pragfriedhof = turf.polygon([[[9.182333160394126,48.794227837883454],
                    [9.186647005279728,48.79259326288354],
                    [9.186647005279728,48.79259326288354],
                    [9.18715941385583,48.792952193405455],
                    [9.188289000958733,48.79385430267109],
                    [9.188891598423863,48.79484809259648],
                    [9.188924740247561,48.79612690389061],
                    [9.188799960354077,48.79681309093797],
                    [9.18825406781832,48.797313503843924],
                    [9.187345300590598,48.797925407270014],
                    [9.186793822718,48.79823773268251],
                    [9.186096400913614,48.79847389780855],
                    [9.185376581862181,48.79853414827693],
                    [9.18419156582769,48.79836173569811],
                    [9.182740250555623,48.79801651120249],
                    [9.182333160394126,48.794227837883454]]]);                   
var poly_Rosensteinpark = turf.polygon([[[9.203808052932066,48.79875367235891],
                    [9.208012295476198,48.79907274921155],
                    [9.20859308579052,48.79995508393404],
                    [9.208307227582281,48.80047891317108],
                    [9.20655387838112,48.80160753910721],
                    [9.206056324076444,48.80174552856627],
                    [9.206914332149998,48.803294486473106],
                    [9.205121147799815,48.80447843399779],
                    [9.204787225158146,48.80524383611939],
                    [9.204293772298964,48.805772976987896],
                    [9.202644486340354,48.80554330738289],
                    [9.200742163801127,48.805730074499024],
                    [9.197993600884352,48.80570592345538],
                    [9.19408063624374,48.806578150352806],
                    [9.192236234986755,48.80700516129579],
                    [9.190481412880551,48.80711898114146],
                    [9.189377614525243,48.80715362417243],
                    [9.189612496570103,48.806420338495116],
                    [9.190483699672992,48.80542080612048],
                    [9.191367708214424,48.804618160154064],
                    [9.192006815165342,48.80394202915721],
                    [9.192960405298813,48.80329637888474],
                    [9.19511584478854,48.80235904555161],
                    [9.196720543284407,48.801721976270414],
                    [9.198002225814102,48.801426584371825],
                    [9.199607833356552,48.80105249758515],
                    [9.200559174570628,48.800752502238794],
                    [9.20147085629273,48.800194609436886],
                    [9.202729092947616,48.79948163061957],
                    [9.203122591861353,48.79926610161402],
                    [9.203808052932066,48.79875367235891]]]);
var poly_Skaten = turf.polygon([[[9.186665264444466,48.79273677965645],
                    [9.187115163885181,48.79257958028356],
                    [9.18774299900375,48.79299776284847],
                    [9.18737613418959,48.793241842711154],
                    [9.186665264444466,48.79273677965645]]]);
var poly_UFA_Palast = turf.polygon([[[9.191762686194787,48.793611450616766],
                    [9.19244968983106,48.79299940951094],
                    [9.193279947526518,48.79382263074581],
                    [9.192640547940316,48.794189163732284],
                    [9.191762686194787,48.793611450616766]]]);
var ptsWithin
var ptsWithin_bau
var ptsWithin_prag
var ptsWithin_markt
var ptsWithin_skaten
var ptsWithin_kirche
var ptsWithin_meerschweinchen
var ptsWithin_ufa
var ptsWithin_rosenstein


function check_Bau(location) {

   

    if (location == "quiz_baustelle"){
        var points = turf.points([
            [point_baustelle.lon, point_baustelle.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_baustelle);

        console.log(ptsWithin);
        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
193
            document.getElementById("solution_bau").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
194
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
195
            document.getElementById("solution_bau").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
196
197
198
199
200
201
202
203
        }
    } else if (location == "quiz_pragfriedhof"){
        var points = turf.points([
            [point_pragfriedhof.lon, point_pragfriedhof.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_Pragfriedhof);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
204
            document.getElementById("solution_prag").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
205
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
206
            document.getElementById("solution_prag").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
207
208
209
210
211
212
213
214
        }
    } else if (location == "quiz_marktplatz"){
        var points = turf.points([
            [point_marktplatz.lon, point_marktplatz.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_Marktplatz);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
215
            document.getElementById("solution_markt").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
216
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
217
            document.getElementById("solution_markt").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
218
219
220
221
222
223
224
225
        }
    } else if (location == "quiz_skaten"){
        var points = turf.points([
            [point_skaten.lon, point_skaten.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_Skaten);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
226
            document.getElementById("solution_skaten").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
227
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
228
            document.getElementById("solution_skaten").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
229
230
231
232
233
234
235
236
        }
    } else if (location == "quiz_kirche"){
        var points = turf.points([
            [point_kirche.lon, point_kirche.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_kirche);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
237
            document.getElementById("solution_kirche").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
238
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
239
            document.getElementById("solution_kirche").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
240
241
242
243
244
245
246
247
        }
    } else if (location == "quiz_meerschweinchen"){
        var points = turf.points([
            [point_meerschweinchen.lon, point_meerschweinchen.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_Meerschweinchen);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
248
            document.getElementById("solution_meerschweinchen").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
249
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
250
            document.getElementById("solution_meerschweinchen").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
251
252
253
254
255
256
257
258
        }
    } else if (location == "quiz_ufapalast"){
        var points = turf.points([
            [point_ufapalast.lon, point_ufapalast.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_UFA_Palast);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
259
            document.getElementById("solution_ufapalast").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
260
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
261
            document.getElementById("solution_ufapalast").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
262
263
264
265
266
267
268
269
        }
    } else if (location == "quiz_rostensteinpark"){
        var points = turf.points([
            [point_rosensteinpark.lon, point_rosensteinpark.lat]
        ]);
        ptsWithin = turf.pointsWithinPolygon(points, poly_Rosensteinpark);

        if (ptsWithin.features.length == 0){
Patrick's avatar
Patrick committed
270
            document.getElementById("solution_rosenstein").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
271
        } else if (ptsWithin.features.length == 1){
Patrick's avatar
Patrick committed
272
            document.getElementById("solution_rosenstein").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
273
274
        }
    } else if (location == "all"){
275
276
        if (point_baustelle) {
           var points_bau = turf.points([
Patrick's avatar
Patrick committed
277
278
279
280
281
            [point_baustelle.lon, point_baustelle.lat]
        ]);
        ptsWithin_bau = turf.pointsWithinPolygon(points_bau, poly_baustelle);

        if (ptsWithin_bau.features.length == 0){
Patrick's avatar
Patrick committed
282
            document.getElementById("solution_bau").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
283
        } else if (ptsWithin_bau.features.length == 1){
Patrick's avatar
Patrick committed
284
            document.getElementById("solution_bau").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
285
        }
286
287
288
289
290
291
292
293
294
295
296
297
298
299

        }
        
        if (point_pragfriedhof) {
            var points_prag = turf.points([
                [point_pragfriedhof.lon, point_pragfriedhof.lat]
            ]);
            ptsWithin_prag = turf.pointsWithinPolygon(points_prag, poly_Pragfriedhof);
        
            if (ptsWithin_prag.features.length == 0){
                document.getElementById("solution_prag").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
            } else if (ptsWithin_prag.features.length == 1){
                document.getElementById("solution_prag").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
            }
Patrick's avatar
Patrick committed
300
        }
301
302
303
304
305
306
        if (point_marktplatz) {
        var points_markt = turf.points([
            [point_marktplatz.lon, point_marktplatz.lat]
        ]);
        ptsWithin_markt = turf.pointsWithinPolygon(points_markt, poly_Marktplatz);
        
Patrick's avatar
Patrick committed
307
        if (ptsWithin_markt.features.length == 0){
Patrick's avatar
Patrick committed
308
            document.getElementById("solution_markt").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
309
        } else if (ptsWithin_markt.features.length == 1){
Patrick's avatar
Patrick committed
310
            document.getElementById("solution_markt").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
311
        }
312
313
314
315
316
317
318
319
    
        }
        if (point_skaten) {
        var points_skaten = turf.points([
            [point_skaten.lon, point_skaten.lat]
        ]);
        ptsWithin_skaten = turf.pointsWithinPolygon(points_skaten, poly_Skaten);
        
Patrick's avatar
Patrick committed
320
        if (ptsWithin_skaten.features.length == 0){
Patrick's avatar
Patrick committed
321
            document.getElementById("solution_skaten").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
322
        } else if (ptsWithin_skaten.features.length == 1){
Patrick's avatar
Patrick committed
323
            document.getElementById("solution_skaten").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
324
        }
325
326
327
328
329
330
331
332
    
        }
        if (points_kirche) {
        var points_kirche = turf.points([
            [point_kirche.lon, point_kirche.lat]
        ]);
        ptsWithin_kirche = turf.pointsWithinPolygon(points_kirche, poly_kirche);
        
Patrick's avatar
Patrick committed
333
        if (ptsWithin_kirche.features.length == 0){
Patrick's avatar
Patrick committed
334
            document.getElementById("solution_kirche").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
335
        } else if (ptsWithin_kirche.features.length == 1){
Patrick's avatar
Patrick committed
336
            document.getElementById("solution_kirche").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
337
        }
338
339
340
341
342
343
344
345
    
        }
        if (points_meer) {
        var points_meer = turf.points([
            [point_meerschweinchen.lon, point_meerschweinchen.lat]
        ]);
        ptsWithin_meerschweinchen = turf.pointsWithinPolygon(points_meer, poly_Meerschweinchen);
        
Patrick's avatar
Patrick committed
346
        if (ptsWithin_meerschweinchen.features.length == 0){
Patrick's avatar
Patrick committed
347
            document.getElementById("solution_meerschweinchen").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
348
        } else if (ptsWithin_meerschweinchen.features.length == 1){
Patrick's avatar
Patrick committed
349
            document.getElementById("solution_meerschweinchen").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
350
        }
351
352
353
354
355
356
357
358
    
        }   
        if (points_ufa) {
        var points_ufa = turf.points([
            [point_ufapalast.lon, point_ufapalast.lat]
        ]);
        ptsWithin_ufa = turf.pointsWithinPolygon(points_ufa, poly_UFA_Palast);
        
Patrick's avatar
Patrick committed
359
        if (ptsWithin_ufa.features.length == 0){
Patrick's avatar
Patrick committed
360
            document.getElementById("solution_ufapalast").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
361
        } else if (ptsWithin_ufa.features.length == 1){
Patrick's avatar
Patrick committed
362
            document.getElementById("solution_ufapalast").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
363
        }
364
365
366
367
368
369
370
371
    
        }
        if (points_rosen) {
        var points_rosen = turf.points([
            [point_rosensteinpark.lon, point_rosensteinpark.lat]
        ]);
        ptsWithin_rosenstein = turf.pointsWithinPolygon(points_rosen, poly_Rosensteinpark);
    
Patrick's avatar
Patrick committed
372
        if (ptsWithin_rosenstein.features.length == 0){
Patrick's avatar
Patrick committed
373
            document.getElementById("solution_rosenstein").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_wrong.png";
Patrick's avatar
Patrick committed
374
        } else if (ptsWithin_rosenstein.features.length == 1){
Patrick's avatar
Patrick committed
375
            document.getElementById("solution_rosenstein").src="https://transfer.hft-stuttgart.de/partizipation/datasource-data/NoiseData/Icons_soundquiz/icon_right.png";
Patrick's avatar
Patrick committed
376
377
        }
    
378
379
380
381
382
383
384
385
386
387
388
        }
    
        
        
        
        
        
        
        
        
    
Patrick's avatar
Patrick committed
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
    
    
    
    }

    //ptsWithin = turf.pointsWithinPolygon(points, poly_baustelle);
    // console.log(ptsWithin);
    // if (ptsWithin.features.length == 0){
    //     alert(false);
    // } else if (ptsWithin.features.length == 1){
    //     alert(true);
    // }
}























// var polygone=   [
//     [-73.89632720118, 40.8515320489962],
//     [-73.8964878416508, 40.8512476593594],
//     [-73.8968799791431, 40.851375925454],
//     [-73.8967188588015, 40.851660158514],
//     [-73.89632720118, 40.8515320489962]
// ]

// var baustelle = [[9.192030041439407,48.795435967671466],
//                 [9.193216723986483,48.79495488792281],
//                 [9.193868262453837,48.79608377989257],
//                 [9.19323753687872,48.79624768458771],
//                 [9.19272846497538,48.79547341656016],
//                 [9.192181723252217,48.79565298639707],
//                 [9.192030041439407,48.795435967671466]]

// let baustellePoint

// function isPointInPoly(poly, pt){
// for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i)
// ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1] < poly[i].y))
// && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0])
// && (c = !c);
// return c;
// }


// function check_Bau() {
//     alert(baustellePoint.lon + " - " + baustellePoint.lat)
// alert(isPointInPoly(baustelle, [baustellePoint.lon, baustellePoint.lat]));

// }