1var CompareMap=(function(){CompareMap.margin=15;function CompareMap(element,otherBasemap){if(window.comparator!==undefined&&window.comparator.active){return;} 2this.active=true;this.otherMap=otherBasemap.olMap||otherBasemap.map;this.otherBasemap=otherBasemap.basemap||otherBasemap;this.view=$(this.otherMap.div);this.calulateMapSize();this.basemap=new BaseMap(element,true,COMPARE_START_MAP);this._removeChangeListener();this.map=this.basemap.map;this.alignInProgress=false;this._addControls();this._addEventListeners();this.otherBasemap.editToolbar.featuresLayer.hide();this.basemap.updateLayerswitcher(this.map.activeLayer.data_name);this.basemap.alignToMap(this.otherMap);} 3CompareMap.prototype._removeChangeListener=function(){var self=this;$(document).unbind('changeLayer');$(document).bind('changeLayer',function(evt,layer){self.basemap.changeLayer(layer);});};CompareMap.prototype.calulateMapSize=function(elementWidth){if(elementWidth===undefined){elementWidth=this.view.width();} 4var mapWidth=Math.round((elementWidth/2));$('#compare-map').removeClass('hide').css('width',mapWidth-CompareMap.margin);$('.editor-window').addClass('compare-window').css('width',mapWidth-CompareMap.margin);this.otherMap.updateSize();};CompareMap.prototype.resize=function(){var parentContainer=this.view.parent();var parentWidth=parentContainer.width()-$('.side-bar').width();this.calulateMapSize(parentWidth);};CompareMap.prototype.otherMapEventHandler=function(){this.basemap.alignToMap(this.otherMap);};CompareMap.prototype._addControls=function(){this.map.addControl(new OpenLayers.Control.TouchNavigation({dragPanOptions:{enableKinetic:true}}));this.map.addControl(new OpenLayers.Control.Navigation());var permalinkElement=$('#permalink-control');if(permalinkElement.length!==0){this.map.addControl(new OpenLayers.Control.KKFPermalink(permalinkElement));} 5this.map.addControl(new OpenLayers.Control.Attribution());};CompareMap.prototype._addEventListeners=function(){this.otherMap.events.register('moveend',this,this.otherMapEventHandler);this.otherMap.events.register('zoomend',this,this.otherMapEventHandler);this.map.events.register('moveend',this,function(){this.otherBasemap.alignToMap(this.map);});this.map.events.register('zoomend',this,function(){this.otherBasemap.alignToMap(this.map);});$(window).resize((function(_this){return function(){_this.resize();};})(this));};CompareMap.prototype.destroy=function(){var self=this;self.otherMap.events.unregister('moveend',self,self.otherMapEventHandler);self.otherMap.events.unregister('zoomend',self,self.otherMapEventHandler);$(document).unbind('changeLayer');$(document).bind('changeLayer',function(evt,layer){self.otherBasemap.changeLayer(layer);});self.map.destroy();$(window).off('resize');$('#compare-map').hide();$('.editor-window').removeClass('compare-window').removeAttr('style');self.otherMap.updateSize();self.otherBasemap.updateLayerswitcher(self.otherMap.activeLayer.name);self.otherBasemap.editToolbar.featuresLayer.show();window.comparator=undefined;};return CompareMap;})();jQuery(function($){window.layerRadioBar=undefined;window.vectorOrRastercardTabHost=undefined;window.slideWidget=undefined;window.parentLayerBar=[];initializeSidebars=function(){var mainTabHost=new TabHost('#main-tab-host');window.vectorOrRastercardTabHost=new TabHost('#vector-or-raster-card-tab-host');var drawPointSidebar=new TabHost('#draw-point-tab-host');window.slideWidget=new SlideWidget('#slide-widget');slideWidget.initalize();};initializeLayerRadioBar=function(){return $('.vector-tab').find('.request-option').each(function(index,element){window.parentLayerBar.push(element);if($(element).hasClass('vector-layer')){$(element).find('.headline').click(function(evt){var childs=[];$(element).find('input[type=checkbox]').each(function(index,checkboxElement){if($(checkboxElement).prop('checked')){childs.push($(checkboxElement).data('name'));}});$(document).trigger('changeLayer',{'name':$(element).data('name'),'url':$(element).data('transform-url'),'childs':childs});});} 6$(element).find('input[type=checkbox]').each(function(index,checkboxElement){$(checkboxElement).change(function(evt){var url=$(this).data('transform-url');$(document).trigger('changeLayer',{'name':$(this).data('base-name'),'url':url,'child':$(this).data('name'),'childStatus':$(this).prop('checked')});var parent=$(this).data('parent');$(parent).addClass('active');})});$(element).find('input[type=radio]').each(function(index,radioElement){$(radioElement).change(function(evt){var url=$(this).data('transform-url');$(document).trigger('changeLayer',{'name':$(this).data('name'),'url':url});var parent=$(this).data('parent');$(parent).addClass('active');})});});};initializeMapWithSearch=function(){window.viewer=new BaseMap($('#editor-map'));var search=new Search($('#search-form'),window.viewer);};initializeSearchDrop=function(){$(".no-result-headline").click(function(){$(".no-result-infotext").toggle();});} 7initializeSearchDrop();initializeSidebars();initializeLayerRadioBar();initializeMapWithSearch();});var Marker=(function(){function Marker(feature){this.feature=feature;this.attributes=feature.attributes;if(this.feature&&this.feature.style){delete this.feature.style.fillOpacity;delete this.feature.style.strokeOpacity;delete this.feature.style.fontSize;delete this.feature.style.fontFamily;delete this.feature.style.fontColor;} 8this.style=feature.style;this.defaultFactor=0.25;this.defaultValue=defaultMarkerSymbolizer.defaultValue||3;} 9Marker.prototype.updateRotation=function(rotation){if(rotation!==un
9defined){this.feature.style.rotation=rotation;}};Marker.prototype.loadColorReplace=function(){if(this.style.graphicColorReplace!==undefined){var colors=this.style.graphicColorReplace.split(',');this.feature.attributes.marker.baseColor=colors[0];this.feature.attributes.marker.color='#'+colors[1];}};Marker.prototype.updateColorReplace=function(){if(this.style.graphicColorReplace!==undefined){var baseColor=this.feature.attributes.marker.baseColor;var newColor=this.feature.attributes.marker.color;if(newColor.startsWith('#')){newColor=newColor.slice(1,newColor.length);} 10this.style.graphicColorReplace=baseColor+','+newColor;}};Marker.prototype.updateUrl=function(){var url=this.feature.attributes.marker.url||this.feature.style.externalGraphic;if(this.style.graphicColorReplace!==undefined){url+=(url.includes('?')?'&':'?')+'replace='+this.style.graphicColorReplace;} 11this.feature.style.externalGraphic=url;};Marker.prototype.updateSize=function(){var addedFactor=parseFloat(this.feature.attributes.factor)||this.defaultFactor;if(this.feature.style.graphicFilename){addedFactor=parseFloat(this.feature.attributes.factor/100)||this.defaultFactor;} 12var factor=1+addedFactor;var ratio=parseInt(this.feature.attributes.marker.height)/parseInt(this.feature.attributes.marker.width);var minPx=parseInt(this.feature.attributes.marker.minPx);var maxPx=parseInt(this.feature.attributes.marker.maxPx);var value=parseFloat(this.feature.attributes.value||this.feature.attributes.style?.value)||this.defaultValue;var px=minPx+(minPx*(Math.log(value)/Math.log(10)));var width=px;var height=px*ratio;if(px<minPx){width=minPx;height=minPx*ratio;} 13if(px>maxPx){width=maxPx;height=maxPx*ratio;} 14this.feature.style.graphicWidth=width*factor;this.feature.style.graphicHeight=height*factor;this.feature.style.externalGraphicScale=(width*factor)/parseInt(this.feature.attributes.marker.width);};return Marker;})();var markerDefaultColor='#EF8214';var markerSearchStyleExact={'graphicColorReplace':'EF8214,EF8214'};var markerSearchStyle={'graphicColorReplace':'EF8214,4A74B9'};var defaultMarkerSymbolizer={};var styleMap=new OpenLayers.StyleMap({'temporary':{'strokeColor':'#EF8214 ','strokeWidth':1.5,'strokeOpacity':1,'strokeDashstyle':'solid','fillColor':'#EF8214 ','fillOpacity':0.15,'cursor':'pointer'},'select':{'strokeColor':'#EF8214','strokeWidth':1.5,'strokeOpacity':1,'strokeDashstyle':'solid','fillColor':'#0b4232','fillOpacity':0.15,'cursor':'pointer'},'default':{'strokeColor':'#EF8214','strokeWidth':1.5,'strokeOpacity':1,'strokeDashstyle':'solid','fillColor':'#0b4232','fillOpacity':0.15},'text':{'fontColor':'#000000','fontStyle':'#CCCCCC','fontFamily':'Fira Sans Book','fontSize':'16px','labelAlign':'tr','labelXOffset':10,'labelYOffset':10},});var rules=[new OpenLayers.Rule({symbolizer:{'strokeColor':'#FFFFFF','pointRadius':5,'fillColor':'#3C4145','graphicName':'square','fillOpacity':1},elseFilter:true})];styleMap.styles['default'].addRules(rules);var _defaultSymbolizer={'cursor':'pointer'};var preventSymbolizer={} 15var preventMarkerAttributes={} 16var defaultTextSymbolizer=$.extend(true,{},_defaultSymbolizer,{'fontFamily':'Fira Sans Regular','fontSize':'14px','fontColor':'#000000','pointRadius':12,'strokeOpacity':0,'fillOpacity':0,'fontRotation':0,'fontScaling':false});var defaultLineSymbolizer=$.extend(true,{},_defaultSymbolizer,{'strokeColor':'#EF8214','strokeWidth':1.5,'strokeOpacity':1,'strokeDashstyle':'solid'});var defaultPolygonSymbolizer=$.extend(true,{},defaultLineSymbolizer,{'fillColor':'#EF8214','fillOpacity':0.15});var defaultRadiusSymbolizer=$.extend(true,{},defaultPolygonSymbolizer,{'strokeWidth':3,'pointRadius':8});var printStyle={fillColor:'#b4b5b6',fillOpacity:0.4,hoverFillColor:'white',hoverFillOpacity:0.8,strokeColor:'#5f7383',strokeOpacity:1,strokeWidth:1,strokeLinecap:'round',strokeDashstyle:'solid',hoverStrokeColor:'#b4b5b6',hoverStrokeOpacity:1,hoverStrokeWidth:0.2,hoverPointRadius:1,pointColor:'#b4b5b6',hoverPointUnit:'%',pointerEvents:'visiblePainted',fontColor:'#000000',fontSize:'1.2em',fontFamily:'Fira Sans Book, monospace',fontWeight:'700'};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.