// 1) Karte initialisieren
var Karte = L.map('meineKarte').setView([49.4521018,11.0766654], 10);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
'attribution': 'Kartendaten © OpenStreetMap Mitwirkende',
'useCache': true
}).addTo(Karte);
// 2) Icons definieren
var flag_t0 = L.icon({
iconUrl: 'https://traffic.audiobroadcast.eu/images/ts_danger.png',
popupAnchor: [-0.5, -6],
iconAnchor: [20, 0]
});
var flag_t1 = L.icon({
iconUrl: 'https://traffic.audiobroadcast.eu/images/ts_danger.png',
popupAnchor: [-0.5, -6],
iconAnchor: [20, 0]
});
var flag_t2 = L.icon({
iconUrl: 'https://traffic.audiobroadcast.eu/images/ts_jam.png',
popupAnchor: [-0.5, -6],
iconAnchor: [20, 0]
});
var flag_t3 = L.icon({
iconUrl: 'https://traffic.audiobroadcast.eu/images/ts_construction.png',
popupAnchor: [-0.5, -6],
iconAnchor: [20, 0]
});
var flag_t4 = L.icon({
iconUrl: 'https://traffic.audiobroadcast.eu/images/ts_radar.png',
popupAnchor: [-0.5, -6],
iconAnchor: [20, 0]
});
// 3) Marker und Polylines NACH Karte und Icons
var marker_0 = L.marker([49.31048,10.99581] , {icon: flag_t1}).addTo(Karte);
marker_0.bindPopup("A6 Nürnberg Richtung Heilbronn
zwischen Schwabach-West und Neuendettelsau liegen Reifenteile auf der Fahrbahn ");
var marker_1 = L.marker([49.5363597,11.0373437] , {icon: flag_t2}).addTo(Karte);
marker_1.bindPopup("A3 Würzburg Richtung Nürnberg
3 km Stau zwischen Erlangen-Tennenlohe und Nürnberg-Nord");
var latlngs_0 = [[49.31048, 10.99581],[49.31048, 10.99541],[49.31049, 10.99437],[49.31048, 10.99346],[49.31046, 10.99231],[49.31045, 10.99177],[49.31042, 10.99084],[49.31038, 10.98982],[49.3103, 10.98825],[49.31021, 10.98687],[49.31015, 10.98611],[49.31007, 10.98516],[49.31001, 10.98451],[49.30992, 10.98363],[49.30984, 10.98289],[49.30975, 10.9821],[49.30964, 10.98124],[49.30953, 10.9804],[49.30941, 10.97959],[49.30931, 10.97892],[49.30924, 10.97846],[49.30914, 10.97786],[49.30895, 10.97676],[49.30892, 10.97655],[49.30887, 10.97627],[49.30879, 10.97584],[49.30865, 10.97506],[49.30841, 10.97384],[49.30837, 10.97363],[49.30826, 10.97315],[49.3081, 10.97242],[49.30791, 10.97157],[49.30764, 10.97043],[49.30733, 10.96912],[49.30702, 10.96789],[49.30678, 10.96694],[49.30633, 10.96517],[49.30607, 10.96414],[49.30574, 10.96279],[49.30563, 10.96229],[49.30542, 10.96138],[49.30521, 10.96052],[49.30502, 10.95969],[49.30481, 10.95872],[49.30471, 10.95826],[49.30457, 10.95757],[49.30444, 10.95689],[49.30436, 10.95647],[49.30427, 10.95597],[49.30419, 10.95553],[49.30409, 10.95496],[49.30401, 10.95448],[49.30391, 10.95386],[49.30382, 10.9533],[49.30373, 10.9527],[49.30362, 10.95191],[49.3035, 10.95104],[49.30343, 10.95046],[49.30336, 10.94985],[49.30331, 10.94943],[49.30326, 10.94896],[49.30319, 10.9483],[49.30312, 10.94766],[49.30303, 10.94672],[49.30297, 10.9459],[49.30293, 10.94541],[49.30289, 10.94487],[49.30286, 10.94447],[49.30283, 10.94403],[49.30281, 10.94369],[49.30271, 10.94159],[49.30267, 10.94015],[49.30264, 10.9389],[49.30264, 10.93735],[49.30265, 10.93575],[49.30268, 10.93466],[49.30271, 10.93371],[49.30274, 10.93296],[49.3028, 10.93174],[49.30284, 10.93115],[49.30291, 10.93016],[49.30298, 10.92939],[49.30304, 10.92874],[49.30311, 10.92813],[49.30316, 10.9277],[49.30321, 10.92725],[49.3033, 10.92657],[49.30342, 10.92573],[49.30361, 10.92464],[49.30378, 10.92377],[49.30387, 10.92334],[49.30396, 10.92292],[49.30414, 10.92212],[49.30424, 10.9217],[49.3044, 10.92106],[49.30455, 10.9205],[49.3047, 10.91996],[49.30492, 10.91921],[49.3051, 10.91864],[49.30539, 10.91777],[49.30556, 10.91728],[49.30571, 10.91686],[49.30603, 10.91601],[49.3064, 10.91507],[49.30663, 10.9145],[49.30685, 10.91397],[49.30696, 10.9137],[49.30707, 10.91344],[49.30725, 10.9130286],[49.30735, 10.9128],[49.30763, 10.91215],[49.30783, 10.9117],[49.30813, 10.91101],[49.30867, 10.90979],[49.30882, 10.90945],[49.30898, 10.90909],[49.3091456, 10.9087135],[49.30931, 10.90834],[49.30942, 10.90809],[49.30966, 10.90753],[49.30984, 10.9071],[49.31019, 10.90625],[49.31056, 10.90533],[49.3108, 10.90472],[49.31101, 10.90415],[49.31126, 10.90344],[49.31146, 10.90288],[49.31166, 10.90229],[49.31182, 10.90181],[49.31198, 10.90132],[49.31216, 10.90074],[49.31233, 10.90018],[49.31261, 10.89923],[49.31286, 10.89832],[49.31298, 10.89787],[49.31312, 10.89734],[49.31327, 10.89675],[49.31339, 10.89627],[49.31355, 10.89559],[49.31368, 10.89501],[49.31387, 10.89413],[49.31404, 10.89331],[49.3142, 10.8925],[49.31429, 10.89201],[49.3144, 10.8914],[49.31456, 10.89047],[49.31463, 10.89005],[49.31472, 10.88946],[49.31483, 10.88866],[49.31496, 10.88769],[49.3150049, 10.8873532],[49.31504, 10.88709],[49.31507, 10.88683],[49.31511, 10.8865],[49.3152, 10.88567],[49.31532, 10.88451],[49.3154, 10.88369],[49.31552, 10.88215],[49.31558, 10.88141],[49.31566, 10.88016],[49.31574, 10.87881],[49.31576, 10.8784],[49.315823, 10.8770559],[49.31585, 10.87648],[49.31589, 10.87551],[49.31594, 10.87396],[49.315983, 10.8728142],[49.316, 10.87236],[49.31603, 10.87135],[49.31607, 10.87038],[49.3161, 10.86953],[49.31612, 10.86882],[49.31615, 10.86781],[49.31616, 10.86673],[49.31617, 10.86555],[49.31617, 10.8645],[49.31616, 10.86353],[49.31614, 10.86251],[49.31611, 10.86148],[49.31607, 10.86072],[49.31604, 10.86024],[49.31602, 10.85991],[49.31601, 10.85969],[49.31599, 10.85926],[49.31597, 10.85881],[49.31592, 10.85765],[49.31584, 10.85612],[49.31579, 10.85516],[49.31576, 10.85465],[49.31573, 10.85417],[49.31569, 10.85361],[49.31563, 10.85279],[49.31558, 10.85216],[49.31554, 10.8517],[49.31551, 10.85135],[49.31548, 10.85101],[49.31544, 10.85056],[49.31539, 10.85006],[49.31533, 10.84951],[49.31526, 10.84888],[49.31521, 10.84845],[49.31515, 10.84798],[49.3151, 10.84759],[49.31506, 10.84729],[49.31498, 10.84671],[49.31491, 10.84622],[49.31484, 10.84575],[49.31476, 10.84524],[49.31469, 10.84483],[49.31461, 10.84436],[49.31452, 10.84385],[49.31444, 10.8434],[49.31435, 10.84291],[49.31428, 10.84256],[49.3142, 10.84215],[49.31411, 10.8417],[49.31404, 10.84137],[49.31395, 10.84096],[49.31384, 10.84046],[49.3137, 10.83985],[49.31356, 10.83927],[49.31347, 10.83889],[49.31329, 10.83818],[49.31304, 10.83723],[49.31289, 10.83669],[49.31279, 10.83633],[49.31268, 10.83594],[49.31254, 10.83548],[49.31239, 10.83499],[49.31222, 10.83445],[49.31206, 10.83396],[49.31192, 10.83352],[49.31177, 10.83306],[49.31154, 10.83237],[49.31122, 10.83143],[49.31088, 10.83044],[49.31057, 10.82954],[49.31029, 10.82875],[49.31009, 10.82816],[49.30994, 10.82771],[49.3098, 10.82729],[49.30964, 10.82681],[49.30944, 10.82618],[49.30919, 10.82539],[49.30892, 10.8245],[49.30868, 10.82367],[49.30852, 10.8231],[49.30839, 10.82262],[49.30834, 10.82243],[49.30826, 10.82212],[49.30799, 10.82106],[49.3079, 10.8207],[49.30779, 10.82022],[49.30769, 10.81978],[49.30759, 10.81932],[49.30747, 10.81877],[49.30735, 10.8182],[49.30722, 10.81756],[49.30709, 10.81689],[49.30696, 10.8162],[49.30684, 10.81554],[49.3067, 10.81475],[49.30657, 10.81398],[49.30643, 10.81311],[49.30629, 10.81219],[49.30616, 10.81129],[49.30605, 10.81049],[49.30592, 10.80947],[49.30581, 10.80859],[49.30576, 10.80816],[49.30571, 10.80773],[49.30567, 10.80734],[49.30563, 10.80697],[49.30558, 10.8065],[49.30553, 10.806],[49.30548, 10.80549],[49.30544, 10.80504],[49.3054, 10.80459],[49.30536, 10.80411],[49.30532, 10.8036],[49.30528, 10.80306],[49.30521, 10.80202],[49.30515, 10.80108],[49.30509, 10.79999],[49.30506, 10.79927],[49.30503, 10.7986],[49.305, 10.79776],[49.30498, 10.79698],[49.30495, 10.79619],[49.30494, 10.79594],[49.30494, 10.79573],[49.30494, 10.79456],[49.30494, 10.79378],[49.30494, 10.79315],[49.30495, 10.79278],[49.30495, 10.79244],[49.30496, 10.79213]];
var polyline_0 = L.polyline(latlngs_0, {color: 'red', opacity:0.8, weight:5}).addTo(Karte);
var latlngs_1 = [[49.5363597, 11.0373437],[49.53597, 11.03869],[49.53585, 11.0391],[49.53566, 11.03975],[49.53544, 11.04049],[49.53525, 11.04114],[49.53418, 11.0448],[49.53313, 11.04837],[49.53252, 11.05046],[49.53249, 11.05057],[49.53207, 11.05199],[49.53202, 11.05216],[49.53165, 11.05343],[49.53159, 11.05363],[49.53143, 11.05417],[49.53114, 11.05517],[49.53103, 11.05554],[49.53088, 11.05605],[49.53074, 11.05652],[49.53063, 11.05688],[49.53048, 11.05736],[49.53033, 11.05782],[49.53016, 11.05832],[49.52998, 11.05883],[49.52977, 11.05941],[49.52961, 11.05983],[49.52944, 11.06027],[49.52923, 11.06079],[49.52904, 11.06126],[49.5288, 11.06183],[49.52854, 11.06241],[49.52837, 11.06278],[49.52835, 11.06282],[49.52786, 11.06386],[49.52772, 11.06414],[49.52753, 11.06452],[49.5273, 11.06497],[49.52712, 11.06531],[49.52692, 11.06569],[49.52653, 11.06642],[49.52604, 11.06734],[49.52531, 11.0687],[49.52515, 11.06899],[49.52468, 11.06986],[49.52449, 11.07021],[49.52432, 11.07053],[49.52393, 11.07127],[49.52278, 11.07341],[49.52236, 11.0742],[49.52205, 11.07478],[49.52177, 11.0753],[49.52105, 11.07664],[49.52069, 11.07732],[49.51997, 11.0787],[49.51971, 11.07918],[49.5193, 11.07996],[49.51836, 11.08172],[49.51788, 11.08261],[49.5177, 11.08295],[49.51753, 11.08327],[49.51706, 11.08414],[49.51648, 11.08521],[49.51617, 11.0858],[49.51588, 11.08635],[49.51554, 11.08701],[49.51528, 11.08752],[49.51508, 11.08793],[49.51488, 11.08834],[49.5147, 11.08873],[49.51454, 11.08908],[49.51434, 11.08953],[49.51401, 11.09031],[49.51391, 11.09056],[49.5137, 11.09107],[49.51354, 11.09148],[49.51335, 11.09198],[49.51321, 11.09236],[49.51304, 11.09283],[49.51288, 11.09329],[49.51273, 11.09373],[49.5126, 11.09413],[49.51247, 11.09453],[49.51233, 11.09498],[49.51221, 11.09539],[49.51208, 11.09583],[49.51196, 11.09625],[49.51183, 11.09672],[49.51169, 11.09724],[49.51156, 11.09773],[49.5114, 11.09836],[49.51117, 11.09928],[49.51021, 11.10316],[49.50949, 11.106],[49.50923, 11.10703],[49.5091273, 11.1074329],[49.50897, 11.10805],[49.50887, 11.10845],[49.50884, 11.10859],[49.50873, 11.10902],[49.50861, 11.10948],[49.50859, 11.10957],[49.50856, 11.10969],[49.5085, 11.10994],[49.5083607, 11.1105022],[49.50822, 11.11107],[49.50815, 11.11136],[49.50794, 11.11219],[49.50778, 11.11283],[49.50758, 11.11362],[49.50737, 11.11447],[49.50719, 11.11521],[49.5071, 11.11557],[49.50699, 11.11599],[49.50685, 11.11649],[49.50673, 11.11692],[49.5066, 11.11737],[49.50641, 11.11797],[49.50623, 11.11847],[49.50614, 11.11873],[49.50604, 11.11901],[49.50593, 11.11932],[49.50583, 11.11959],[49.50572, 11.11988],[49.5056, 11.12021],[49.50548, 11.12053],[49.50537, 11.12083],[49.50526, 11.12112],[49.50517, 11.12134],[49.50506, 11.1216],[49.50492, 11.12192],[49.50475, 11.12231],[49.50463, 11.12257],[49.50432, 11.12323],[49.50397, 11.12395],[49.50366, 11.12456],[49.50337, 11.12514],[49.5033482, 11.1251829]];
var polyline_1 = L.polyline(latlngs_1, {color: 'red', opacity:0.8, weight:5}).addTo(Karte);