var mapApiUrl = 'http://www2.mapandroute.de/'; var appName = 'MaR_Homepage-map-1.1'; var appUrl = 'http://www2.mapandroute.de'; var geocoderUrl = 'http://localhost/'; var gebietsBerechnungUrl =appUrl+ '/' +appName+'/GebietLocation'; var infoPortalUrl='http://vag.mapandroute.de/InfoPortal/' var evaUrl='http://www.vgn.de/komfortauskunft/auskunft/?name_origin=${origin}&type_origin=${typeOrigin}&name_destination=${destination}&type_destination=${typeDestination}'; var COUNTRIES = [ { "code": "AFG", "name": "Afghanistan" }, { "code": "EGY", "name": "Ägypten" }, { "code": "ALB", "name": "Albanien" }, { "code": "DZA", "name": "Algerien" }, { "code": "AND", "name": "Andorra" }, { "code": "AGO", "name": "Angola" }, { "code": "AIA", "name": "Anguilla" }, { "code": "ATA", "name": "Antarktis" }, { "code": "ATG", "name": "Antigua und Barbuda" }, { "code": "GNQ", "name": "Äquatorialguinea" }, { "code": "ARG", "name": "Argentinien" }, { "code": "ARM", "name": "Armenien" }, { "code": "ABW", "name": "Aruba" }, { "code": "AZE", "name": "Aserbaidschan" }, { "code": "ETH", "name": "Äthiopien" }, { "code": "AUS", "name": "Australien" }, { "code": "BHS", "name": "Bahamas" }, { "code": "BHR", "name": "Bahrain" }, { "code": "BGD", "name": "Bangladesch" }, { "code": "BRB", "name": "Barbados" }, { "code": "BEL", "name": "Belgien" }, { "code": "BLZ", "name": "Belize" }, { "code": "BEN", "name": "Benin" }, { "code": "BMU", "name": "Bermuda" }, { "code": "BTN", "name": "Bhutan" }, { "code": "BOL", "name": "Bolivien" }, { "code": "BIH", "name": "Bosnien und Herzegowina" }, { "code": "BWA", "name": "Botsuana" }, { "code": "BVT", "name": "Bouvetinsel" }, { "code": "BRA", "name": "Brasilien" }, { "code": "VGB", "name": "Britische Jungferninseln" }, { "code": "IOT", "name": "Britisches Territorium im Indischen Ozean" }, { "code": "BRN", "name": "Brunei" }, { "code": "BGR", "name": "Bulgarien" }, { "code": "BGR_I", "name": "Bulgarien (iso5)" }, { "code": "BFA", "name": "Burkina Faso" }, { "code": "BDI", "name": "Burundi" }, { "code": "CHL", "name": "Chile" }, { "code": "COK", "name": "Cookinseln" }, { "code": "CRI", "name": "Costa Rica" }, { "code": "DNK", "name": "Dänemark" }, { "code": "COD", "name": "Demokratische Republik Kongo" }, { "code": "DEU", "name": "Deutschland" }, { "code": "DMA", "name": "Dominica" }, { "code": "DOM", "name": "Dominikanische Republik" }, { "code": "DJI", "name": "Dschibuti" }, { "code": "ECU", "name": "Ecuador" }, { "code": "CIV", "name": "Elfenbeinküste" }, { "code": "SLV", "name": "El Salvador" }, { "code": "ERI", "name": "Eritrea" }, { "code": "EST", "name": "Estland" }, { "code": "FLK", "name": "Falklandinseln" }, { "code": "FRO", "name": "Färöer" }, { "code": "FJI", "name": "Fidschi" }, { "code": "FIN", "name": "Finnland" }, { "code": "FSM", "name": "Föderierte Staaten von Mikronesien" }, { "code": "FRA", "name": "Frankreich" }, { "code": "ATF", "name": "Französische Süd- und Antarktisgebiete" }, { "code": "GUF", "name": "Französisch-Guayana" }, { "code": "PYF", "name": "Französisch-Polynesien" }, { "code": "GAB", "name": "Gabun" }, { "code": "GMB", "name": "Gambia" }, { "code": "GEO", "name": "Georgien" }, { "code": "GHA", "name": "Ghana" }, { "code": "GIB", "name": "Gibraltar" }, { "code": "GRD", "name": "Grenada" }, { "code": "GRC", "name": "Griechenland" }, { "code": "GRC_I", "name": "Griechenland (iso7)" }, { "code": "GRL", "name": "Grönland" }, { "code": "GLP", "name": "Guadeloupe" }, { "code": "GUM", "name": "Guam" }, { "code": "GTM", "name": "Guatemala" }, { "code": "GGY", "name": "Guernsey" }, { "code": "GIN", "name": "Guinea" }, { "code": "GNB", "name": "Guinea-Bissau" }, { "code": "GUY", "name": "Guyana" }, { "code": "HTI", "name": "Haiti" }, { "code": "HMD", "name": "Heard und McDonaldinseln" }, { "code": "HND", "name": "Honduras" }, { "code": "IND", "name": "Indien" }, { "code": "IDN", "name": "Indonesien" }, { "code": "IMN", "name": "Insel Man" }, { "code": "IRQ", "name": "Irak" }, { "code": "IRN", "name": "Iran" }, { "code": "IRL", "name": "Irland" }, { "code": "ISL", "name": "Island" }, { "code": "ISR", "name": "Israel" }, { "code": "ITA", "name": "Italien" }, { "code": "JAM", "name": "Jamaika" }, { "code": "JPN", "name": "Japan" }, { "code": "YEM", "name": "Jemen" }, { "code": "JEY", "name": "Jersey" }, { "code": "JOR", "name": "Jordanien" }, { "code": "CYM", "name": "Kaimaninseln" }, { "code": "KHM", "name": "Kambodscha" }, { "code": "CMR", "name": "Kamerun" }, { "code": "CAN", "name": "Kanada" }, { "code": "CPV", "name": "Kap Verde" }, { "code": "KAZ", "name": "Kasachstan" }, { "code": "QAT", "name": "Katar" }, { "code": "KEN", "name": "Kenia" }, { "code": "KGZ", "name": "Kirgisistan" }, { "code": "KIR", "name": "Kiribati" }, { "code": "CCK", "name": "Kokosinseln" }, { "code": "COL", "name": "Kolumbien" }, { "code": "COM", "name": "Komoren" }, { "code": "LSO", "name": "Königreich Lesotho" }, { "code": "XKS", "name": "Kosovo" }, { "code": "HRV", "name": "Kroatien" }, { "code": "CUB", "name": "Kuba" }, { "code": "KWT", "name": "Kuwait" }, { "code": "LAO", "name": "Laos" }, { "code": "LVA", "name": "Lettland" }, { "code": "LBN", "name": "Libanon" }, { "code": "LBY", "name": "Libyen" }, { "code": "LIE", "name": "Liechtenstein" }, { "code": "LTU", "name": "Litauen" }, { "code": "LUX", "name": "Luxemburg" }, { "code": "MAC", "name": "Macau" }, { "code": "MDG", "name": "Madagaskar" }, { "code": "MKD_I", "name": "Makedonien (iso5)" }, { "code": "MWI", "name": "Malawi" }, { "code": "MYS", "name": "Malaysia" }, { "code": "MDV", "name": "Malediven" }, { "code": "MLI", "name": "Mali" }, { "code": "MLT", "name": "Malta" }, { "code": "MAR", "name": "Marokko" }, { "code": "MHL", "name": "Marshallinseln" }, { "code": "MTQ", "name": "Martinique" }, { "code": "MRT", "name": "Mauretanien" }, { "code": "MUS", "name": "Mauritius" }, { "code": "MYT", "name": "Mayotte" }, { "code": "MKD", "name": "Mazedonien" }, { "code": "MEX", "name": "Mexiko" }, { "code": "MDA", "name": "Moldawien" }, { "code": "MCO", "name": "Monaco" }, { "code": "MNG", "name": "Mongolei" }, { "code": "MNE", "name": "Montenegro" }, { "code": "MSR", "name": "Montserrat" }, { "code": "MOZ", "name": "Mosambik" }, { "code": "MMR", "name": "Myanmar" }, { "code": "NAM", "name": "Namibia" }, { "code": "NRU", "name": "Nauru" }, { "code": "NPL", "name": "Nepal" }, { "code": "NCL", "name": "Neukaledonien" }, { "code": "NZL", "name": "Neuseeland" }, { "code": "NIC", "name": "Nicaragua" }, { "code": "NLD", "name": "Niederlande" }, { "code": "ANT", "name": "Niederländische Antillen" }, { "code": "NER", "name": "Niger" }, { "code": "NGA", "name": "Nigeria" }, { "code": "NIU", "name": "Niue" }, { "code": "PRK", "name": "Nordkorea" }, { "code": "MNP", "name": "Nördliche Marianen" }, { "code": "NFK", "name": "Norfolkinsel" }, { "code": "NOR", "name": "Norwegen" }, { "code": "OMN", "name": "Oman" }, { "code": "AUT", "name": "Österreich" }, { "code": "TLS", "name": "Osttimor" }, { "code": "PAK", "name": "Pakistan" }, { "code": "PLW", "name": "Palau" }, { "code": "PAN", "name": "Panama" }, { "code": "PNG", "name": "Papua-Neuguinea" }, { "code": "PRY", "name": "Paraguay" }, { "code": "PER", "name": "Peru" }, { "code": "PHL", "name": "Philippinen" }, { "code": "PCN", "name": "Pitcairninseln" }, { "code": "POL", "name": "Polen" }, { "code": "PRT", "name": "Portugal" }, { "code": "PRI", "name": "Puerto Rico" }, { "code": "COG", "name": "Republik Kongo" }, { "code": "LBR", "name": "Republik Liberia" }, { "code": "REU", "name": "Réunion" }, { "code": "RWA", "name": "Ruanda" }, { "code": "ROU", "name": "Rumänien" }, { "code": "RUS", "name": "Russland" }, { "code": "RUS_I", "name": "Russland (iso5)" }, { "code": "SPM", "name": "Saint-Pierre und Miquelon" }, { "code": "SLB", "name": "Salomonen" }, { "code": "ZMB", "name": "Sambia" }, { "code": "WSM", "name": "Samoa" }, { "code": "SMR", "name": "San Marino" }, { "code": "STP", "name": "São Tomé und Príncipe" }, { "code": "SAU", "name": "Saudi-Arabien" }, { "code": "SWE", "name": "Schweden" }, { "code": "CHE", "name": "Schweiz" }, { "code": "SEN", "name": "Senegal" }, { "code": "SRB", "name": "Serbien" }, { "code": "SYC", "name": "Seychellen" }, { "code": "SLE", "name": "Sierra Leone" }, { "code": "ZWE", "name": "Simbabwe" }, { "code": "SGP", "name": "Singapur" }, { "code": "SVK", "name": "Slowakei" }, { "code": "SVN", "name": "Slowenien" }, { "code": "SOM", "name": "Somalia" }, { "code": "ESP", "name": "Spanien" }, { "code": "LKA", "name": "Sri Lanka" }, { "code": "SHN", "name": "St. Helena" }, { "code": "KNA", "name": "St. Kitts und Nevis" }, { "code": "LCA", "name": "St. Lucia" }, { "code": "VCT", "name": "St. Vincent und die Grenadinen" }, { "code": "ZAF", "name": "Südafrika" }, { "code": "SDN", "name": "Sudan" }, { "code": "SGS", "name": "Südgeorgien und die Südlichen Sandwichinseln" }, { "code": "KOR", "name": "Südkorea" }, { "code": "SUR", "name": "Suriname" }, { "code": "SJM", "name": "Svalbard und Jan Mayen" }, { "code": "SWZ", "name": "Swasiland" }, { "code": "SYR", "name": "Syrien" }, { "code": "TJK", "name": "Tadschikistan" }, { "code": "TWN", "name": "Taiwan" }, { "code": "TZA", "name": "Tansania" }, { "code": "THA", "name": "Thailand" }, { "code": "TGO", "name": "Togo" }, { "code": "TKL", "name": "Tokelau" }, { "code": "TON", "name": "Tonga" }, { "code": "TTO", "name": "Trinidad und Tobago" }, { "code": "TCD", "name": "Tschad" }, { "code": "CZE", "name": "Tschechien" }, { "code": "TUN", "name": "Tunesien" }, { "code": "TUR", "name": "Türkei" }, { "code": "TKM", "name": "Turkmenistan" }, { "code": "TCA", "name": "Turks- und Caicosinseln" }, { "code": "TUV", "name": "Tuvalu" }, { "code": "UGA", "name": "Uganda" }, { "code": "UKR", "name": "Ukraine" }, { "code": "UKR_I", "name": "Ukraine (iso5)" }, { "code": "HUN", "name": "Ungarn" }, { "code": "URY", "name": "Uruguay" }, { "code": "UZB", "name": "Usbekistan" }, { "code": "VUT", "name": "Vanuatu" }, { "code": "VAT", "name": "Vatikanstadt" }, { "code": "VEN", "name": "Venezuela" }, { "code": "ARE", "name": "Vereinigte Arabische Emirate" }, { "code": "GBR", "name": "Vereinigtes Königreich" }, { "code": "USA", "name": "Vereinigte Staaten von Amerika" }, { "code": "VNM", "name": "Vietnam" }, { "code": "CHN", "name": "Volksrepublik China" }, { "code": "WLF", "name": "Wallis und Futuna" }, { "code": "CXR", "name": "Weihnachtsinsel" }, { "code": "BLR", "name": "Weißrussland" }, { "code": "BLR_I", "name": "Weißrussland (iso5)" }, { "code": "ESH", "name": "Westsahara" }, { "code": "CAF", "name": "Zentralafrikanische Republik" }, { "code": "CYP", "name": "Zypern" } ]; //mh-work10/176.9.238.131 var map = null; var coordCenter = new IWCoordinate( 11.077841,49.452643, IWCoordinate.WGS84).toMercator(); // controls var measuringTool = null; var routingMenu = null; var routingControl= null; var menuControl = null; var scalarControl = null; var addressSearchControlPane = null; var sliderControl = null; var navigationControl = null; var infoBalloon = null; var marInfoBalloon = null; var infoCoordinateBallon =null; var currentSize = null; var marker = null; var trafficEventLayer=null; var trafficFlowLayer=null; var routelayerShapename = null; var routelayer= null; var mapTypeBirdsview=null; var mapTypeHybridBirdsview=null; var mapTypeOsm=null; var mapTypeOsmDeluxe = null; var mapTypeOsmPlusDeluxe = null; var mapTypeOsmTiles=null; var mapTypeOsmTilesDe=null; var mapTypeOsmTilesBaB=null; var mapTypeOsmTilesIA=null; var mapTypeRoadmap = null; var mapTypeRoadmapHere= null; var mapTypeHereDeluxe = null; var mapTypeHybridHere= null; var mapTypeAirHere= null; var mapTypeOSMPlusTAO= null; var typeSwitchZoom=null; var isControlsLoad= false; var divMap=null; var popupWindow = null; var oldZoom =0; var routingMagnifierFactory = null; var layersArray = new Array(); var layersNameSymbolArray = new Array(); var layersNameFunctionArray = new Object(); var layersVisibCookie = true; var initSplitterSize = 0; var currentSplitterSize=337; var switchPaneCss = null; var menu; var pushpin; var pushpinCoordinate; var tabs =new Object(); var buchLayer=null; var gebietLayer=null; var showCoordEnabled=false; var coordMenu=null; var mapMinWidth=60; var mapMinHeight=60; var layerIndexOfRoutingPoints =100; var ugcMarker = null; var ugcMenu= null; var ugcCoordinateMenu = null; var toolTipX=null; var toolTipY=null; var publicTransportMap; var umkreisSucheRadius = 0; var VAGGroup =null; var collapsedNodes=['Divers','Filialisten','Länder und Regionen','Nahverkehr','Deutsche Bahn','Mobilität','Alltag']; var parkplatzSensorenLayer=20; addNewScript('http://code.jquery.com/ui/1.10.2/jquery-ui.js'); addNewStyle("http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css"); addNewStyle(appUrl + '/' + appName +"/css/jquery.ui.timepicker.css"); addNewScript('//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js'); addNewStyle('//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css'); addNewStyle(infoPortalUrl + "css/publictransport.css"); addNewScript(appUrl + '/' + appName + "/js/jquery.ui.timepicker.js"); addNewScript(infoPortalUrl +"/js/lib.js?v=2.0.0"); addNewMeta("format-detection","telephone=no"); $().ready(function() { var w = window.innerWidth, h = window.innerHeight; if(w < mapMinWidth) w = mapMinWidth; if(h < mapMinHeight) h = mapMinHeight; $("#divMap").css("width",w-12); $("#divMap").css("height",h); $("#divMap").css("background-color","#dddddd"); $("#splitter").splitter( { type : "v", outline : true, minLeft : 0, sizeLeft : initSplitterSize, stopSize : 337, minRight : 100, contentReload:true, anchorToWindow: true, accessKey : 'I' }); $("#splitter").css("visibility","visible"); var h='window.addEventListener("load", function(){window.cookieconsent.initialise({ "palette": { "popup": { "background": "#252e39", "text": "#ffffff" },' +' "button": { "background": "#14a7d0", "text": "#ffffff" }}, "theme": "classic",' +'"content": { "message": "Durch die weitere Nutzung dieser Webseite erklären Sie sich mit der Verwendung von Cookies einverstanden. ",' +' "dismiss": "Einverstanden",' +' "link": "Mehr erfahren", "href": "http://www.mapandroute.de/index.php/datenschutz"' +'}' +'})});'; $("head").append($("", {html: h})); //createLoginForm($('#tabPanesLogin')[0]); $( "#tabLogin" ).remove(); $( "#tabPanesLogin" ).remove(); $(function() { // setup ul.tabs to work as tabs for each div directly under div.panes $("ul.tabs").tabs("div.panes > div"); $.each($("li a","ul.tabs"), function(index, value) { tabs[value.id]=index; }); }); $('#progress').ajaxbuttonindicator(); $('.formToolTip').ugcFormTooltip(); var image = trim($("#logoCombo option:first").text()); $('#logoComboImage').attr("src","http://maps.mapandroute.de/MapCms/images/poi/"+image); $('#logoCombo').change(function(){ $(this).find('option:selected').each(function () { $('#logoComboImage').attr("src","http://maps.mapandroute.de/MapCms/images/poi/"+trim($(this).text())); }); }); }); function addNewStyle(url){ var newstyle=document.createElement('link'); newstyle.rel="stylesheet"; newstyle.type="text/css"; newstyle.href=url; document.getElementsByTagName("head")[0].appendChild(newstyle); } function addNewScript(url){ var newscript = document.createElement('script'); newscript.src=url; document.getElementsByTagName("head")[0].appendChild(newscript); } function addNewMeta(name,content){ var meta = document.createElement('meta'); meta.name=name; meta.content=content; document.getElementsByTagName("head")[0].appendChild(meta); } function initializeMap() { IWAccessFilter.setCNR(9000); IWAccessFilter.setPNR(9004); divMap = document.getElementById('divMap'); map = new SearchableMap(divMap); var w = $("#rightPane").outerWidth(true); var h = $('#rightPane').outerHeight(true); map.getOptions().setSize(new IWSize(w,h)); var optionsMap = { showTooltips: false, showPopups: false }; map.setSearchOptions(optionsMap); var propertiesVAG = { baseUrl: infoPortalUrl, showBusses: true, showTrams: true, showSubways: true, efa: evaUrl, maxStationsInSchedule: 5, rendering: { lineWidth: { subway: 2, tram: 1 }, showStationElevators: false, showStationStops: false } }; try{ var AllePoisGroup = new IWLayerGroup('Alle Pois'); layer = makeLayer('Polizei', 'MAPCMS56', 'Polizei_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Polizei_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); AllePoisGroup.addLayer(layer); layer = makeLayer('Geldautomat', 'MAPCMS38', 'Geldautomat.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Geldautomat_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); AllePoisGroup.addLayer(layer); layer = makeLayer('Krankenhaus', 'MAPCMS39', 'Krankenhaus_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Krankenhaus_1_0',new IWRange(parseInt('10'), parseInt('20'))) ); AllePoisGroup.addLayer(layer); layer = makeLayer('Apotheke', 'MAPCMS52', 'Apotheke.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Apotheke_1_0',new IWRange(parseInt('12'), parseInt('20'))) ); AllePoisGroup.addLayer(layer); EssenGroup = new IWLayerGroup('Essen'); layer = makeLayer('Restaurant', 'MAPCMS46', 'speisekarte-marker.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DynamischePois_Restaurant_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); EssenGroup.addLayer(layer); layer = makeLayer('Take Away', 'MAPCMS22', 'POI-takeaway_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DynamischePois_TakeAway_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); EssenGroup.addLayer(layer); layer = makeLayer('Lieferung', 'MAPCMS45', 'POI-lieferung_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DynamischePois_Lieferung_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); EssenGroup.addLayer(layer); layer = makeLayer('Take Away und Lieferung', 'MAPCMS42', 'POI-abholung_lieferung.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DynamischePois_TakeAwayundLieferung_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); EssenGroup.addLayer(layer); AllePoisGroup.addLayer(EssenGroup); EinkaufenGrundbedarfGroup = new IWLayerGroup('Einkaufen (Grundbedarf)'); layer = makeLayer('Supermarkt', 'MAPCMS5', 'VAG_Supermarkt_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Supermarkt_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Hofladen', 'MAPCMS1', 'POI-hofladen.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Hofladen_1_0',new IWRange(parseInt('9'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Getränkemarkt', 'MAPCMS37', 'Getraenkemarkt_covid.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Getrnkemarkt_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Bäcker', 'MAPCMS3', 'VAG_Baecker.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Bcker_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Fleischer', 'MAPCMS4', 'VAG_Metzger.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Fleischer_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Tierbedarf', 'MAPCMS2', 'Tierbedarf_covid.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Tierbedarf_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); layer = makeLayer('Wochenmarkt', 'MAPCMS0', 'POI-wochenmarkt.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_EinkaufenGrundbedarf_Wochenmarkt_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); EinkaufenGrundbedarfGroup.addLayer(layer); AllePoisGroup.addLayer(EinkaufenGrundbedarfGroup); GesundheitPflegeGroup = new IWLayerGroup('Gesundheit/Pflege'); layer = makeLayer('Drogerie', 'MAPCMS6', 'Drogerie_covid.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_GesundheitPflege_Drogerie_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); GesundheitPflegeGroup.addLayer(layer); AllePoisGroup.addLayer(GesundheitPflegeGroup); MobilitätGroup = new IWLayerGroup('Mobilität'); trafficEventLayer = makeLayer('Verkehrsinfo (Inrix)', 'TRAFFIC_EVENTS', 'tmc', 'Traffic_Event_Line', 'null'); trafficEventLayer.setVisible(false); trafficEventLayer.setVisible(false); trafficEventLayer.addShape(new IWShape('traffic_events_inrix',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(trafficEventLayer); layer = makeLayer('Grenzübergang', 'MAPCMS50', 'Grenze.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Grenzbergang_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('Tankstelle', 'MAPCMS35', 'Tankstelle_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DynamischePois_Tankstelle_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('E-Tankstellen', 'MAPCMS10', 'TankstelleStrom.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_E-Tankstellen_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('Parkplatz', 'MAPCMS39', 'Parkplatz.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Parkplatz_1_0',new IWRange(parseInt('10'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('Parkplatzinfo (LKW, Webcam)', 'MAPCMS24', 'LKW-Parkplatz-webcam.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_ParkplatzinfoLKWWebcam_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('Parkplatzinfo (LKW)', 'MAPCMS18', 'Parken-LKW.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_ParkplatzinfoLKW_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); layer = makeLayer('Fähre', 'MAPCMS32', 'Faehre_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Fhre_1_0',new IWRange(parseInt('6'), parseInt('20'))) ); MobilitätGroup.addLayer(layer); NahverkehrGroup = new IWLayerGroup('Nahverkehr'); VAGGroup = new IWLayerGroup('VAG'); layer = makeLayer('Strassenbahn (VAG)', '', '', '', 'toogleTramsVisibility'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('aa',new IWRange(parseInt('12'), parseInt('20'))) ); VAGGroup.addLayer(layer); layer = makeLayer('U - Bahn (VAG)', '', '', '', 'toogleSubwaysVisibility'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('aa',new IWRange(parseInt('12'), parseInt('20'))) ); VAGGroup.addLayer(layer); layer = makeLayer('S - Bahn (VAG)', '', '', '', 'toogleSBahnVisibility'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('aa',new IWRange(parseInt('12'), parseInt('20'))) ); VAGGroup.addLayer(layer); NahverkehrGroup.addLayer(VAGGroup); MobilitätGroup.addLayer(NahverkehrGroup); DeutscheBahnGroup = new IWLayerGroup('Deutsche Bahn'); layer = makeLayer('Alternativer Verkehr (DB)', 'MAPCMS55', 'AlternativerVerkehrDB.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DB-Demo_AlternativerVerkehrDB_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('Bedarfsverkehr (DB)', 'MAPCMS51', 'BedarfsverkehrDB.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_BedarfsverkehrDB_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('U-Bahn (DB)', 'MAPCMS49', 'DB-Demo_ubahn.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_U-BahnDB_1_0',new IWRange(parseInt('12'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('Straßenbahn (DB)', 'MAPCMS43', 'DB-Demo_tram.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_StraenbahnDB_1_0',new IWRange(parseInt('12'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('S-Bahn (DB)', 'MAPCMS48', 'DB-Demo_sbahn.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_S-BahnDB_1_0',new IWRange(parseInt('12'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('Bus (DB)', 'MAPCMS44', 'DB-Demo_bus.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_BusDB_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('Nahverkehr (DB)', 'MAPCMS36', 'DB-Demo_nv.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DB-Demo_NahverkehrDB_1_0',new IWRange(parseInt('9'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('IC (DB)', 'MAPCMS14', 'DB-Demo_ic.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DB-Demo_ICDB_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); layer = makeLayer('ICE (DB)', 'MAPCMS30', 'DB-Demo_ice.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/DB-Demo_ICEDB_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DeutscheBahnGroup.addLayer(layer); MobilitätGroup.addLayer(DeutscheBahnGroup); AllePoisGroup.addLayer(MobilitätGroup); AlltagGroup = new IWLayerGroup('Alltag'); layer = makeLayer('Postleitzahlen', 'MAPCMS9', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('Postleitzahl_5',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Vorwahlen', 'MAPCMS9', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('vorwahl',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Friedhof', 'MAPCMS54', 'Friedhof_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Friedhof_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Kirche', 'MAPCMS40', 'Kirche_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Kirche_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Gemeindezentrum', 'MAPCMS46', 'Gemeindezentrum.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Gemeindezentrum_1_0',new IWRange(parseInt('15'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Botschaft', 'MAPCMS28', 'Botschaft_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Botschaft_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Universität', 'MAPCMS34', 'Universitaet_Hochschule.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Universitt_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Hochschule', 'MAPCMS29', 'Universitaet_Hochschule.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Hochschule_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Schule', 'MAPCMS21', 'Schule_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Schule_1_0',new IWRange(parseInt('10'), parseInt('20'))) ); AlltagGroup.addLayer(layer); layer = makeLayer('Bibliothek', 'MAPCMS12', 'Bibliothek.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Bibliothek_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); AlltagGroup.addLayer(layer); AllePoisGroup.addLayer(AlltagGroup); KulturundFreizeitGroup = new IWLayerGroup('Kultur und Freizeit'); layer = makeLayer('Nürnberger Christkindlesmarkt', 'BUDEN', 'Weihnachtsmarkt', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('buden',new IWRange(parseInt('17'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Kino', 'MAPCMS9', 'Kino2.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Kino_1_0',new IWRange(parseInt('14'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Freizeitpark', 'MAPCMS47', 'Freizeitpark_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Freizeitpark_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Touristenattraktion', 'MAPCMS16', 'Touristenattraktion_2.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Touristenattraktion_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Ruine', 'MAPCMS20', 'Ruine.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Ruine_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Burg', 'MAPCMS31', 'Burg_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Burg_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Schloss', 'MAPCMS59', 'Schloss_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Schloss_1_0',new IWRange(parseInt('7'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Museum', 'MAPCMS16', 'Museum_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Museum_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Monument', 'MAPCMS58', 'Monument.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Monument_1_0',new IWRange(parseInt('10'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Denkmal', 'MAPCMS20', 'Denkmal_1.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Denkmal_1_0',new IWRange(parseInt('10'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); layer = makeLayer('Touristeninformation', 'MAPCMS14', 'Touristeninformation_0.png', '', 'null'); layer.setVisible(true); layer.setVisible(true); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Touristeninformation_1_0',new IWRange(parseInt('9'), parseInt('20'))) ); KulturundFreizeitGroup.addLayer(layer); AllePoisGroup.addLayer(KulturundFreizeitGroup); LänderundRegionenGroup = new IWLayerGroup('Länder und Regionen'); layer = makeLayer('Gemeinden', 'REGIONEN', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('gemeinde',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Kreise', 'NATIONALPARKS', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('kreis',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Bundesländer', 'LANDSCHAFTEN', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('bundesland',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Land', 'LAND', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('land',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Regionen', 'KREIS', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('reiseregionen',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Nationalparks', 'INSELN', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('reiseregionen',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Landschaften', 'GEMEINDE', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('reiseregionen',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); layer = makeLayer('Inseln', 'BUNDESLAND', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('reiseregionen',new IWRange(parseInt('0'), parseInt('20'))) ); LänderundRegionenGroup.addLayer(layer); AllePoisGroup.addLayer(LänderundRegionenGroup); DiversGroup = new IWLayerGroup('Divers'); layer = makeLayer('Baustelle', 'MAPCMS23', 'baustelle.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Baustelle_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Baustelle (Ba-Wue)', 'MAPCMS57', 'baustelle.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_BaustelleBa-Wue_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Ferienpark', 'MAPCMS53', 'Ferienpark_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_Ferienpark_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Offerista', 'MAPCMS11', 'Angebot_Icon_roter_rand.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Offerista_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Parkanlage', 'MAPCMS7', 'Parkanlage_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Parkanlage_1_0',new IWRange(parseInt('16'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Rathaus', 'MAPCMS13', 'Rathaus_0.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Rathaus_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Speisekarte', 'MAPCMS17', 'speisekarte-marker.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_DynamischePois_Speisekarte_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Sportplatz', 'MAPCMS8', 'Sportanlage.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Sportplatz_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Welterbe', 'MAPCMS19', 'WeltnaturKulturErbe.png', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('maps.mapandroute.de/live/StandardPois_Welterbe_1_0',new IWRange(parseInt('7'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Valtus-Gebiet', 'VALTUS', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('coverage',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Hausnummern', 'POIGEBIET', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('Nexiga_Hausnummern',new IWRange(parseInt('16'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Nutzergebiet (Gebietsberechnung)', 'MAPCMS9', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('POIGEBIET',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); layer = makeLayer('Map and Route', 'MAPCMS27', 'MaR.png', '', 'null'); layer.setVisible(true); layer.setVisible(true); layer.addShape(new IWShape('maps.mapandroute.de/live/MapAndRoute_StandardPois_MapandRoute_1_0',new IWRange(parseInt('0'), parseInt('20'))) ); DiversGroup.addLayer(layer); TBGroup = new IWLayerGroup('TB'); layer = makeLayer('Verlag', 'TBVERLAG', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('tb_verlag',new IWRange(parseInt('0'), parseInt('20'))) ); TBGroup.addLayer(layer); layer = makeLayer('Buchabschnitt', 'TBBUCH', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('tb_verlag_buch_buchabschnitt',new IWRange(parseInt('0'), parseInt('20'))) ); TBGroup.addLayer(layer); layer = makeLayer('Buch', 'TBABSCHNTT', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('tb_verlag_buch',new IWRange(parseInt('0'), parseInt('20'))) ); TBGroup.addLayer(layer); DiversGroup.addLayer(TBGroup); GSGroup = new IWLayerGroup('GS'); layer = makeLayer('Verlag', 'TBVERLAG', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('gs_verlag',new IWRange(parseInt('0'), parseInt('20'))) ); GSGroup.addLayer(layer); layer = makeLayer('Buchabschnitt', 'TBBUCH', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('gs_verlag_buch_buchabschnitt',new IWRange(parseInt('0'), parseInt('20'))) ); GSGroup.addLayer(layer); layer = makeLayer('Buch', 'TBABSCHNTT', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('gs_verlag_buch',new IWRange(parseInt('0'), parseInt('20'))) ); GSGroup.addLayer(layer); DiversGroup.addLayer(GSGroup); OETBGroup = new IWLayerGroup('OETB'); layer = makeLayer('Verlag', 'TBVERLAG', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('oetb_verlag',new IWRange(parseInt('0'), parseInt('20'))) ); OETBGroup.addLayer(layer); layer = makeLayer('Buchabschnitt', 'TBBUCH', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('oetb_verlag_buch_buchabschnitt',new IWRange(parseInt('0'), parseInt('20'))) ); OETBGroup.addLayer(layer); layer = makeLayer('Buch', 'TBABSCHNTT', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('oetb_verlag_buch',new IWRange(parseInt('0'), parseInt('20'))) ); OETBGroup.addLayer(layer); DiversGroup.addLayer(OETBGroup); OberbezirkeGroup = new IWLayerGroup('Oberbezirke'); layer = makeLayer('Oberbezirke-OK1', 'OberbezirkeT1', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeOK1',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-O1', 'OberbezirkeT', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeO1',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-G1', 'OberbezirkeOK1', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeG1',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-T1', 'OberbezirkeOK', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeT1',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-OK', 'OberbezirkeO1', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeOK',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-O', 'OberbezirkeO', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeO',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-G', 'OberbezirkeG1', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeG',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-T', 'OberbezirkeG', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('OberbezirkeT',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke-1', 'Oberbezirke1', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('Oberbezirke',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); layer = makeLayer('Oberbezirke', 'GEBIETE_OBERBEZIRKE', '', '', 'null'); layer.setVisible(false); layer.setVisible(false); layer.addShape(new IWShape('Oberbezirke',new IWRange(parseInt('0'), parseInt('20'))) ); OberbezirkeGroup.addLayer(layer); DiversGroup.addLayer(OberbezirkeGroup); AllePoisGroup.addLayer(DiversGroup); map.addLayer(AllePoisGroup); var layerCounter =0; } catch(err){} // Trigger module loading IWEventManager.addListener(IWLoader, 'onmoduleload', function(event) { if (event.name == 'touch') { touchLoaded(); } else if (event.name == 'controls') { controlsLoaded(); } else if (event.name == 'poi') { //poiLoaded(); } else if (event.name == 'geocoding') { geocodingLoaded(); } else if (event.name == 'routing') { routingLoaded(); } else if (event.name == 'graphics') { graphicsLoaded(); } }); IWLoader.loadModules(['geocoding','touch','poi','graphics','controls','routing']); IWEventManager.addListener(map, 'onresize', function() { resizeInfoBalloons(map) }); var touchLoaded = function () { if (IWTouchUtils.isTouchScreenAvailable()) { map.setRemovalStrategy(new IWTilesRemovalStrategyHarsh()); IWTouchUtils.addTouchGestures(map); IWEventManager.addListener(map, 'ontap', function(event) { var overays = map.getWindowOverlayManager().getAllWindowOverlays(); while (overays.length > 0) { map.removeWindowOverlay(overays[0]); } map.removeTooltip(); }); } }; var controlsLoaded = function () {}; //var poiLoaded = function () { if(trafficEventLayer != null){ IWEventManager.addListener(trafficEventLayer, 'onstatechange', function(e){ updateCopyright(); if (menuControl){ var trafficItem = menuControl.getItem("traffic"); if(trafficItem.enabled == true){ if(trafficEventLayer!=null && trafficEventLayer.isVisible()){ trafficItem.getNode().className = trafficItem.classClickedImage; trafficItem.clicked = true; } else{ trafficItem.getNode().className = trafficItem.classOutImage; trafficItem.clicked = false; } } } }); } if (layersVisibCookie == true) { $.each(layersArray, function(index, value) { var state = $.cookie(value.getLayerName()); if(state ){ if( state =='true'){ value.setVisible(true); } else{ value.setVisible(false); } } }); } if (trafficEventLayer) trafficEventLayer.triggerOnStateChange(); map.getLayerInfoManager().setCaptureSize(new IWSize(5, 5)); $('body').bind('ugcChange',function(e,value){ if(value == 2 || value=='2'){ var coord = ugcMarker.getCoordinate(); createPoiSend(coord.getX(),coord.getY(),false); } if(value == 1 || value=='1'){ var coord = ugcMarker.getCoordinate(); form = document.forms['poiSaveForm']; form.elements["x"].value =coord.toWGS84().getX().toFixed(8); form.elements["y"].value =coord.toWGS84().getY().toFixed(8); } }); IWEventManager.addListener(map.getLayerInfoManager(), 'ondatareceive', function(e){ if(e.records==0){ map.removeTooltip(); toolTipX=null; toolTipY=null; } if (e.requestedEvent == 'onclick'){ var chargeStagionIds = new Array(); var essenIds = new Array(); var content = document.createElement('div'); content.id='poiContent'; content.style.position = 'relative'; content.style.display='inline'; var firstContent = true; var infoBallonVisible = true; var moreTargets = false; var targetsCount =0; var oepnvRecord=null; for (layer in e.json){ var records = e.json[layer].recordset.record; for (var i=0; i < records.length; i++){ if(records && records[i] && records[i].OVL_TYP =="Aktuelle Angebote"){ var c = formatAngebotContent(records[i],firstContent,moreTargets,e.mouseCoordinate); content.appendChild( c); infoBalloon = createOffersInfoBalloon(e.mouseCoordinate, content,moreTargets); map.addWindowOverlay(infoBalloon); return; } targetsCount++; if(targetsCount >1){ moreTargets=true; break; } } } for (layer in e.json){ if(layer =='VAG_Stations'){ continue; } var records = e.json[layer].recordset.record; for (var i=0; i < records.length; i++){ if (records && records[i] && records[i].SHAPENAME) { infoBallonVisible = false; if(routelayerShapename && routelayerShapename == 'routevisualizer/' + records[i].SHAPENAME){ routelayer.removeShape(routelayerShapename); routelayerShapename =""; } else{ if(routelayerShapename){ routelayer.removeShape(routelayerShapename); } routelayerShapename = 'routevisualizer/' + records[0].SHAPENAME; routelayer.addShape(new IWShape(routelayerShapename, new IWRange(0, 16))); } map.redraw(); } else if (records[i].OVL_TYP && (records[i].OVL_TYP=='Geldautomat' || records[i].OVL_TYP=='Apotheke' || records[i].OVL_TYP=='Kino' || records[i].OVL_TYP=='Event'|| records[i].OVL_TYP=='Radar'|| records[i].OVL_TYP=='Museum'|| records[i].OVL_TYP=='Wlan')){ var c = formatZusatzContent(records[i],firstContent,moreTargets,e.mouseCoordinate); content.appendChild( c); if(firstContent== true){ firstContent= false; } } else if (records[i].OVL_TYP && (records[i].OVL_TYP=='Baustellen' || records[i].OVL_TYP=='Baustellen (Ba-Wue) ' || records[i].OVL_TYP=='Baustelle' || records[i].OVL_TYP=='Baustelle (Ba-Wue)')){ var c = formatBaustellenContent(records[i],firstContent,moreTargets,e.mouseCoordinate); content.appendChild( c); if(firstContent== true){ firstContent= false; } } else if (records[i].Name ||records[i].NAME ){ // Formats the POIs content var c =null; if(records[i].OVL_TYP && records[i].OVL_TYP=='Nahverkehr'){ var c = formatBVGContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP=='Restaurant'){ if(essenIds.includes(records[i].OVL_ID)){ continue; } essenIds.push(records[i].result.poi[0].id); var c = formatRestaurantContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP=='Tour'){ var c = formatTourContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && (records[i].OVL_TYP=='Typ2' || records[i].OVL_TYP=='Tesla' || records[i].OVL_TYP=='Sonstiges' || records[i].OVL_TYP=='Haushaltsstecker' || records[i].OVL_TYP=='CEE 400V - 16A' || records[i].OVL_TYP=='Chademo' || records[i].OVL_TYP=='Combined Charging System (CSS)' || records[i].OVL_TYP=='CEE 230V - 16A' || records[i].OVL_TYP=='CEE 400V - 32A')){ if(chargeStagionIds.includes(records[i].result.poi[0].id)){ continue; } chargeStagionIds.push(records[i].result.poi[0].id); var c = formatLadestationenContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP=='E-Tankstellen'){ var c = formatETankstellenContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP=='Deutsche Bahn'){ var c = formatDBContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP.match("^POD")=='POD'){ var c = formatPODContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && records[i].OVL_TYP=='RMV'){ var c = formatRMVContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].result.poi[0].dataId=="parkingLots"){ var c = formatParkplatzContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].result.poi[0].dataId=="truckParkingLots"){ var c = formatLkwParkplatzContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].OVL_TYP=='Offerista'){ var c = formatOfferistaContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].OVL_TYP=='Speisekarte'){ var c = formatSpeisekarteContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].result.poi[0].dataId=="filialisten"){ var c = formatFilialistenContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else if(records[i].OVL_TYP && (records[i].OVL_TYP=='Bus'|| records[i].OVL_TYP=='Strassenbahn'|| records[i].OVL_TYP=='U - Bahn'|| records[i].OVL_TYP=='Verkehrsnetz'|| records[i].OVL_TYP=='DVB' || records[i].OVL_GRP=="DB-Demo"|| records[i].OVL_TYP=='Haltestellen-Here'|| records[i].OVL_TYP=='Haltestellen-Here (Österreich)')){ //formatVAGContent(records[i],firstContent,moreTargets,e.mouseCoordinate,content); if(oepnvRecord==null){ oepnvRecord= records[i]; } continue; } else if(records[i].result && records[i].result.poi && records[i].result.poi.length >0 && records[i].result.poi[0].dataId=="petrolStations"){ var c = formatTankstlleContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } else{ if(records[i].OVL_TYP=="Take Away" ||records[i].OVL_TYP=="Lieferung" ||records[i].OVL_TYP=="Take Away und Lieferung" ){ if(essenIds.includes(records[i].OVL_ID)){ continue; } essenIds.push(records[i].OVL_ID); } var c = formatContent(records[i],firstContent,moreTargets,e.mouseCoordinate); } content.appendChild(c); if(firstContent== true){ firstContent= false; } } else if(records[i].NAMEBUDE && records[i].NAMEBUDE.length >0){ var c = formatWeihnachtsBude(records[i],firstContent,moreTargets); content.appendChild(c); if(firstContent== true){ firstContent= false; } } else if(records[i].ID){ var c = formatTMCPro(records[i],firstContent,moreTargets); content.appendChild(c); if(firstContent== true){ firstContent= false; } } } } if(oepnvRecord!=null){ formatVAGContent(oepnvRecord,true,moreTargets,e.mouseCoordinate,content); return; } if (e.records > 0 && infoBallonVisible && content.innerHTML!='') { //map.openInfoBalloon(e.mouseCoordinate, content); infoBalloon = createInfoBalloon(e.mouseCoordinate, content,moreTargets); map.addWindowOverlay(infoBalloon); } } else if (e.requestedEvent == 'onmousestop'){ var content = ""; for (layer in e.json){ var title =""; var records = e.json[layer].recordset.record; var content = ""; if( records[0].result && records[0].result.poi && records[0].result.poi.length >0 && records[0].result.poi[0].dataId=="petrolStations"){ var tankstelle = records[0].result.poi[0]; var name = tankstelle.name==null?"":tankstelle.name; var timestamp=tankstelle.timestamp==null?"":tankstelle.timestamp; var preisen = tankstelle.spritData.spritPreis; if(preisen.length >0){ content+="
Spritpreise:
"; content+="Stand: "+timestamp+"
"; for(var i=0;i: "+preis.preis+" \u20AC
"; } } if(content.length >0){ Tip(content ,FOLLOWMOUSE, false, DURATION, 10000, DELAY, 100,CLICKCLOSE,true,TITLE,name,BGCOLOR,'white'); } else{ Tip(name ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else if(records[0].result && records[0].result.poi && records[0].result.poi.length >0 && records[0].result.poi[0].dataId=="parkingLots"){ content = ""; var parkplatz = records[0].result.poi[0]; title = parkplatz.name; if(parkplatz){ content += getContentForParkingPlace(parkplatz,"PKW"); } if(content.length >0){ Tip(content ,FOLLOWMOUSE, false, DURATION, 50000, DELAY, 100,CLICKCLOSE,true,TITLE,title,BGCOLOR,'white'); } else{ Tip(title ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else if(records[0].result && records[0].result.poi && records[0].result.poi.length >0 && records[0].result.poi[0].dataId=="truckParkingLots"){ content = ""; var parkplatz = records[0].result.poi[0]; title = parkplatz.name; var occupancy = parkplatz.parkingOccupancy; if(occupancy !=null){ var stand = occupancy.statusTimestamp; var vacantSpaces = occupancy.numberVacantSpaces; var numberSpaces = occupancy.numberSpaces; content = "Parkplätze frei: "+vacantSpaces+" / gesamt: "+numberSpaces +" Aktualisierung: "+stand; Tip(content ,FOLLOWMOUSE, false, DURATION, 50000, DELAY, 100,CLICKCLOSE,true,TITLE,title,BGCOLOR,'white'); } else{ Tip(title ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else if(records && records[0] && records[0].NAME){ content = records[0].NAME; var ovlType = records[0].OVL_TYP; if(records[0].desc && records[0].desc.length >0 && records[0].OVL_TYP.match("^POD")!='POD' && records[0].OVL_TYP!='Deutsche Bahn'){ title=records[0].desc; if(content.length >0 && title.length >0){ Tip(title ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,TITLE,content,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } else if(content.length >0){ Tip(content ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else if(records[0].OVL_TYP && (records[0].OVL_TYP=='Bus'|| records[0].OVL_TYP=='Strassenbahn'|| records[0].OVL_TYP=='U - Bahn'|| records[0].OVL_TYP=='Verkehrsnetz'|| records[0].OVL_TYP=='DVB')){ formatVAGtip(map,e.mouseCoordinate,records[0]); return; } else if(content.length >0){ Tip(content ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else if(records && records[0] && records[0].POINAME){ content = ""; title = records[0].POINAME; if(title.length >0){ Tip(title ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); } } else { for (var f=0; f < records.length; f++){ var rec = records[f]; if(rec.NAMEBUDE.length>0){ title = rec.NAMEBUDE; Tip(title ,FOLLOWMOUSE, false, DURATION, 5000, DELAY, 100,CLICKCLOSE,true,BGCOLOR,'#4A8CC6',FONTCOLOR,'white',BORDERCOLOR,'#623A6F'); break; } } } } } }); var geocodingLoaded = function () {}; var graphicsLoaded = function () { publicTransportMap = new PublicTransportMap(map, propertiesVAG); var layerVag = map.getLayerByName('Busse'); var shape = layerVag.getShapes()[0]; var range = new IWRange(12,20); shape.setRange(range); layerVag.removeShape(shape.getShapeName()); layerVag.addShape(shape); layerVag.setLayerTitle('Bus (VAG)') ; layerVag.setVisible(false); map.removeLayer(layerVag); VAGGroup.addLayer(layerVag); layersArray.push(layerVag); publicTransportMap.setTramsVisibility(false); publicTransportMap.setSubwaysVisibility(false); publicTransportMap.setBussesVisibility(false); publicTransportMap.setSBahnVisibility(false); layersNameFunctionArray['Bus (VAG)']='toogleBussesVisibility'; }; var routingLoaded = function () { routingMagnifierFactory = new IWRoutingMagnifierFactory(map, "roadmap", "hybrid"); var routingManagerOptions = { international: true }; RoutingManager.initialize(map, routingManagerOptions); RoutingMarkerManager.initialize(map, 2); var divPrint = $('').appendTo($('#leftPane')).insertBefore($('#panelContent')); divPrint.attr({"class": 'drucken',unselectable: "on","id": "dPrint"}) .css({"float":"right","top":"10px",position :"relative",display:"none"}) .bind("click", function(event){map.print(routeDescription, '', {interactive:true});}); var o = $(""). appendTo($('#leftPane')).insertBefore($('#panelContent')); var routingInputOptions = { structuredInput: false, suggester: false }; var routingControl = new RouteInputControl(map, panelContent,routingInputOptions); IWEventManager.addListener(routingControl, 'ondescription', function(event){ $('#dPrint').css("display","block"); var result = eval(event.script); $('.routeDescription .entry').unbind("click"); $('.routeDescription .entry').bind("click",function(event){ var coord = new IWCoordinate(result[this.id + 'X'], result[this.id + 'Y']); var content = routingMagnifierFactory.createRoutingMagnifierContent(coord, $('#' + this.id + ' .text').text()); infoBalloon = createInfoBalloon(coord, content,false); map.addWindowOverlay(infoBalloon); }); $('.routeDescription .entry').each(function (index) { var mark = addRoutingPoint((index+1), new IWCoordinate(result[this.id + 'X'], result[this.id + 'Y'])); mark.id = 'entry' + index; mark.onclick = function() { var c = mark.getCoordinate() ; var content = routingMagnifierFactory.createRoutingMagnifierContent(c, $('#' + mark.id + ' .text').text()); infoBalloon = createInfoBalloon( c, content,false); map.addWindowOverlay(infoBalloon); }; }); routeDescription = $('#viewDescription').html(); }); IWEventManager.addListener(RoutingManager, 'onroute', function(event){ map.removeInfoBalloon(); map.getOverlayManager().removeLayer(layerIndexOfRoutingPoints); if (map._mapType.getName() != 'roadmap' && map._mapType.getName() != 'here-deluxe' && map._mapType.getName() != 'roadmapHere' ) { var newmaptype = map._mapType.getName().contains('deluxe') ? mapTypeHereDeluxe : mapTypeRoadmap; if (newmaptype.getName() == 'here-deluxe') setImageClicked(menuControl.getItem("hereDeluxe")); if (newmaptype.getName() == 'roadmap') setImageClicked(menuControl.getItem("prem")); map.setCenter(map.getCenter(), map.Zoom, newmaptype); } $("ul.tabs").data("tabs").click(tabs['tabRoute']); $('#splitter').trigger("resize",[currentSplitterSize]); }); IWEventManager.addListener(RoutingManager, 'onrouteclear', function(event){ $('#dPrint').css("display","none"); routeDescription = null; map.removeInfoBalloon(); map.getOverlayManager().removeLayer(layerIndexOfRoutingPoints); }); }; IWEventManager.addListener(map, 'onclick', function(event){ map.removeTooltip(); }); divMap.mapReference = map; IWMapType.prototype.currentZoom=0; var options = map.getOptions(); options.setBorderTiles(0); options.setLanguage('de'); options.setMaxWheelStep(2); options.setRightMouseAction(IWMapOptions.CONTROL_ZOOM); options.setLeftMouseAction(IWMapOptions.CONTROL_MOVE); options.setDoubleClickAction(IWMapOptions.CONTROL_NONE); mapTypeOsm = options.getMapTypeByName("osm") ; mapTypeOsmTilesDe = options.getMapTypeByName("osm_tiles_de") ; mapTypeOsmTilesBaB = options.getMapTypeByName("osm_tiles_de_motorway") ; mapTypeOsmDeluxe = options.getMapTypeByName("osm-deluxe") ; mapTypeOsmPlusDeluxe= options.getMapTypeByName("osm-plus-deluxe") ; mapTypeOsmTilesIA = options.getMapTypeByName("osm_tiles_int_german_motorways") ; mapTypeRoadmap = options.getMapTypeByName("roadmap"); mapTypeOSMPlusTAO = options.getMapTypeByName("tao_deluxe"); mapTypeBirdsview = options.getMapTypeByName("birdsview"); mapTypeHybridBirdsview = options.getMapTypeByName("hybridBirdsview"); mapTypeRoadmapHere = options.getMapTypeByName("roadmapHere"); mapTypeHereDeluxe = options.getMapTypeByName("here-deluxe"); mapTypeHybridHere = options.getMapTypeByName("hybrid"); mapTypeAirHere = options.getMapTypeByName("air"); IWEventManager.addListener(map, 'oninitialize', loadControls); var panelContent = document.createElement('div'); iw.id('tabPanesRoute').appendChild(panelContent); panelContent.id = 'panelContent'; $('body').bind('leftPaneResize',function(e, reload){ var w = $("#rightPane").outerWidth(true); var h = $('#rightPane').outerHeight(true); if(w < mapMinWidth){ w = mapMinWidth; } if(h < mapMinHeight){ h = mapMinHeight; } var mapWidth = map.getOptions().getSize().getWidth(); if(reload && reload == true || mapWidth < w){ map.getOptions().setSize(new IWSize(w,h)); } }); $('body').bind('splitterResize',function(e){ var w = $('#rightPane').innerWidth(); var h = $('#rightPane').innerHeight(); if(w < mapMinWidth){ w = mapMinWidth; } if(h < mapMinHeight){ h = mapMinHeight; } map.getOptions().setSize(new IWSize(w,h)); }); $('body').bind('resplitStart',function(e){ if(measuringTool){ if($("#measuringDiv").length>0){ $("#measuringDiv").css("display","none"); } } }); $('body').bind('resplitStop',function(e){ if(measuringTool && measuringTool.getInfoWindow().isVisible()==true){ if($("#measuringDiv").length>0){ $("#measuringDiv").css("display","block"); } } currentSplitterSize = $('#leftPane').outerWidth(); }); $('body').bind('closePopups', function() { removePopups(); }); IWEventManager.addListener(map, 'onresize', function(event) { if (measuringTool) { measuringTool.getInfoWindow().setRedrawable(true); } } ); IWEventManager.addListener(map, 'onmaptypechange', function(mapTypeChangeEvent){ updateCopyright(); if(isControlsLoad== false){ return; } if (mapTypeChangeEvent.newMapType == 'birdsview' || mapTypeChangeEvent.newMapType == 'hybridBirdsview'){ measuringTool.getInfoWindow().setVisible(false); measuringTool.deactivate(); scalarControl.setVisible(false); setImageEnabled("search",false); setImageEnabled("traffic",false); setImageEnabled("menuRoute",false); setImageEnabled("measure",false); setImageEnabled("print",false); if(!isTouchScreenAvailable()){ setImageEnabled("coord",false); } setImageEnabled("print",false); setShowCoordEnabled(false); map.getOverlayManager().getLayer(0).setVisible(false); map.removeInfoBalloon(); setLeftPaneVisible(false); enableBuden(false); } else if(mapTypeChangeEvent.newMapType == 'hybrid' || mapTypeChangeEvent.newMapType == 'air'){ setImageEnabled("print",false); enableBuden(false); } else{ scalarControl.setVisible(true); setImageEnabled("traffic", true); setImageEnabled("search", true); setImageEnabled("menuRoute", true); setImageEnabled("measure", true); if(!isTouchScreenAvailable()){ setImageEnabled("coord",true); } setImageEnabled("print",true); setLeftPaneVisible(true); var item_measure = menuControl.getItem("measure"); if (item_measure.clicked == true) { measuringTool.getInfoWindow().setVisible(true); measuringTool.activate(); } map.getOverlayManager().getLayer(0).setVisible(true); if(mapTypeChangeEvent.newMapType == 'roadmap' || mapTypeChangeEvent.newMapType == 'roadmapHere'|| mapTypeChangeEvent.newMapType == 'here-deluxe'|| mapTypeChangeEvent.newMapType == 'osm'|| mapTypeChangeEvent.newMapType == 'osm-deluxe' ){ enableBuden(false); } else{ enableBuden(true); } } } ); IWEventManager.addDomListener(document.getElementById('divMap'), 'onmousemove', function (event) { if(showCoordEnabled == false){ return true; } if(menu.getContainer().style.display != 'none'){ return; } if (!event){ event = window.event; } var mouseEvent = new IWMouseAdapter().toMouseEvent(event, $('#divMap')[0]); var mousePixelWithOffset = new IWPoint(mouseEvent.position.getX() , mouseEvent.position.getY()-5); if(infoCoordinateBallon ==null){ infoCoordinateBallon = new MarInfoCoordinateBallon(map,mousePixelWithOffset,false); map.addWindowOverlay(infoCoordinateBallon); } else{ infoCoordinateBallon.update(mousePixelWithOffset); } }); IWEventManager.addListener(map, 'onzoomend',function (event){ if($("#treeViewWrapper .IWTreeView > div").length>0){ updateOverlayList($('#cbOverlayList')[0].checked, event.newZoomLevel); } if(menu){ menu.enable(); } }); IWEventManager.addListener(map, 'onzoomstart',function (event){ if(menu){ menu.disable(); } }); var zoom = 14; if("".length > 0 && "".length > 0 && "" == "ok" && "".length > 2){ var json = eval('('+""+')'); if(json.gebiet){ var nw = new IWCoordinate(json.gebiet.xMin,json.gebiet.yMin); var so = new IWCoordinate(json.gebiet.xMax,json.gebiet.yMax); bounds = new IWBounds(nw,so); var zoom = map.getBoundsZoomlevel(bounds); var coord = bounds.getCenter(); map.setCenter(coord, zoom, mapTypeOsmDeluxe); } else{ map.setCenter(coordCenter, zoom, mapTypeOsmPlusDeluxe); } } else{ map.setCenter(coordCenter, zoom, mapTypeOsmPlusDeluxe); } resizeInfoBalloons(map); initParkplatzSensorenLayer(map); showSearchMarker(); updateCopyright(); buildMenu(); setLeftPaneVisible(true); } // initialize function getContentForParkingPlace(record,fzType){ var frei; var gesamt; var occupancyType; var occupancyValue; var aktual; var content =""; var parkingPrices = null; var state=null; if(record.parkingPrice && record.parkingPrice.price){ parkingPrices = record.parkingPrice.price; for(var i=0;i < parkingPrices.length;i++){ var parkingPrice = parkingPrices[i]; if(parkingPrice.fzgId == fzType){ gesamt =parkingPrice.plTotal; content=fzType+"
').mouseover(function() {
Tip('Ziehen Sie den' + number + '
'; map.getOverlayManager().getLayer(layerIndexOfRoutingPoints).addOverlay(marker); return marker; } function setTreeNodeSelect(event){ if(!event.treeNode.getNode().isVisible() ){ map.getOverlayManager().getLayer(10).removeAllOverlays(); if(infoBalloon!=null){ map.removeWindowOverlay(infoBalloon); } } if(event.treeNode.getNode().getName() == 'Aktuelle Angebote'){ showSearchMarker(pushpinCoordinate); } } function callbackNodeClickFunction(nodeClickFunction,node){ if(nodeClickFunction == undefined)return; var shape = node.getShapes()[0]; var range = shape.getRange(); if(range.contains(map.getZoom())) { window[nodeClickFunction](node,null); } } function toogleBussesVisibility(node,_marked){ var marked = _marked; if(marked==null)marked =node.isMarked(); publicTransportMap.setBussesVisibility(marked); } function toogleTramsVisibility(node,_marked){ var marked = _marked; if(marked==null)marked =node.isMarked(); publicTransportMap.setTramsVisibility(marked); } function toogleSubwaysVisibility(node,_marked){ var marked = _marked; if(marked==null)marked =node.isMarked(); publicTransportMap.setSubwaysVisibility(marked); } function toogleSBahnVisibility(node,_marked){ var marked = _marked; if(marked==null)marked =node.isMarked(); publicTransportMap.setSBahnVisibility(marked); } function formatTreeNode(e){ var src = null; e.obj = document.createElement('div'); e.obj.id='test'; e.obj.style.styleFloat='right'; e.obj.style.cssFloat='right'; e.obj.style.visibility = 'visible'; var div = document.createElement('div'); // div.style.width='20px'; var isNode = e.node.getGroupName ? true : false; var divSym = document.createElement('div'); var symbol = layersNameSymbolArray[e.node.getName()]; var nodeClickFunction = layersNameFunctionArray[e.node.getName()]; if(nodeClickFunction !="null" && !isNode){ IWEventManager.addListener(e.node, 'onstatechange', function(){ callbackNodeClickFunction(nodeClickFunction,e.node); }); } var divName = document.createElement('div'); if(symbol && !isNode){ if(symbol =='event_luftballon' || symbol =='KINO' || symbol =='Museum_0'|| symbol =='parkplatz1' || symbol =='ico_wetter_02' ||symbol =='gs_hst'||symbol =='karte2' ||symbol == 'karte1'||symbol == 'tmc'||symbol=='Weihnachtsmarkt'){ divSym .className='bgPoiImagesStat '+ symbol; } else{ divSym .className='bgPoiImages '+ symbol; } iw.append(div, divSym ); divName.style.marginLeft="24px"; } iw.append(e.obj, div); var label = iw.create('label'); if(isNode){ label.className="treeNode"; } else{ label.className="treeLeaves"; } label.innerHTML = e.node.getName(); label.htmlFor = 'cb_' + e.node.getName().replace(' ', ''); //label.htmlFor = 'cb_' + e.node.getName(); var span = document.createElement('span'); iw.append(span, label); iw.append(divName, span); iw.append(e.obj,divName); if(e.node.getName() == 'Aktuelle Angebote'){ var divCb = document.createElement('div'); divCb.style.marginLeft="25px"; var combo_box = document.createElement('select'); $(combo_box).change(function () { umkreisSucheRadius = $(this).val(); showSearchMarker(pushpinCoordinate); }); combo_box.id ="cbSearchRadius"; var choice = document.createElement('option'); choice.value = '0'; choice.appendChild(document.createTextNode('Voreingestellt')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '-1'; choice.appendChild(document.createTextNode('Alle')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '100'; choice.appendChild(document.createTextNode('100 m.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '200'; choice.appendChild(document.createTextNode('200 m.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '500'; choice.appendChild(document.createTextNode('500 m.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '1000'; choice.appendChild(document.createTextNode('1 km.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '2000'; choice.appendChild(document.createTextNode('2 km.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '5000'; choice.appendChild(document.createTextNode('5 km.')); combo_box.appendChild(choice); choice = document.createElement('option'); choice.value = '10000'; choice.appendChild(document.createTextNode('10 km.')); combo_box.appendChild(choice); iw.append(divCb,combo_box); iw.append(e.obj,divCb); } } function buildMenu(){ var methods = new ContextMenuDefaultMethods(map); menu = new ContextMenuControl(map); menu.addItem('Zoom ein', function(position) { methods.zoomIn(position); }); menu.addItem('Zoom aus', function(position) { methods.zoomOut(position); }); menu.addSeparator(); menu.addItem('Route von', function(position) { methods.routeFromHere(position); }); menu.addItem('Route über', function(position) { methods.routeVia(position); }); menu.addItem('Route nach', function(position) { methods.routeHere(position); }); var routeRemove = menu.addItem('Route entfernen', function removeRoute() { RoutingManager.removeRoute(); }); routeRemove.setActive(false); menu.addSeparator(); coordMenu = menu.addItem('Koordinaten‑Markierung setzen ', function(position) {setCoordMarkierung(position); }); var zvoMenu = menu.addItem('Umfeldinformation anzeigen', function(position) {getZVOInfo(position,map); }); var lupeMenu = menu.addItem('Lupe', function(position) {magnify(position,map); }); menu.addSeparator(); ugcMenu = menu.addItem('Favorit setzen', function(position) { var maptype = map.getCurrentMapType(); var projection = maptype.getProjection(); var coordinate = projection.pixelToMeter(position); clearCreateForm(); setUGCMarker(coordinate); if(ugcMarker !=null && ugcMarker.isVisible() == true){ $('#ugc_tt_div').ugcTooltip('show'); } form = document.forms['poiSaveForm']; form.elements["x"].value =coordinate.toWGS84().getX().toFixed(8); form.elements["y"].value =coordinate.toWGS84().getY().toFixed(8); }); ugcMenu.setActive(false); IWEventManager.addListener(RoutingManager, 'onrouteclear', function() { routeRemove.setActive(false); } ); IWEventManager.addListener(RoutingManager, 'onroute', function() { routeRemove.setActive(true); } ); } function magnify(position, map){ var maptype = map.getCurrentMapType(); var projection = maptype.getProjection(); var coordinate = projection.pixelToMeter(position); var content = routingMagnifierFactory.createRoutingMagnifierContent(coordinate); infoBalloon = createInfoBalloon( coordinate, content,false); map.addWindowOverlay(infoBalloon); } function setBirdsView(typeNameBirdsview, typeNameAir) { var typeBirdsview = map.getOptions().getMapTypeByName(typeNameBirdsview); var typeAir = map.getOptions().getMapTypeByName(typeNameAir); if (typeBirdsview.isAvailable()) { mapTypeRoadmap.currentZoom = map.getZoom(); map.setCenter(map.getCenter(), 19, typeBirdsview); } else { map.setCenter(map.getCenter(), map.getZoom(), typeAir); } } function setLeftPaneVisible(visible){ if(visible && visible ==true ){ $('.vsplitbar').css("display","block"); var sw = $('#leftPane').width(); $('#splitter').trigger("resize",[sw]); } else{ $('.vsplitbar').css("display","none"); $('#splitter').trigger("resize",[0]); } } function getStateFromCookie(name){ var state = $.cookie(name); if(state != null || state =='true'){ return true; } return false; } function createMarInfoBalloon(coordinate, content) { if (marInfoBalloon != null) { map.removeWindowOverlay(marInfoBalloon); marInfoBalloon.destroy(); marInfoBalloon = null; } marInfoBalloon = new InfoBalloon(map, coordinate, content); return marInfoBalloon; }; function createInfoBalloon(coordinate, content, moreTargets) { content.style.display=''; if (infoBalloon != null) { map.removeWindowOverlay(infoBalloon); infoBalloon.destroy(); infoBalloon = null; } infoBalloon = new IWInfoBalloon(map, coordinate, content,moreTargets); return infoBalloon; }; function createOffersInfoBalloon(coordinate, content, moreTargets) { content.style.display=''; if (infoBalloon != null) { map.removeWindowOverlay(infoBalloon); infoBalloon.destroy(); infoBalloon = null; } infoBalloon = new OffersInfoBalloon(map, coordinate, content,moreTargets); return infoBalloon; }; function setShowCoordEnabled(enabled){ removeInfoCoordinateBallon(); showCoordEnabled = enabled; coordMenu.setActive(enabled); } function removeInfoCoordinateBallon(){ if(infoCoordinateBallon !=null){ map.removeWindowOverlay(infoCoordinateBallon); infoCoordinateBallon=null; } } function enableBuden(enabled){ for(var i=0;i< layersArray.length;i++){ var l = layersArray[i]; if(l.getLayerName()=='BUDEN'){ if(l.isVisible()){ l.setVisible(enabled); } $('#cb_NürnbergerChristkindlesmarkt').attr("disabled", !enabled); break; } } map.redraw(); } function setImageEnabled(imagename,enabled) { var item = menuControl.getItem(imagename); item.enabled = enabled; if (enabled) { if (item.clicked == true) item.getNode().className = item.classClickedImage; else item.getNode().className = item.classOutImage; } else { item.getNode().className = item.classDisabledImage; } } function makeBuchLayer(layerTitle, layerName){ var layer = new IWLayer(map, layerTitle, layerName); layersArray.push(layer); layersNameSymbolArray[layerTitle]=""; return layer; } function makeLayer(layerTitle, layerName, defSymbol,idfLayerName,onNodeClickFunction) { var symbol =""; if(defSymbol){ symbol=defSymbol; if(symbol.indexOf(".")!=-1){ symbol=symbol.substring(0,symbol.indexOf(".")); } } var layer = new IWLayer(map, layerTitle, layerName); if(idfLayerName!=null){ layer = new IWLayer(map, layerTitle, layerName,idfLayerName); } var requestLayer = new IWRequestLayer(layer); layersArray.push(layer); layersNameSymbolArray[layerTitle]=symbol; layersNameFunctionArray[layerTitle]=onNodeClickFunction; requestLayer.registerEvent('onclick'); requestLayer.registerEvent('onmousestop'); map.getLayerInfoManager().addRequestLayer(requestLayer); var removeListener = IWEventManager.addListener(layer, 'onremove', function(e){ map.getLayerInfoManager().removeRequestLayer(requestLayer); IWEventManager.removeListener(removeListener); }); return layer; } function acitvateBudenPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); var c = new IWCoordinate( 11.077321,49.453972, IWCoordinate.WGS84).toMercator(); map.setCenter(c, 20, mapTypeOsmPlusDeluxe); document.getElementById('cb_NürnbergerChristkindlesmarkt').click(); } function acitvateEssenPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); document.getElementById('cb_TakeAway').click(); document.getElementById('cb_Lieferung').click(); document.getElementById('cb_TakeAwayundLieferung').click(); } function acitvateEinkaufenPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); document.getElementById('cb_EinkaufenGrundbedarf').click(); } function acitvateGesundheitPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); document.getElementById('cb_GesundheitPflege').click(); } function acitvateHofladenPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); document.getElementById('cb_Hofladen').click(); } function acitvateWochenmarktPois(){ $('#splitter').trigger("resize",[currentSplitterSize]); $("ul.tabs").data("tabs").click(tabs['tabPoi']); document.getElementById('cb_Wochenmarkt').click(); } function updateCopyright() { var copyright =""; var options = map.getOptions(); if (trafficEventLayer && trafficEventLayer.isVisible()) if (map.getCurrentMapType().getName()!= options.getMapTypeByName("birdsview").getName()) if (map.getCurrentMapType().getName()!= options.getMapTypeByName("air").getName()) copyright += ', INRIX'; options.setApplicationCopyright(copyright); } function isTouchScreenAvailable() { return !(document.ontouchmove === undefined); };