// 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.76955,10.48139] , {icon: flag_t1}).addTo(Karte); marker_0.bindPopup("A3 Nürnberg Richtung Würzburg
Ausfahrt Geiselwind Unfallstelle geräumt"); var marker_1 = L.marker([49.471723,10.994907] , {icon: flag_t2}).addTo(Karte); marker_1.bindPopup("B8 Fürther Straße
Nürnberg, Fürther Straße, Königstraße, zwischen Ludwig-Quellen-Straße und Brandenburger Straße, dichter Verkehr (Zeitverlust: 7 Minuten)"); var latlngs_0 = [[49.76955, 10.48139],[49.7696, 10.48121],[49.76964, 10.48106],[49.76968, 10.48092],[49.76973, 10.48078],[49.7698, 10.48061],[49.76987, 10.48049],[49.76998, 10.48035],[49.77012, 10.48024],[49.77024, 10.48015],[49.77034, 10.48011],[49.77046, 10.48006],[49.77056, 10.47993],[49.77062, 10.47985],[49.77067, 10.47973],[49.77071, 10.47959],[49.77073, 10.47945],[49.77073, 10.4793],[49.77072, 10.47917],[49.77069, 10.479],[49.77065, 10.47883],[49.7706, 10.47862],[49.77056, 10.47843],[49.77053, 10.47825],[49.77051, 10.47809],[49.7705, 10.47789],[49.7705, 10.47773],[49.77051, 10.47755],[49.77053, 10.47739],[49.77057, 10.47721],[49.77059, 10.47711],[49.77065, 10.47693],[49.77071, 10.47677],[49.77076, 10.47666],[49.7708, 10.47658],[49.77084, 10.4765]]; var polyline_0 = L.polyline(latlngs_0, {color: 'red', opacity:0.8, weight:5}).addTo(Karte); var latlngs_1 = [[49.471723, 10.994907],[49.471805, 10.994688],[49.472099, 10.993887],[49.472196, 10.993697],[49.472289, 10.993564],[49.472394, 10.993477],[49.472577, 10.993373],[49.472741, 10.993282],[49.472891, 10.993197],[49.473766, 10.992698],[49.473874, 10.992636],[49.473999, 10.992587],[49.47427, 10.992438],[49.474944, 10.992061],[49.475026, 10.992017],[49.475123, 10.991962],[49.475278, 10.991876],[49.475362, 10.991824],[49.475717, 10.991623],[49.475808, 10.991566],[49.475932, 10.991471],[49.476083, 10.991312],[49.47617, 10.991209],[49.476222, 10.991147],[49.476262, 10.991097],[49.47641, 10.990912],[49.476445, 10.990865],[49.476486, 10.990812],[49.476519, 10.990771],[49.47681, 10.990389],[49.47713, 10.989996],[49.477165, 10.989957],[49.477233, 10.989919],[49.477293, 10.989903],[49.477335, 10.989913],[49.477403, 10.989964],[49.477473, 10.990045],[49.477566, 10.990153],[49.47767, 10.990254],[49.477778, 10.990334],[49.477924, 10.990428],[49.478038, 10.990532],[49.478144, 10.990694],[49.478182, 10.990741],[49.478419, 10.991062],[49.478657, 10.991377],[49.478754, 10.991472],[49.478874, 10.991577],[49.478948, 10.991618],[49.479002, 10.991643],[49.479088, 10.991652],[49.479162, 10.991647],[49.479253, 10.991622],[49.479329, 10.99158],[49.479397, 10.991521],[49.479466, 10.991455],[49.479669, 10.991203],[49.47976, 10.99104]]; var polyline_1 = L.polyline(latlngs_1, {color: 'red', opacity:0.8, weight:5}).addTo(Karte);