$(document).ready(function() { mapboxgl.accessToken = 'pk.eyJ1Ijoiam90dW50cmF2ZWwiLCJhIjoiY2pwYXlhYW4yMjBhazNwbzNkbDB0Z2FkcCJ9.puxFN_Tq9avC9vFwXfk-TQ'; var map39 = new mapboxgl.Map({ container: 'map39', style: 'mapbox://styles/jotuntravel/cjpayd53v05jr2st680kx34zn?optimize=true', center: [8.428327,61.411280], zoom: 8.00}); map39.on('load', function() { map39.addLayer({ "id": "4", "type": "line", "source": { "type": "geojson", "data": { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ 8.48718, 61.45115 ], [ 8.48672, 61.45109 ], [ 8.48542, 61.45049 ], [ 8.48477, 61.45027 ], [ 8.48423, 61.45003 ], [ 8.48375, 61.44958 ], [ 8.48373, 61.44936 ], [ 8.48383, 61.44908 ], [ 8.48404, 61.44867 ], [ 8.48463, 61.44804 ], [ 8.48442, 61.44756 ], [ 8.48433, 61.44746 ], [ 8.48676, 61.44666 ], [ 8.48817, 61.44613 ], [ 8.48977, 61.44566 ], [ 8.49098, 61.44562 ], [ 8.4926, 61.44577 ], [ 8.49433, 61.44585 ], [ 8.49488, 61.44605 ], [ 8.49633, 61.44656 ], [ 8.49776, 61.44689 ], [ 8.49872, 61.44684 ], [ 8.50003, 61.44654 ], [ 8.501, 61.4462 ], [ 8.50179, 61.44576 ], [ 8.50225, 61.44536 ], [ 8.5035, 61.44379 ], [ 8.50401, 61.44294 ], [ 8.50411, 61.4427 ], [ 8.50414, 61.4423 ], [ 8.50401, 61.44199 ], [ 8.50417, 61.44164 ], [ 8.50417, 61.44154 ], [ 8.50341, 61.44088 ], [ 8.50323, 61.44046 ], [ 8.50328, 61.43983 ], [ 8.50316, 61.43922 ], [ 8.503, 61.43883 ], [ 8.50301, 61.43847 ], [ 8.50338, 61.43792 ], [ 8.50363, 61.43771 ], [ 8.50386, 61.43759 ], [ 8.50392, 61.43738 ], [ 8.50387, 61.43698 ], [ 8.50401, 61.4366 ], [ 8.50652, 61.43558 ], [ 8.50722, 61.43513 ], [ 8.50818, 61.43489 ], [ 8.50914, 61.43446 ], [ 8.50967, 61.43429 ], [ 8.51042, 61.43413 ], [ 8.5111, 61.43406 ], [ 8.51199, 61.43363 ], [ 8.51391, 61.43283 ], [ 8.51606, 61.43201 ], [ 8.51665, 61.4317 ], [ 8.51773, 61.43095 ], [ 8.51909, 61.43012 ], [ 8.52016, 61.42985 ], [ 8.52132, 61.42994 ], [ 8.52209, 61.42966 ], [ 8.5248, 61.42791 ], [ 8.52639, 61.427 ], [ 8.52694, 61.42675 ], [ 8.52725, 61.4263 ], [ 8.52774, 61.42613 ], [ 8.52812, 61.42582 ], [ 8.52869, 61.42545 ], [ 8.52961, 61.42507 ], [ 8.5308, 61.4245 ], [ 8.53225, 61.42408 ], [ 8.53261, 61.42391 ], [ 8.53366, 61.42359 ], [ 8.53432, 61.42349 ], [ 8.53492, 61.42325 ], [ 8.53515, 61.42312 ], [ 8.53534, 61.42291 ], [ 8.53661, 61.42212 ], [ 8.53788, 61.42146 ], [ 8.53856, 61.42088 ], [ 8.53921, 61.42025 ], [ 8.53946, 61.41995 ], [ 8.54007, 61.41948 ], [ 8.54116, 61.41897 ], [ 8.5415, 61.41873 ], [ 8.54201, 61.41853 ], [ 8.54237, 61.41831 ], [ 8.54258, 61.41823 ], [ 8.54273, 61.4181 ], [ 8.54333, 61.41781 ], [ 8.54467, 61.41737 ], [ 8.54576, 61.41716 ], [ 8.54717, 61.41704 ], [ 8.54815, 61.4168 ], [ 8.5492, 61.41646 ], [ 8.54937, 61.41629 ], [ 8.55001, 61.41612 ], [ 8.55316, 61.4149 ], [ 8.55475, 61.41396 ], [ 8.55517, 61.41375 ], [ 8.55581, 61.41354 ], [ 8.55664, 61.41312 ], [ 8.55691, 61.41292 ], [ 8.55778, 61.41245 ], [ 8.55844, 61.41216 ], [ 8.56003, 61.41134 ], [ 8.56029, 61.41116 ], [ 8.56091, 61.41088 ], [ 8.56125, 61.41076 ], [ 8.562, 61.41062 ], [ 8.56379, 61.41017 ], [ 8.5642, 61.41002 ], [ 8.5649, 61.40968 ], [ 8.56738, 61.40887 ], [ 8.5691, 61.40802 ], [ 8.57008, 61.40777 ], [ 8.57208, 61.40657 ], [ 8.57244, 61.4063 ], [ 8.57342, 61.40575 ], [ 8.57374, 61.40549 ], [ 8.57393, 61.40521 ], [ 8.57404, 61.40512 ], [ 8.57412, 61.40496 ], [ 8.57452, 61.40458 ], [ 8.57456, 61.40442 ], [ 8.57483, 61.40416 ], [ 8.57496, 61.40412 ], [ 8.57518, 61.40412 ], [ 8.57492, 61.40409 ], [ 8.57505, 61.40395 ], [ 8.57523, 61.4033 ], [ 8.5755, 61.40288 ], [ 8.57556, 61.40263 ], [ 8.57571, 61.4023 ], [ 8.57617, 61.40162 ], [ 8.57632, 61.40147 ], [ 8.57687, 61.40118 ], [ 8.57749, 61.4007 ], [ 8.57809, 61.40043 ], [ 8.57833, 61.40037 ], [ 8.57867, 61.40017 ], [ 8.57888, 61.39992 ], [ 8.57928, 61.39915 ], [ 8.57975, 61.39875 ], [ 8.57981, 61.39863 ], [ 8.5807, 61.39765 ], [ 8.58074, 61.39748 ], [ 8.58097, 61.39718 ], [ 8.58109, 61.39693 ], [ 8.58105, 61.39681 ], [ 8.58112, 61.396 ], [ 8.58133, 61.39569 ], [ 8.5813, 61.3954 ], [ 8.58167, 61.39452 ], [ 8.58179, 61.39412 ], [ 8.582, 61.3937 ], [ 8.58234, 61.39321 ], [ 8.58261, 61.3926 ], [ 8.58299, 61.39224 ], [ 8.58312, 61.39196 ], [ 8.58325, 61.39182 ], [ 8.58335, 61.39143 ], [ 8.5833, 61.3906 ], [ 8.58352, 61.38972 ], [ 8.58375, 61.38946 ], [ 8.58378, 61.38943 ], [ 8.58397, 61.38922 ], [ 8.58418, 61.38886 ], [ 8.58412, 61.38874 ], [ 8.58391, 61.38823 ], [ 8.5838, 61.38776 ], [ 8.58407, 61.38701 ], [ 8.58508, 61.38662 ], [ 8.58535, 61.38643 ], [ 8.58605, 61.38577 ], [ 8.58686, 61.38515 ], [ 8.58716, 61.38485 ], [ 8.58769, 61.38447 ], [ 8.58839, 61.38416 ], [ 8.58895, 61.38402 ], [ 8.58964, 61.38391 ], [ 8.59048, 61.3838 ], [ 8.59082, 61.3837 ], [ 8.59099, 61.38359 ], [ 8.59165, 61.38309 ], [ 8.59206, 61.38296 ], [ 8.59235, 61.38291 ], [ 8.59312, 61.38278 ], [ 8.5937, 61.38261 ], [ 8.5937, 61.38251 ], [ 8.59385, 61.38226 ], [ 8.59382, 61.382 ], [ 8.59294, 61.38182 ], [ 8.59242, 61.38185 ], [ 8.59224, 61.38159 ], [ 8.59196, 61.38145 ], [ 8.59194, 61.38143 ], [ 8.5918, 61.38131 ], [ 8.59148, 61.38095 ], [ 8.59121, 61.38056 ], [ 8.59113, 61.38044 ], [ 8.59092, 61.37969 ], [ 8.59109, 61.37949 ], [ 8.59124, 61.37913 ], [ 8.59145, 61.37889 ], [ 8.59183, 61.37819 ], [ 8.59191, 61.378 ], [ 8.59289, 61.37665 ], [ 8.593, 61.37643 ], [ 8.59293, 61.3763 ], [ 8.59287, 61.37618 ], [ 8.59319, 61.37591 ], [ 8.59358, 61.37506 ], [ 8.59413, 61.3743 ], [ 8.5944, 61.37369 ], [ 8.59442, 61.37355 ], [ 8.59461, 61.37351 ], [ 8.59507, 61.37304 ], [ 8.59515, 61.37274 ], [ 8.59542, 61.37191 ], [ 8.59535, 61.37173 ], [ 8.59537, 61.37161 ], [ 8.59543, 61.37118 ], [ 8.59551, 61.37108 ], [ 8.59564, 61.37093 ], [ 8.59605, 61.37019 ], [ 8.59618, 61.37002 ], [ 8.59611, 61.36981 ], [ 8.59621, 61.3695 ], [ 8.59612, 61.36919 ], [ 8.59631, 61.3688 ], [ 8.59675, 61.36837 ], [ 8.59694, 61.36808 ], [ 8.59708, 61.3675 ], [ 8.59705, 61.3673 ], [ 8.59742, 61.36679 ], [ 8.59764, 61.36646 ], [ 8.59774, 61.3662 ], [ 8.5976, 61.36582 ], [ 8.59765, 61.36508 ], [ 8.59756, 61.36483 ], [ 8.5974, 61.364 ], [ 8.59743, 61.36384 ], [ 8.59746, 61.36368 ], [ 8.59747, 61.36342 ], [ 8.59773, 61.36237 ], [ 8.5977, 61.36175 ], [ 8.59763, 61.36161 ], [ 8.59726, 61.36129 ], [ 8.59628, 61.36077 ], [ 8.59597, 61.36027 ], [ 8.59592, 61.35993 ], [ 8.596, 61.35959 ], [ 8.59604, 61.35944 ], [ 8.59623, 61.35916 ], [ 8.59657, 61.35873 ], [ 8.59665, 61.35842 ], [ 8.59664, 61.35809 ], [ 8.59675, 61.35791 ], [ 8.59681, 61.35781 ], [ 8.59686, 61.35731 ], [ 8.59709, 61.357 ], [ 8.59708, 61.35695 ], [ 8.5969, 61.35661 ], [ 8.59562, 61.35599 ], [ 8.59538, 61.35584 ] ] } } ] } }, "layout": { "line-join": "round", "line-cap": "round" }, "paint": { "line-color": "#000000", "line-width": 3 } }); map39.addLayer({ "id": "5", "type": "line", "source": { "type": "geojson", "data": { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ 8.798041382726273, 61.32851877566036 ], [ 8.780199147415852, 61.32596806240119 ], [ 8.770168899134356, 61.32204263311966 ], [ 8.758900303620344, 61.32105106823661 ], [ 8.7518539546662, 61.32844167547652 ], [ 8.740526643990382, 61.33264230033256 ], [ 8.70114217718285, 61.33616939835663 ], [ 8.650549649601851, 61.33994748832492 ], [ 8.612452166511854, 61.34508460684068 ], [ 8.596988919657479, 61.353331059098934 ], [ 8.595342335539556, 61.35656047952262 ], [ 8.595342335539556, 61.35656047952262 ], [ 8.577717191429263, 61.3489535068933 ], [ 8.537673551452555, 61.34752049604325 ], [ 8.494256999996699, 61.34811853724524 ], [ 8.431905846142971, 61.35038611684405 ], [ 8.394962962554178, 61.3605241489368 ], [ 8.37278268519376, 61.36739753676232 ], [ 8.339336248408316, 61.376499136079815 ], [ 8.31053856467682, 61.378388004303645 ], [ 8.303366989400592, 61.37609850271429 ], [ 8.295344515338078, 61.37589505887683 ] ] } } }, "layout": { "line-join": "round", "line-cap": "round" }, "paint": { "line-color": "#0000FF", "line-width": 3 } }); map39.addLayer({ "id": "39", "type": "line", "source": { "type": "geojson", "data": { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ 8.496554569495885, 61.453415717754794 ], [ 8.502355431637966, 61.451144504729974 ], [ 8.510291449852543, 61.45267138377693 ], [ 8.55602980653066, 61.46453706588846 ], [ 8.62393558432985, 61.48150688848965 ], [ 8.637439994515644, 61.485835914255254 ], [ 8.638480907499094, 61.4885608437695 ], [ 8.635400648735514, 61.49058297624503 ], [ 8.634604854373118, 61.491222571071624 ], [ 8.634778673085009, 61.49092709359124 ], [ 8.6370163670431, 61.489400807593356 ], [ 8.638300827532587, 61.488896352345705 ], [ 8.650419774735155, 61.48760227662114 ], [ 8.66161198003523, 61.4874140299274 ], [ 8.669705929253833, 61.4886906639633 ], [ 8.692024034764325, 61.49191234521558 ], [ 8.71392431752176, 61.49346575826149 ], [ 8.75277515182233, 61.49423014843 ], [ 8.771378909099878, 61.493860967094584 ], [ 8.79138084144279, 61.49673367241294 ], [ 8.797641853016506, 61.49716639555988 ], [ 8.803985510999018, 61.496672912555525 ], [ 8.806169413149059, 61.49598959040934 ], [ 8.8071792251201, 61.49554631305888 ], [ 8.809277219900164, 61.495059270794 ] ] } } }, "layout": { "line-join": "round", "line-cap": "round" }, "paint": { "line-color": "#0000FF", "line-width": 3 } }); // Add a layer showing the places. map39.addLayer({ "id": "places", "type": "symbol", "source": { "type": "geojson", "data": { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "description": "Bergo Hotel
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.904939,61.248140] } }, { "type": "Feature", "properties": { "description": "Bessheim Fjellstue og Hytter
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.853032,61.514633] } }, { "type": "Feature", "properties": { "description": "Bjørnhollia
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [10.009328,61.884619] } }, { "type": "Feature", "properties": { "description": "Brimi Sæter
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.914364,61.807016] } }, { "type": "Feature", "properties": { "description": "Bygdin Høifieldshotell
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.798933,61.327682] } }, { "type": "Feature", "properties": { "description": "Dovregubbens Hall
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.429248,62.174605] } }, { "type": "Feature", "properties": { "description": "Eidsbugarden
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.299659,61.375545] } }, { "type": "Feature", "properties": { "description": "Fagernes Camping Park
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.231487,60.981882] } }, { "type": "Feature", "properties": { "description": "Fannaråkhytta DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.906140,61.516652] } }, { "type": "Feature", "properties": { "description": "Fondsbu DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.297473,61.375190] } }, { "type": "Feature", "properties": { "description": "Gjendebu DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.488513,61.451376] } }, { "type": "Feature", "properties": { "description": "Gjendesheim DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.812676,61.494328] } }, { "type": "Feature", "properties": { "description": "Glitterheim DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.632970,61.622873] } }, { "type": "Feature", "properties": { "description": "Gomobu Fjellstue
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.985942,60.980678] } }, { "type": "Feature", "properties": { "description": "Grimsdalshytta DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.639533,62.091329] } }, { "type": "Feature", "properties": { "description": "Grønolen Fjellgard
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.841270,61.241373] } }, { "type": "Feature", "properties": { "description": "Hageseter Turisthytte
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.547282,62.195556] } }, { "type": "Feature", "properties": { "description": "Herangtunet
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.081765,61.130138] } }, { "type": "Feature", "properties": { "description": "Hjerkinn Fjellstue
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.547206,62.224448] } }, { "type": "Feature", "properties": { "description": "Indre Ofredal - ne fø' sjøen
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.532371,61.208726] } }, { "type": "Feature", "properties": { "description": "Jotunheimen Husky Lodge
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.051462,61.717341] } }, { "type": "Feature", "properties": { "description": "Jotunheimen Panorama
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.336045,61.717157] } }, { "type": "Feature", "properties": { "description": "Kamben Høyfjellshotell
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.979579,60.802287] } }, { "type": "Feature", "properties": { "description": "Klingenberg Hotel
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.701000,61.235398] } }, { "type": "Feature", "properties": { "description": "Leirvassbu Fjellstue
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.247085,61.549019] } }, { "type": "Feature", "properties": { "description": "Lemonsjøen Fjellstue
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.074385,61.759203] } }, { "type": "Feature", "properties": { "description": "Memurubu
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.630078,61.490802] } }, { "type": "Feature", "properties": { "description": "Nørdstedalseter DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.790526,61.642778] } }, { "type": "Feature", "properties": { "description": "Nøsen Yoga and Mountain Resort
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.846820,60.938734] } }, { "type": "Feature", "properties": { "description": "Piltingsrud Gård
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.771409,60.655539] } }, { "type": "Feature", "properties": { "description": "Radisson BLU Mountain Resort Beitostølen
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.898775,61.249207] } }, { "type": "Feature", "properties": { "description": "Rondvassbu DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.794238,61.878808] } }, { "type": "Feature", "properties": { "description": "Ruten Fjellstue
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.448610,61.472532] } }, { "type": "Feature", "properties": { "description": "Scandic Valdres
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.238262,60.985071] } }, { "type": "Feature", "properties": { "description": "Skogadalsbøen DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.009270,61.462634] } }, { "type": "Feature", "properties": { "description": "Snøheim
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.351416,62.294039] } }, { "type": "Feature", "properties": { "description": "Snøheim DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.349316,62.294061] } }, { "type": "Feature", "properties": { "description": "Sota Sæter DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.708122,61.809172] } }, { "type": "Feature", "properties": { "description": "Spiterstulen turisthytte
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.404525,61.624846] } }, { "type": "Feature", "properties": { "description": "Storefjell Resort Hotel
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.952295,60.803816] } }, { "type": "Feature", "properties": { "description": "Syndinstøga
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.738664,61.089835] } }, { "type": "Feature", "properties": { "description": "Thon Hotel Astoria
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [10.746812,59.911162] } }, { "type": "Feature", "properties": { "description": "Thon Hotel Opera
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [10.753206,59.909483] } }, { "type": "Feature", "properties": { "description": "Toftemo Turiststasjon
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.220979,61.999496] } }, { "type": "Feature", "properties": { "description": "Torfinnsbu DNT
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.595949,61.356169] } }, { "type": "Feature", "properties": { "description": "Trolltun gjestegård
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.144226,62.077458] } }, { "type": "Feature", "properties": { "description": "Turtagrø Hotel
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.801624,61.504360] } }, { "type": "Feature", "properties": { "description": "Tyin Filefjellstuene
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.233433,61.195964] } }, { "type": "Feature", "properties": { "description": "Tyinholmen Høyfjellsstuer
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [8.257920,61.354764] } }, { "type": "Feature", "properties": { "description": "Vågå Hotel
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [9.098358,61.877716] } }, { "type": "Feature", "properties": { "description": "Vetti Gard Turiststasjon
", "icon": "lodging" }, "geometry": { "type": "Point", "coordinates": [7.926720,61.374821] } }, { "type": "Feature", "properties": { "description": "Avdalsfossen
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [7.887614,61.354128] } }, { "type": "Feature", "properties": { "description": "Besseggen
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [8.732235,61.503751] } }, { "type": "Feature", "properties": { "description": "Bitihorn
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.799419,61.294364] } }, { "type": "Feature", "properties": { "description": "Borgund Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [7.812352,61.047251] } }, { "type": "Feature", "properties": { "description": "Falketind
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.087076,61.384517] } }, { "type": "Feature", "properties": { "description": "Galdhøpiggen
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.312798,61.636337] } }, { "type": "Feature", "properties": { "description": "Gjendebåten Harbour
", "icon": "harbor" }, "geometry": { "type": "Point", "coordinates": [8.633949,61.490515] } }, { "type": "Feature", "properties": { "description": "Gjendebåten Harbour
", "icon": "harbor" }, "geometry": { "type": "Point", "coordinates": [8.499444,61.453434] } }, { "type": "Feature", "properties": { "description": "Glittertind
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.556249,61.651136] } }, { "type": "Feature", "properties": { "description": "Hedalen Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [9.690722,60.622458] } }, { "type": "Feature", "properties": { "description": "Hegge Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [9.023674,61.157891] } }, { "type": "Feature", "properties": { "description": "Hjellefossen
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [7.881311,61.343956] } }, { "type": "Feature", "properties": { "description": "Hopperstad Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [6.568880,61.077487] } }, { "type": "Feature", "properties": { "description": "Høre Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [8.804541,61.153192] } }, { "type": "Feature", "properties": { "description": "Kaupanger Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [7.233404,61.184168] } }, { "type": "Feature", "properties": { "description": "Knutshøe
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.755433,61.480078] } }, { "type": "Feature", "properties": { "description": "Kvitskardtinden
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.619846,61.399786] } }, { "type": "Feature", "properties": { "description": "Lom Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [8.566227,61.839791] } }, { "type": "Feature", "properties": { "description": "Lomen Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [8.890676,61.132829] } }, { "type": "Feature", "properties": { "description": "M/B Bitihorn - Harbour
", "icon": "harbor" }, "geometry": { "type": "Point", "coordinates": [8.299945,61.375461] } }, { "type": "Feature", "properties": { "description": "M/B Bitihorn - Harbour
", "icon": "harbor" }, "geometry": { "type": "Point", "coordinates": [8.795165,61.328534] } }, { "type": "Feature", "properties": { "description": "M/B Bitihorn - Harbour
", "icon": "harbor" }, "geometry": { "type": "Point", "coordinates": [8.595509,61.355922] } }, { "type": "Feature", "properties": { "description": "Mesmogtind
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.537838,61.404969] } }, { "type": "Feature", "properties": { "description": "Nørdre Kalvehølotinden
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.631152,61.371224] } }, { "type": "Feature", "properties": { "description": "Reinli Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [9.492955,60.831504] } }, { "type": "Feature", "properties": { "description": "Svartdalen
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [8.563654,61.409720] } }, { "type": "Feature", "properties": { "description": "Synshorn
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.798034,61.336617] } }, { "type": "Feature", "properties": { "description": "The Knight’s leap (Ridderspranget)
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [9.094193,61.681322] } }, { "type": "Feature", "properties": { "description": "Uranostind
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.150264,61.426664] } }, { "type": "Feature", "properties": { "description": "Urnes Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [7.322496,61.297989] } }, { "type": "Feature", "properties": { "description": "Vettifossen
", "icon": "attraction" }, "geometry": { "type": "Point", "coordinates": [7.940872,61.381340] } }, { "type": "Feature", "properties": { "description": "Vågå Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [9.097187,61.875955] } }, { "type": "Feature", "properties": { "description": "Østre Torfinnstind
", "icon": "mountain" }, "geometry": { "type": "Point", "coordinates": [8.580219,61.372527] } }, { "type": "Feature", "properties": { "description": "Øye Stave Church
", "icon": "religious-christian" }, "geometry": { "type": "Point", "coordinates": [8.399859,61.167827] } },] } }, "layout": { "icon-image": "{icon}-15", "icon-allow-overlap": true } });// Add map layout. // Create a popup, but don't add it to the map yet. var popup = new mapboxgl.Popup({ closeButton: false, closeOnClick: false }); map39.on('mouseenter', 'places', function(e) { map39.getCanvas().style.cursor = 'pointer'; var coordinates2 = e.features[0].geometry.coordinates.slice(); var description = e.features[0].properties.description; while (Math.abs(e.lngLat.lng - coordinates2[0]) > 180) { coordinates2[0] += e.lngLat.lng > coordinates2[0] ? 360 : -360; } popup.setLngLat(coordinates2) .setHTML(description) .addTo(map39); }); map39.on('mouseleave', 'places', function() { map39.getCanvas().style.cursor = ''; popup.remove(); }); var coordinates = geojson.features[0].geometry.coordinates; var bounds = coordinates.reduce(function(bounds, coord) { return bounds.extend(coord); }, new mapboxgl.LngLatBounds(coordinates[0], coordinates[0])); map39.fitBounds(bounds, {padding: 20}); }); // Add zoom and rotation controls to the map. map39.addControl(new mapboxgl.NavigationControl()); // disable map zoom when using scroll map39.scrollZoom.disable(); // Add geolocate control to the map. map39.addControl( new mapboxgl.GeolocateControl({ positionOptions: { enableHighAccuracy: true }, trackUserLocation: true }) );});