PageSourceSearch

https://www.stadtbibliothek-jena.de/jk/js/olmap.js

js stadtbibliothek-jena.de collected 2026-10-07 02:41:46 UTC 7,540 bytes, 1 lines download raw bytes

1"use strict";var olmap=function(){this.stadtplanWebServiceURL="https://map-api.jena.de/str_hnr_split/getByStrHnrBulk.json",this.id=Math.floor(Math.random())+Date.now(),this.markerName="marker-red",this.markerElements="map-marker",this.markerScale="1.0",this.markerTextColor="#FFFFFF",this.markerTextStrokeColor="#000000",this.dataSourceElements="map-data",this.targetMapElement="map",this.popupElements="poi-popup",this.toggleElements="poi-toggle",this.poiToggleSelector="poi-toggle-"+this.id+"-",this.poiDataSelector="poi-data-"+this.id+"-",this.poiPopupSelector="poi-popup-"+this.id+"-",this.overlayPopups=[],this.map,this.visibleLayerGroup="stadtplan",this.marker={},this.interactionDefaults={altShiftDragRotate:!0,constrainResolution:!1,doubleClickZoom:!0,keyboard:!0,mouseWheelZoom:!0,shiftDragZoom:!0,dragPan:!0,pinchRotate:!0,pinchZoom:!0},this.interactions=new ol.Collection,this.layerGroups={stadtplan:new ol.layer.Group({layers:[new ol.layer.Image({title:"Stadtplan Jena",source:new ol.source.ImageWMS({attributions:[new ol.Attribution({html:'&copy; <a href="http://www.jena.de">Stadt Jena</a>'})],ratio:2,projection:new ol.proj.Projection({code:"EPSG:25832",units:"m"}),url:"https://map.jena.de/mapproxy/wms",params:{LAYERS:"stadtplan",FORMAT:"image/png",VERSION:"1.3.0",TRANSPARENT:"",BBOX:[674e3,5636e3,688e3,5652e3]}})})]}),luftbild:new ol.layer.Group({layers:[new ol.layer.Image({title:"Stadtplan Jena",source:new ol.source.ImageWMS({attributions:[new ol.Attribution({html:'&copy; <a href="http://www.jena.de">Stadt Jena</a>'})],ratio:2,projection:new ol.proj.Projection({code:"EPSG:25832",units:"m"}),url:"https://map.jena.de/mapproxy/wms",params:{LAYERS:"luftbild",FORMAT:"image/png",VERSION:"1.3.0 ",TRANSPARENT:"",BBOX:[674e3,5636e3,688e3,5652e3]}})})]})},this.poiVectorSource=new ol.source.Vector({features:this.visibleFeatures}),this.poiVectorLayer=new ol.layer.Vector({source:this.poiVectorSource}),this.init=function(t){var e=this;ol.Overlay.prototype.show=function(){void 0!==this.get("coords")&&this.setPosition(this.get("coords"))},ol.Overlay.prototype.hide=function(){void 0!==this.getPosition()&&(this.set("coords",this.getPosition()),this.setPosition(void 0))},ol.Overlay.prototype.toggle=function(){null!=this.getPosition()?this.hide():this.show()},e.initPoiData((function(){e.initMarker(),e.initPopup(),e.initToggle(),e.initInteractions(),e.initMap(),"function"==typeof t&&t(e)}))},this.switchToLayer=function(t){var e=this;void 0!==e.layerGroups[t]&&""!=e.layerGroups[t]&&(this.map.getLayers().forEach((function(t,a){e.map.removeLayer(t)})),e.map.setLayerGroup(e.layerGroups[t]))},this.initMarker=function(){var t=this;
1$("."+t.markerElements).each((function(){var e=$(this).attr("data-name");""!=e&&(t.marker[e]=$(this))}))},this.initPopup=function(){var t=this,e="http://maps.google.com";navigator.userAgent.search("Mac OS")>0&&(e="http://maps.apple.com"),$("."+t.popupElements).each((function(){var a=$(this),o=$("#"+t.poiDataSelector+a.attr("data-id"));if(a.attr("id"),a.prop("id",t.poiPopupSelector+a.attr("data-id")),"true"==a.attr("data-ext-map-link")&&a.append('<a class="popupExtMapLink" href="'+e+"?q="+o.attr("data-str-hnr")+', Jena, Deutschland" title="'+a.attr("data-ext-map-title")+'">'+a.attr("data-ext-map-title")+"</a>"),a.children(".poi-popup-closer")&&a.children(".poi-popup-closer").on("click",(function(){t.poiPopupClose(o.attr("data-id"))})),""!=o.attr("data-lon")&&""!=o.attr("data-lat")){var i=new ol.Overlay({id:"overlay-"+t.poiPopupSelector+$(this).attr("data-id"),element:$("#"+t.poiPopupSelector+$(this).attr("data-id")).get(0),positioning:"bottom-right",autoPan:!0,autoPanAnimation:{duration:250}});i.set("coords",[o.attr("data-lon"),o.attr("data-lat")]),t.overlayPopups.push(i)}else $(this).remove()}))},this.initInteractions=function(){this.interactions=ol.interaction.defaults(this.interactionDefaults)},this.initMap=function(){var t=this;t.map=new ol.Map({target:t.targetMapElement,logo:!1,layers:t.layerGroups[this.visibleLayerGroup],overlays:t.overlayPopups,interactions:t.interactions,view:new ol.View({center:[683109.119003381,5645615.72126983],projection:new ol.proj.Projection({code:"EPSG:25832",units:"m"}),minZoom:12,maxZoom:19,zoom:12,extent:[674e3,5636e3,688e3,5652e3],resolutions:[29.6875,14.84375,7.421875,3.7109375,1.85546875,.927734375,.4638671875]})}),t.map.on("click",(function(e){t.map.forEachFeatureAtPixel(e.pixel,(function(e,a){var o=e.get("id"),i=t.map.getOverlayById("overlay-"+t.poiPopupSelector+o);$("#"+t.poiDataSelector+o);$(i.getElement()).show(),i.toggle()}))})),t.updateViewLayer(),t.map.addLayer(t.poiVectorLayer)},this.initToggle=function(){var t=this;
1$("."+t.toggleElements).each((function(){var e=$(this);e.prop("id",t.poiToggleSelector+e.attr("data-id")),e.on("click",(function(){var a=$("#"+t.poiDataSelector+e.attr("data-id"));"true"==a.attr("data-visible")?(t.poiPopupClose(a.attr("data-id")),a.attr("data-visible","false")):("false"==a.attr("data-visible")||void 0===a.attr("data-visible"))&&a.attr("data-visible","true"),t.updateViewLayer()}))}))},this.initPoiData=function(t){var e=this,a=[];$("."+this.dataSourceElements).each((function(){var t=$(this);t.attr("id"),t.prop("id",e.poiDataSelector+t.attr("data-id")),(""==t.attr("data-lon")||void 0===t.attr("data-lon")&&""==t.attr("data-lat")||void 0===t.attr("data-lat"))&&(void 0!==t.attr("data-str-hnr")&&""!=t.attr("data-str-hnr")?a.push({id:t.attr("data-id"),strhnr:t.attr("data-str-hnr")}):t.remove())})),a.length>0?$.ajax({method:"GET",url:e.stadtplanWebServiceURL,data:{q:a}}).done((function(a){$.each(a,(function(t,a){if(a.id&&a.lon&&a.lat){var o=$("#"+e.poiDataSelector+a.id);o.attr("data-lon",a.lon),o.attr("data-lat",a.lat)}})),"function"==typeof t&&t()})):"function"==typeof t&&t()},this.getPoiFeatures=function(t){var e="marker-red",a=this.markerScale,o="",i=this.markerTextColor,r=this.markerTextStrokeColor,n=new ol.Feature({id:t.attr("data-id"),geometry:new ol.geom.Point([t.attr("data-lon"),t.attr("data-lat")]),population:4e3,rainfall:500});return void 0!==t.attr("data-marker-name")&&(e=t.attr("data-marker-name")),void 0!==t.attr("data-marker-scale")&&(a=t.attr("data-marker-scale")),void 0!==t.attr("data-marker-text")&&(o=t.attr("data-marker-text")),void 0!==t.attr("data-marker-text-color")&&(i=t.attr("data-marker-text-color")),void 0!==t.attr("data-marker-text-stroke-color")&&(r=t.attr("data-marker-text-stroke-color")),n.setStyle(new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],opacity:1,scale:a,imgSize:[32,32],img:this.marker[e].get(0)}),text:new ol.style.Text({offsetY:20*a*-1,font:"11px helvetica,sans-serif",text:o.substr(0,3),scale:a,fill:new ol.style.Fill({color:i}),stroke:new ol.style.Stroke({color:r,width:1.5})})})),n},this.updateViewLayer=function(){var t=this,e=[];t.poiVectorSource.clear(),$("."+t.dataSourceElements).each((function(){""!=$(this).attr("data-lon")&&""!=$(this).attr("data-lat")&&"true"==$(this).attr("data-visible")&&e.push(t.getPoiFeatures($(this)))})),t.poiVectorSource.addFeatures(e),t.showAllFeatures(),0==e.length&&t.jumpToJena()},this.showAllFeatures=function(){var t=this,e=t.poiVectorSource.getFeatures(),a=[],o=t.map.getView();if($.each(e,(function(){var t=this.getGeometry().getCoordinates();void 0!==t&&a.push(t)})),a.length>0){var i=ol.extent.boundingExtent(a);o.fit(i,t.map.getSize())}},this.jumpToJena=function(){var t=this.map.getView();t.setCenter([683109.119003381,5645615.72126983]),t.setZoom(12)},this.poiPopupClose=function(t){this.map.getOverlayById("overlay-"+this.poiPopupSelector+t).hide()}};

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.