var i18nDict=i18nDict||[];i18nDict.de={"3D Tiles anzeigen":"3D Tiles anzeigen","Adresse eingeben o. auf Karte klicken":"Adresse eingeben o. auf Karte klicken","Adresse o. auf Karte klicken":"Adresse o. auf Karte klicken","Adressensuche":"Adressensuche","Annotationen":"Annotationen","Basisthemen":"Basisthemen","Beschreibung":"Beschreibung","Breite:":"Breite:","Drucken":"Drucken","Entf.":"Entf.","Extraktion starten":"Extraktion starten","Farbe:":"Farbe:","Fläche messen":"Fläche messen","Füllung:":"Füllung:","Gebiet anfliegen":"Gebiet anfliegen","Höhe messen":"Höhe messen","Linie messen":"Linie messen","Liste":"Liste","Messen":"Messen","Navigieren":"Navigieren","Optionen":"Optionen","Overlays":"Overlays","Rahmen:":"Rahmen:","Routing":"Routing","Smartview":"Smartview","Suchen Sie eine Adresse?":"Suchen Sie eine Adresse?","Teilen":"Teilen","Texturen exportieren":"Texturen exportieren","Vermeide Bereiche":"Vermeide Bereiche","Vorschau:":"Vorschau:","Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.":"Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang."};var i18nDict=i18nDict||[];i18nDict.en={"3D Tiles anzeigen":"Show 3d tiles","Adresse eingeben o. auf Karte klicken":"Enter address or click on map","Adresse o. auf Karte klicken":"Address or click on map","Adressensuche":"Address search","Annotationen":"Annotations","Basisthemen":"Base layers","Beschreibung":"Description","Breite:":"Width:","Drucken":"Print","Entf.":"Dist.","Extraktion starten":"Start extraction","Farbe:":"Color:","Fläche messen":"Measure area","Füllung:":"Fill:","Gebiet anfliegen":"Fly to area","Höhe messen":"Measure height","Linie messen":"Measure line","Liste":"List","Messen":"Measure","Navigieren":"Navigate","Optionen":"Options","Overlays":"Overlays","Rahmen:":"Stroke:","Routing":"Routing","Smartview":"Smart view","Suchen Sie eine Adresse?":"Searching for an address?","Teilen":"Share","Texturen exportieren":"Export textures","Vermeide Bereiche":"Avoid areas","Vorschau:":"Preview:","Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.":"Please activate popups for this site and try again."};var i18nDict=i18nDict||[];i18nDict.fr={"3D Tiles anzeigen":"Afficher 3D modèle","Adresse eingeben o. auf Karte klicken":"Suggérez une adresse","Adresse o. auf Karte klicken":"Suggérez une adresse","Adressensuche":"Recherche d'adresse","Annotationen":"Des annotations","Basisthemen":"Thème de base","Beschreibung":"Description","Breite:":"Largeur:","Drucken":"Imprimer","Entf.":"Dist.","Extraktion starten":"Lancer extraction","Farbe:":"Couleur:","Fläche messen":"Mesure une zone","Füllung:":"Remplissage:","Gebiet anfliegen":"Centrer zone","Höhe messen":"Mesure de hauteur","Linie messen":"Mesure de ligne","Liste":"Liste","Messen":"Mesure","Navigieren":"Naviguer","Optionen":"Options","Overlays":"Superposition","Rahmen:":"Bordure:","Routing":"Routage","Smartview":"Malin","Suchen Sie eine Adresse?":"Cherchez une adresse?","Texturen exportieren":"Exporter texture","Teilen":"Partager","Vermeide Bereiche":"Évite des secteurs","Vorschau:":"Annonce:","Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.":"Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang."};var GeoFly;(function(GeoFly){var GeoCoder;(function(GeoCoder){var s12=(function(){function s12(options){jQuery(options.input).autocomplete({source:function(request,response){$.ajax({type:"POST",url:options.geoCoderUrl+"/resolveAddressCoordinate",data:"distance=0&location="+encodeURI(request.term),success:function(data){var items=[];var json=JSON.parse(data);for(var i=0;i0){var item=this.stack.pop();item.getInteraction().stop();this.updatedActivityStates()}};Manager.prototype.remove=function(interaction){for(var i=this.stack.length-1;i>=0;--i){if(this.stack[i].getInteraction()==interaction){var items=this.stack.splice(i,1);for(var j=0;j0){var cesiumEvent={startPosition:new Cesium.Cartesian2(evt.touches[0].clientX-$(this.subViewer.getCesiumViewer().canvas).offset().left,evt.touches[0].clientY-$(this.subViewer.getCesiumViewer().canvas).offset().top),endPosition:new Cesium.Cartesian2(evt.touches[0].clientX-$(this.subViewer.getCesiumViewer().canvas).offset().left,evt.touches[0].clientY-$(this.subViewer.getCesiumViewer().canvas).offset().top)};this.onMove(cesiumEvent)}};PointerMove.prototype.handleEvent=function(evt){if(event.type=="touchmove"){this.processTouchMove(evt)}};PointerMove.prototype.start=function(){s4.prototype.start.call(this);var interaction=this;this.inputHandler=new Cesium.ScreenSpaceEventHandler(this.subViewer.getCesiumViewer().canvas);this.inputHandler.setInputAction(function(evt){interaction.onMove(evt)},Cesium.ScreenSpaceEventType.MOUSE_MOVE);this.subViewer.getCesiumViewer().canvas.addEventListener("touchmove",interaction)};PointerMove.prototype.stop=function(){if(this.inputHandler!==null){var interaction=this;this.subViewer.getCesiumViewer().canvas.removeEventListener("touchmove",interaction);this.inputHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE);this.inputHandler.destroy();this.inputHandler=null} s4.prototype.stop.call(this)};return PointerMove}(GeoFly.OmniViewer.Interaction.s18.Base));s18.PointerMove=PointerMove})(s18=Interaction.s18||(Interaction.s18={}))})(Interaction=OmniViewer.Interaction||(OmniViewer.Interaction={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Interaction;(function(Interaction){var s18;(function(s18){var HoverEntity=(function(s4){__extends(HoverEntity,s4);function HoverEntity(subViewer,entities,onEntityHover){var s6=s4.call(this,subViewer,null)||this;s6.entities=[];s6.onEntityHover=null;var interaction=s6;interaction.setOnMove(function(evt){var scene=interaction.subViewer.getCesiumViewer().scene;var pickedObjects=scene.drillPick(evt.endPosition);for(var i=0;i0){var node=nodesToProcess.shift();if(processCb(node)){node.visited=!0;for(var i=0;i>8)/255.0,g:((color0Raw&2016)>>3)/255.0,b:((color0Raw&31)<<3)/255.0,a:1};var color1={r:((color1Raw&63488)>>8)/255.0,g:((color1Raw&2016)>>3)/255.0,b:((color1Raw&31)<<3)/255.0,a:1};var color2;var color3;if(color0Raw>color1Raw){color2={r:color0.r*(2.0/3.0)+color1.r/3.0,g:color0.g*(2.0/3.0)+color1.g/3.0,b:color0.b*(2.0/3.0)+color1.b/3.0,a:1};color3={r:color0.r/3.0+color1.r*(2.0/3.0),g:color0.g/3.0+color1.g*(2.0/3.0),b:color0.b/3.0+color1.b*(2.0/3.0),a:1}}else{color2={r:color0.r*0.5+color1.r*0.5,g:color0.g*0.5+color1.g*0.5,b:color0.b*0.5+color1.b*0.5,a:1};color3={r:0,g:0,b:0,a:0}} var texelIndexes=[];var mask=49152;for(var i=0;i<8;++i){texelIndexes.push((((indexesRaw>>16)&65535)&(mask>>(i*2)))>>(14-i*2))} for(var i=0;i<8;++i){texelIndexes.push(((indexesRaw&65535)&(mask>>(i*2)))>>(14-i*2))} var block={colors:[color0,color1,color2,color3],texelIndexes:texelIndexes};this.blocks.push(block)};Ktx.prototype.readDxt1=function(bufferView,offset){for(var y=0;y<(this.pixelHeight==0?1:this.pixelHeight*0.25);++y){for(var x=0;x=0?u.x:-u.x);var ay=(u.y>=0?u.y:-u.y);var az=(u.z>=0?u.z:-u.z);if((ax+ay+az)<0.00001){return null} var maxc;if(ax>ay){if(ax>az){maxc=1}else{maxc=3}}else{if(ay>az){maxc=2}else{maxc=3}} var iP=new s76.Vector3(0,0,0);var d1=-this.normal.getDotProduct(this.footPoint);var d2=-plane.normal.getDotProduct(plane.footPoint);switch(maxc){case 1:iP.x=0;iP.y=(d2*this.normal.z-d1*plane.normal.z)/u.x;iP.z=(d1*plane.normal.y-d2*this.normal.y)/u.x;break;case 2:iP.x=(d1*plane.normal.z-d2*this.normal.z)/u.y;iP.y=0;iP.z=(d2*this.normal.x-d1*plane.normal.x)/u.y;break;case 3:iP.x=(d2*this.normal.y-d1*plane.normal.y)/u.z;iP.y=(d1*plane.normal.x-d2*this.normal.x)/u.z;iP.z=0} return new Geometry.Line3(iP,iP.add(u))};Plane.prototype.getIntersectionPoint3Planes=function(plane2,plane3){var plane1=this;var n1=plane1.normal;var n2=plane2.normal;var n3=plane3.normal;var d1=plane1.getDistToPoint(new GeoFly.s76.Vector3(0,0,0));var d2=plane2.getDistToPoint(new GeoFly.s76.Vector3(0,0,0));var d3=plane3.getDistToPoint(new GeoFly.s76.Vector3(0,0,0));return(n2.getCrossProduct(n3).scale(-d1)).subtract(n3.getCrossProduct(n1).scale(d2)).subtract(n1.getCrossProduct(n2).scale(d3)).scale(1.0/n1.getDotProduct(n2.getCrossProduct(n3)))};return Plane}());Geometry.Plane=Plane})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var Vertex=(function(){function Vertex(coord,texCoord,normal,color){this.coord=coord;this.texCoord=texCoord?texCoord:new s76.s77(0,0);this.normal=normal?normal:new s76.Vector3(1,0,0);this.color=color?color:new s76.s78(1,1,1,1)} Vertex.prototype.clone=function(){return new Vertex(this.coord.clone(),this.texCoord.clone(),this.normal.clone(),this.color.clone())};return Vertex}());Geometry.Vertex=Vertex})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var Edge=(function(){function Edge(vertices){this.connecteds30s=[];if(vertices){this.vertices=vertices}} Edge.prototype.setConnecteds30s=function(connecteds30s){this.connecteds30s=connecteds30s};Edge.prototype.addConnecteds30=function(face){this.connecteds30s.push(face)};Edge.prototype.faceIsConnected=function(face){return this.connecteds30s.indexOf(face)!==-1};Edge.prototype.equals=function(edge){return((this.vertices[0].coord.equals(edge.vertices[0].coord)&&this.vertices[1].coord.equals(edge.vertices[1].coord))||(this.vertices[1].coord.equals(edge.vertices[0].coord)&&this.vertices[0].coord.equals(edge.vertices[1].coord)))};Edge.prototype.move=function(delta){this.vertices[0].coord=this.vertices[0].coord.add(delta);this.vertices[1].coord=this.vertices[1].coord.add(delta)};Edge.prototype.getCenter=function(){return this.vertices[0].coord.add(this.vertices[1].coord).scale(0.5)};Edge.prototype.setCenter=function(center){var oldCenter=this.getCenter();this.move(center.subtract(oldCenter))};Edge.prototype.getDistanceToPoint=function(coord){var line=new Geometry.Line3(this.vertices[0].coord,this.vertices[1].coord);var perpendicular=line.getPerpendicular(coord);if(perpendicular.subtract(this.vertices[0].coord).getDotProduct(this.vertices[1].coord.subtract(this.vertices[0].coord))>=0.0&&perpendicular.subtract(this.vertices[1].coord).getDotProduct(this.vertices[0].coord.subtract(this.vertices[1].coord))>=0.0){return line.getDistanceToPoint(coord)} if(perpendicular.subtract(this.vertices[0].coord).getDotProduct(this.vertices[1].coord.subtract(this.vertices[0].coord))<0.0){return this.vertices[0].coord.getDistance(coord)} return this.vertices[1].coord.getDistance(coord)};return Edge}());Geometry.Edge=Edge})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var s30=(function(){function s30(vertices,textures){if(textures===void 0){textures=[]} this.vertices=null;this.normal=null;this.edges=null;this.textures=[];if(vertices){this.vertices=vertices} this.textures=textures} s30.prototype.clone=function(){var vertices=[];for(var i=0;i2)||forceRecompute){var normals=[];for(var i=0;i0){return GeoFly.s76.Vector3.average(coords)} return null};s30.prototype.hasSameEdge=function(face){for(var i=0;i=0)};s30.prototype.getIntersectionPoint=function(line){var ba=line.points[1].subtract(line.points[0]);var nDotA=this.normal.getDotProduct(line.points[0]);var nDotBA=-this.normal.getDotProduct(ba);return line.points[0].add(ba.scale(((nDotA)/nDotBA)))};s30.prototype.lineIntersects=function(line){return this.lineIntersection(line)!==null};s30.prototype.rayIntersection=function(ray){var offset=this.vertices[0].coord;var N=this.getNormal();var NdotRayDirection=N.getDotProduct(ray.direction);if(Math.abs(NdotRayDirection)<0.0000000001){return null} var t=(N.getDotProduct(ray.origin.subtract(offset)))/NdotRayDirection;if(t<0.0){return null} return ray.origin.subtract(offset).subtract(ray.direction.scale(t))};s30.prototype.lineIntersection=function(line){var offset=this.vertices[0].coord;var N=this.getNormal();var P=this.getIntersectionPoint(new Geometry.Line3(line.points[0].subtract(offset),line.points[1].subtract(offset)));for(var i=0;ic?d/b:e/c)}else{sc=(b*e-c*d)/D;tc=(a*e-b*d)/D} var dP=w.add(u.scale(sc)).subtract(v.scale(tc));return dP.getLength()};Line3.prototype.getClosestPoint=function(line){var u=this.points[1].subtract(this.points[0]);var v=line.points[1].subtract(line.points[0]);var w=this.points[0].subtract(line.points[0]);var a=u.getDotProduct(u);var b=u.getDotProduct(v);var c=v.getDotProduct(v);var d=u.getDotProduct(w);var e=v.getDotProduct(w);var D=a*c-b*b;var sc,tc;if(D<0.000001){sc=0.0;tc=(b>c?d/b:e/c)}else{sc=(b*e-c*d)/D;tc=(a*e-b*d)/D} var dP=w.add(u.scale(sc)).subtract(v.scale(tc));return w.add(u.scale(sc))};return Line3}());Geometry.Line3=Line3})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var LineSegment3=(function(s4){__extends(LineSegment3,s4);function LineSegment3(){return s4!==null&&s4.apply(this,arguments)||this} LineSegment3.prototype.getPerpendicular=function(point){var perpendicular=s4.prototype.getPerpendicular.call(this,point);if(this.points[0].subtract(this.points[1]).getDotProduct(perpendicular.subtract(this.points[1]))<0.0){return this.points[1]} if(this.points[1].subtract(this.points[0]).getDotProduct(perpendicular.subtract(this.points[0]))<0.0){return this.points[0]} return perpendicular};return LineSegment3}(Geometry.Line3));Geometry.LineSegment3=LineSegment3})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var s61=(function(){function s61(origin,direction){this.origin=origin;this.direction=direction} s61.prototype.getDistance=function(coord){var line=new Geometry.Line3(this.origin,this.origin.add(this.direction));var perpendicular=line.getPerpendicular(coord);if(perpendicular.subtract(this.origin).getDotProduct(this.direction)>=0){return perpendicular.getDistance(coord)} return this.origin.getDistance(coord)};s61.prototype.getClosestNearestCoordinate=function(coords,weightRatio){var closestDistToRay=Infinity;var closestDistToOrigin=Infinity;var closestCoord=null;for(var i=0;i=0){var distToCoord=perpendicular.getDistance(coords[i]);var distToOrigin=perpendicular.getDistance(this.origin);if(distToCoord+distToOrigin*weightRatio=0){return perpendicular} return this.origin};return s61}());Geometry.s61=s61})(Geometry=s76.Geometry||(s76.Geometry={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var Geometry;(function(Geometry){var Model=(function(){function Model(faces){if(faces===void 0){faces=[]} this.faces=[];this.faces=faces} Model.prototype.recomputeNormals=function(){for(var i=0;i0){var firstEdge=this.edges[0];var objects=[];for(var i=0;i0){var noChangeCounter=0;while(this.edges.length>0&&noChangeCounter<2){var changeDetected=!1;for(var i=this.edges.length-1;i>=0;--i){if(edges.length==0){edges.push(this.edges.splice(i,1)[0])}else{if(this.edges[i].getPoints()[0].getCoord().equals(edges[edges.length-1].getPoints()[1].getCoord())){edges.push(this.edges.splice(i,1)[0]);changeDetected=!0}else{if(this.edges[i].getPoints()[1].getCoord().equals(edges[0].getPoints()[0].getCoord())){edges.unshift(this.edges.splice(i,1)[0]);changeDetected=!0}else{this.edges[i].swapPoints()}}}} if(changeDetected){noChangeCounter=0}else{++noChangeCounter}} if(this.edges.length>0){var nearestEdgeFirst=this.getNearestEdge(edges[0].getPoints()[0].getCoord(),this.edges);var nearestEdgeLast=this.getNearestEdge(edges[edges.length-1].getPoints()[1].getCoord(),this.edges);if(nearestEdgeFirst.dist0){coords.push(this.edges[0].getPoints()[0].getCoord())} for(var i=0;i0.000000000001);return new GeoFly.s76.Vector3(positionX*xMultiplier,positionY*yMultiplier,positionZ*zMultiplier)};Reproject.cartesianToCartographic=function(cartesian){var wgs84OneOverRadii=new GeoFly.s76.Vector3(1.0/6378137.0,1.0/6378137.0,1.0/6356752.3142451793);var wgs84OneOverRadiiSquared=new GeoFly.s76.Vector3(1.0/(6378137.0*6378137.0),1.0/(6378137.0*6378137.0),1.0/(6356752.3142451793*6356752.3142451793));var centerToleranceSquared=0.1;var p=this.scaleToGeodeticSurface(cartesian,wgs84OneOverRadii,wgs84OneOverRadiiSquared,centerToleranceSquared);if(typeof p=="undefined"){return undefined} var n=p.getMultiplyComponents(wgs84OneOverRadiiSquared);n=n.getNormalized();var h=cartesian.subtract(p);var longitude=Math.atan2(n.y,n.x);var latitude=Math.asin(n.z);var height=(h.getDotProduct(cartesian)<0?-1:(h.getDotProduct(cartesian)>0?1:0))*h.getLength();return new GeoFly.s76.Vector3(longitude*180.0/Math.PI,latitude*180.0/Math.PI,height)};Reproject.cartesianFromRadians=function(longitude,latitude,height){if(height===void 0){height=0.0} var radiiSquared=new GeoFly.s76.Vector3(6378137.0*6378137.0,6378137.0*6378137.0,6356752.3142451793*6356752.3142451793);var cosLatitude=Math.cos(latitude);var scratchN=new GeoFly.s76.Vector3(cosLatitude*Math.cos(longitude),cosLatitude*Math.sin(longitude),Math.sin(latitude));scratchN=scratchN.getNormalized();var scratchK=radiiSquared.getMultiplyComponents(scratchN);var gamma=Math.sqrt(scratchN.getDotProduct(scratchK));scratchK=scratchK.scale(1.0/gamma);scratchN=scratchN.scale(height);return scratchK.add(scratchN)};Reproject.cartesianFromDegrees=function(longitude,latitude,height){longitude=longitude/180.0*Math.PI;latitude=latitude/180.0*Math.PI;return Reproject.cartesianFromRadians(longitude,latitude,height)};Reproject.cartographicToCartesian=function(cartographic){return Reproject.cartesianFromDegrees(cartographic.x,cartographic.y,cartographic.z)};return Reproject}());Geography.Reproject=Reproject})(Geography=s76.Geography||(s76.Geography={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var s76;(function(s76){var B3DM;(function(B3DM){var Format;(function(Format){var File=(function(){function File(arrayBuffer,transformationMatrix){this.arrayBuffer=null;this.dataView=null;this.header=null;this.gltfFile=null;this.arrayBuffer=arrayBuffer;this.header=new Format.Header(this);this.gltfFile=new GeoFly.s76.s40.Format.File(this.arrayBuffer.slice(this.header.getHeaderByteLength()),transformationMatrix)} File.prototype.getArrayBuffer=function(){return this.arrayBuffer};File.prototype.getDataView=function(){if(this.dataView==null){this.dataView=new DataView(this.arrayBuffer)} return this.dataView};File.prototype.getHeader=function(){return this.header};File.prototype.gets40File=function(){return this.gltfFile};return File}());Format.File=File})(Format=B3DM.Format||(B3DM.Format={}))})(B3DM=s76.B3DM||(s76.B3DM={}))})(s76=OmniViewer.s76||(OmniViewer.s76={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var s76;(function(s76){var B3DM;(function(B3DM){var Format;(function(Format){var Header=(function(){function Header(file){this.version=null;this.byteLength=null;this.featureTableJsonByteLength=null;this.featureTableBinaryByteLength=null;this.batchTableJsonByteLength=null;this.batchTableBinaryByteLength=null;this.featureTableJsonString=null;this.featureTableBinaryString=null;this.batchTableJsonString=null;this.batchTableBinaryString=null;this.headerByteLength=null;this.gltf=null;var arrayBuffer=file.getArrayBuffer();var dataView=file.getDataView();var offset=Uint32Array.BYTES_PER_ELEMENT;this.version=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.byteLength=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.featureTableJsonByteLength=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.featureTableBinaryByteLength=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.batchTableJsonByteLength=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.batchTableBinaryByteLength=dataView.getUint32(offset,!0);offset+=Uint32Array.BYTES_PER_ELEMENT;this.featureTableJsonString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer.slice(offset,offset+this.featureTableJsonByteLength)));offset+=this.featureTableJsonByteLength;this.featureTableBinaryString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer.slice(offset,offset+this.featureTableBinaryByteLength)));offset+=this.featureTableBinaryByteLength;this.batchTableJsonString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer.slice(offset,offset+this.batchTableJsonByteLength)));offset+=this.batchTableJsonByteLength;this.batchTableBinaryString=String.fromCharCode.apply(null,new Uint8Array(arrayBuffer.slice(offset,offset+this.batchTableBinaryByteLength)));offset+=this.batchTableBinaryByteLength;this.headerByteLength=offset} Header.prototype.getHeaderByteLength=function(){return this.headerByteLength};return Header}());Format.Header=Header})(Format=B3DM.Format||(B3DM.Format={}))})(B3DM=s76.B3DM||(s76.B3DM={}))})(s76=OmniViewer.s76||(OmniViewer.s76={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var s76;(function(s76){var B3DM;(function(B3DM){var Reader=(function(){function Reader(){this.url=null} Reader.prototype.load=function(url,transformationMatrix,onLoad){this.url=url;var resource=new Cesium.Resource({url:url});resource.fetchArrayBuffer().then(function(arrayBuffer){onLoad(new B3DM.Format.File(arrayBuffer,transformationMatrix))})};return Reader}());B3DM.Reader=Reader})(B3DM=s76.B3DM||(s76.B3DM={}))})(s76=OmniViewer.s76||(OmniViewer.s76={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var s40;(function(s40){var Format;(function(Format){var BaseElement=(function(){function BaseElement(contentJson,parentFile){this.contentJson=null;this.parentFile=null;this.contentJson=contentJson;this.parentFile=parentFile} return BaseElement}());Format.BaseElement=BaseElement})(Format=s40.Format||(s40.Format={}))})(s40=s76.s40||(s76.s40={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var s76;(function(s76){var s40;(function(s40){var Format;(function(Format){var File=(function(){function File(arrayBuffer,transformationMatrix){this.arrayBuffer=null;this.dataView=null;this.header=null;this.binarys40Extension=null;this.contentJson=null;this.asset=null;this.accessors=null;this.buffers=null;this.bufferViews=null;this.scene=null;this.transformationMatrix=null;this.arrayBuffer=arrayBuffer;this.header=new Format.Header(this);this.binarys40Extension=new Format.Extension.KhrBinarys40(this.header,this.getDataView(),arrayBuffer);this.contentJson=JSON.parse(this.binarys40Extension.getContent());this.asset=new Format.Asset(this.contentJson);this.scene=new Format.Scene(this.contentJson,this,this.contentJson.scenes[this.contentJson.scene]);this.transformationMatrix=transformationMatrix} File.prototype.getArrayBuffer=function(){return this.arrayBuffer};File.prototype.getDataView=function(){if(this.dataView==null){this.dataView=new DataView(this.arrayBuffer)} return this.dataView};File.prototype.getHeader=function(){return this.header};File.prototype.getScene=function(){return this.scene};File.prototype.getTransformationMatrix=function(){return this.transformationMatrix};File.prototype.gets11s=function(){if(this.accessors==null){this.accessors=[];for(var i=0;i0){var tileToProcess=tilesToProcess.shift();this.traverse(tileToProcess,function(tile){if(tile.intersectss16(boundingVolume)){if(tile.contentIsLoaded()){if(tile.getChildren().length==0){traverser.leafTiles.push(tile)}else{for(var i=0;i0){var link=new s74_1.Link(this.tools[this.tools.length-1],tool);this.addLink(link)} this.tools.push(tool)};s74.prototype.removeAllTools=function(){this.tools=[];this.links=[]};s74.prototype.addLink=function(link){this.links.push(link)};s74.prototype.getOutLinks=function(tool){var links=[];for(var i=0;i0){this.totalTimeStart=new Date().getTime();root=this.tools[0];this.toolsProcessed=0;if(this.onStartProgress!==null){this.onStartProgress()}} console.log("run tool",root);setTimeout(function(){var timeToolStart=new Date().getTime();root.run(inputData,function(data){console.log("tool process duration:",(new Date().getTime()-timeToolStart),"ms");++chain.toolsProcessed;if(chain.onUpdateProgress!==null){chain.onUpdateProgress(chain.toolsProcessed/chain.tools.length)} var links=chain.getOutLinks(root);console.log("out links",links);if(links.length==0){console.log("total process duration:",(new Date().getTime()-chain.totalTimeStart),"ms");onFinish(data);if(chain.onEndProgress!==null){chain.onEndProgress()} return} for(var i=0;i0){this.cityModel=new CityGml.CityModel({xml:this,parentNode:null,buildings:options.buildings,srsName:options.srsName})}} CityGmlDocument.prototype.getNode=function(){return this.document};CityGmlDocument.prototype.getCityModel=function(){return this.cityModel};CityGmlDocument.prototype.getDocument=function(){return this.document};CityGmlDocument.prototype.getNS=function(){return"http://www.opengis.net/citygml/building/2.0"};CityGmlDocument.prototype.getText=function(){console.log(this.document);return''+new XMLSerializer().serializeToString(this.document)};CityGmlDocument.prototype.getBuildingsFromXml=function(xml,cesiumViewer){this.document=xml;var models=[];for(var i=0;i0){var cityObjectMember=new CityGml.CityObjectMember({xml:options.xml,parentNode:s6,buildings:options.buildings,srsName:options.srsName});s6.cityObjectMembers.push(cityObjectMember);var appearanceMember=new CityGml.app.AppearanceMember({xml:options.xml,parentNode:s6,buildings:options.buildings});s6.appAppearanceMembers.push(appearanceMember)} return s6} CityModel.prototype.getBuildingsFromXml=function(cesiumViewer){var cityObjectMembers=[];for(var i=0;i0){for(var i=0;i0&&options.face.getTextures()[0].fileName!==null){s6.node.textContent=options.face.getTextures()[0].fileName} return s6} return ImageUri}(CityGml.s82));ImageUri.tagName="app:imageURI";app.ImageUri=ImageUri})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var MimeType=(function(s4){__extends(MimeType,s4);function MimeType(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(MimeType.tagName);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} if(options.face.getTextures()[0]instanceof GeoFly.s76.Image.Format.Png){s6.node.textContent="image/png"} return s6} return MimeType}(CityGml.s82));MimeType.tagName="app:mimeType";app.MimeType=MimeType})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var ParameterizedTexture=(function(s4){__extends(ParameterizedTexture,s4);function ParameterizedTexture(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;s6.imageUri=null;s6.mimeType=null;s6.target=null;if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(ParameterizedTexture.tagName);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} s6.imageUri=new app.ImageUri({xml:options.xml,parentNode:s6,face:options.face});s6.mimeType=new app.MimeType({xml:options.xml,parentNode:s6,face:options.face});s6.target=new app.Target({xml:options.xml,parentNode:s6,id:options.id,face:options.face});return s6} return ParameterizedTexture}(CityGml.s82));ParameterizedTexture.tagName="app:ParameterizedTexture";app.ParameterizedTexture=ParameterizedTexture})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var SurfaceDataMember=(function(s4){__extends(SurfaceDataMember,s4);function SurfaceDataMember(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;s6.parameterizedTextures=[];if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(SurfaceDataMember.tagName);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} var parameterizedTexture=new app.ParameterizedTexture({xml:options.xml,parentNode:s6,id:options.id,face:options.face});s6.parameterizedTextures.push(parameterizedTexture);return s6} return SurfaceDataMember}(CityGml.s82));SurfaceDataMember.tagName="app:surfaceDataMember";app.SurfaceDataMember=SurfaceDataMember})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var Target=(function(s4){__extends(Target,s4);function Target(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;s6.texCoordList=null;if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(Target.tagName);var attr=document.createAttribute("uri");attr.value="#"+options.id;s6.node.attributes.setNamedItem(attr);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} s6.texCoordList=new app.TexCoordList({xml:options.xml,parentNode:s6,id:options.id,face:options.face});return s6} return Target}(CityGml.s82));Target.tagName="app:target";app.Target=Target})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var TexCoordList=(function(s4){__extends(TexCoordList,s4);function TexCoordList(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;s6.textureCoordinates=null;if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(TexCoordList.tagName);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} s6.textureCoordinates=new app.TextureCoordinates({xml:options.xml,parentNode:s6,id:options.id,face:options.face});return s6} return TexCoordList}(CityGml.s82));TexCoordList.tagName="app:TexCoordList";app.TexCoordList=TexCoordList})(app=CityGml.app||(CityGml.app={}))})(CityGml=s76.CityGml||(s76.CityGml={}))})(s76=GeoFly.s76||(GeoFly.s76={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var s76;(function(s76){var CityGml;(function(CityGml){var app;(function(app){var TextureCoordinates=(function(s4){__extends(TextureCoordinates,s4);function TextureCoordinates(options){var s6=s4.call(this,options.xml,options.parentNode)||this;s6.options=null;if(typeof options.node=="undefined"||options.node==null){s6.node=options.xml.getDocument().createElement(TextureCoordinates.tagName);var attr=document.createAttribute("ring");attr.value="#"+options.id+"_ring";s6.node.attributes.setNamedItem(attr);options.parentNode.getNode().appendChild(s6.node)}else{s6.node=options.node} var coords=[];for(var i=0;i=0;--i){if(this.elements[i]==element){this.elements[i].getSurface().removeFromCesiumViewer();this.elements.splice(i,1);break}}} this.parentBuilding.triggerHierarchyChanged()};Base.prototype.removeAllElements=function(removeFromCesiumViewer){if(removeFromCesiumViewer===void 0){removeFromCesiumViewer=!0} if(removeFromCesiumViewer){for(var i=0;i=1;--i){verticess301.push(vertices[i])}} for(var i=maxIndex;i=1;--i){verticess302.push(vertices[i])}} this.surface.vertices.length=0;for(var i=0;i=0;--j){if(!matchingSubViewers[j].subViewer.dataSourceIsSupported(datasources[i])){matchingSubViewers.splice(j,1)}}} for(var i=0;ib.rating?-1:1)});if(matchingSubViewers.length>0){return matchingSubViewers[0].subViewer} return null};Viewer.prototype.addDatasource=function(datasource,insertIndex){if(insertIndex===void 0){insertIndex=-1} this.datasources.push(datasource);if(this.activeSubViewer!==null&&(this.activeSubViewer.dataSourceIsSupported(datasource))){this.activeSubViewer.addDatasource(datasource,insertIndex)}else{var matchingSubViewer=this.getMatchingSubViewer([datasource]);if(matchingSubViewer!==null){this.activateSubviewer(matchingSubViewer.getName())}} $(this).trigger("addedDatasource",[datasource])};Viewer.prototype.removeDatasource=function(datasource){for(var i=0;i=0;--i){if(this.datasources[i]==datasource){this.datasources.splice(i,1)}} $(this).trigger("removedDatasource",[datasource])};Viewer.prototype.addDatasources=function(datasources,insertIndex){if(insertIndex===void 0){insertIndex=-1} for(var i=0;i=0;--i){if(this.connectors[i].getDatasource()==datasource){this.connectors[i].disconnect();this.connectors.splice(i,1)}}};s10.prototype.showDatasource=function(datasource){for(var i=0;i=maxZoom){onFinish()}else{subViewer.loadTerrain(terrainPositions,++zoom,maxZoom,onFinish)}})};s18.prototype.sets81=function(viewport){var subViewer=this;if(viewport.centerLon!==null&&viewport.centerLat!==null){if(viewport.heading==null){viewport.heading=0} if(viewport.pitch==null){viewport.pitch=90} var camDist=300;var promise=Cesium.sampleTerrain(this.terrainProvider,12,[new Cesium.Cartographic(viewport.centerLon/(180.0/Math.PI),viewport.centerLat/(180.0/Math.PI))]);Cesium.when(promise,function(updatedPositions){camDist=updatedPositions[0].height+300;var posOffset={x:-camDist*Math.tan((90-viewport.pitch)/(180.0/Math.PI))*0.000010*Math.sin(viewport.heading/(180.0/Math.PI)),y:-camDist*Math.tan((90-viewport.pitch)/(180.0/Math.PI))*0.000006*Math.cos(viewport.heading/(180.0/Math.PI))};var pos=Cesium.Cartesian3.fromDegrees(viewport.centerLon+posOffset.x,viewport.centerLat+posOffset.y,camDist);subViewer.cesiumViewer.terrainProvider=subViewer.ellipsoidTerrainProvider;subViewer.loadTerrain(subViewer.createGrid(viewport.centerLon,viewport.centerLat,0.0005),0,14,function(){subViewer.cesiumViewer.terrainProvider=subViewer.terrainProvider;subViewer.cesiumViewer.scene.camera.flyTo({destination:pos,duration:0,orientation:new Cesium.HeadingPitchRange(viewport.heading/(180.0/Math.PI),-viewport.pitch/(180.0/Math.PI),camDist)})});subViewer.cesiumViewer.scene.camera.flyTo({destination:pos,duration:0,orientation:new Cesium.HeadingPitchRange(viewport.heading/(180.0/Math.PI),-viewport.pitch/(180.0/Math.PI),camDist)});subViewer.terrainLoaded=!0})}else{this.cesiumViewer.camera.setView({destination:Cesium.Rectangle.fromDegrees(viewport.minLon,viewport.minLat,viewport.maxLon,viewport.maxLat),});this.cesiumViewer.scene.camera.lookUp(viewport.pitch/(180.0/Math.PI))}};s18.prototype.updateSize=function(){this.cesiumViewer.resize()};s18.prototype.createGrid=function(lon,lat,rectangleHalfSize){var gridWidth=41;var gridHeight=41;var targetLatitude=Cesium.Math.toRadians(lat);var targetLongitude=Cesium.Math.toRadians(lon);var e=new Cesium.Rectangle(targetLongitude-rectangleHalfSize,targetLatitude-rectangleHalfSize,targetLongitude+rectangleHalfSize,targetLatitude+rectangleHalfSize);var terrainSamplePositions=[];for(var y=0;y=0;--i){this.modifiers[i].stop()} this.modifiers=[]};Base.prototype.push=function(modifier){var manager=this;this.modifiers.push(modifier);var onData=modifier.getOptions().onData;var onFinish=modifier.getOptions().onFinish;modifier.getOptions().onData=function(data){if(onData){onData(data)} if(modifier.getOptions().finishOnData){setTimeout(function(){modifier.getOptions().onFinish()},1)}};modifier.getOptions().onFinish=function(){if(onFinish){onFinish()} manager.pop(modifier)};modifier.start()};Base.prototype.pop=function(modifier){var modifierIndex=-1;for(var i=0;i=modifierIndex;--i){this.modifiers[i].stop()} if(modifierIndex>0){this.modifiers=this.modifiers.slice(0,modifierIndex-1)}else{this.modifiers=[]}}};return Base}());Manager.Base=Base})(Manager=Modifier.Manager||(Modifier.Manager={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Manager;(function(Manager){var OpenLayers=(function(s4){__extends(OpenLayers,s4);function OpenLayers(){return s4!==null&&s4.apply(this,arguments)||this} return OpenLayers}(GeoFly.OmniViewer.SubViewer.Modifier.Manager.Base));Manager.OpenLayers=OpenLayers})(Manager=Modifier.Manager||(Modifier.Manager={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Manager;(function(Manager){var Oblique=(function(s4){__extends(Oblique,s4);function Oblique(){return s4!==null&&s4.apply(this,arguments)||this} return Oblique}(GeoFly.OmniViewer.SubViewer.Modifier.Manager.Base));Manager.Oblique=Oblique})(Manager=Modifier.Manager||(Modifier.Manager={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Manager;(function(Manager){var s18=(function(s4){__extends(s18,s4);function s18(){return s4!==null&&s4.apply(this,arguments)||this} return s18}(GeoFly.OmniViewer.SubViewer.Modifier.Manager.Base));Manager.s18=s18})(Manager=Modifier.Manager||(Modifier.Manager={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Base=(function(){function Base(options,subViewer){this.options=null;this.subViewer=null;this.options=options;this.subViewer=subViewer} Base.prototype.getOptions=function(){return this.options};Base.prototype.pause=function(){if(this.options.onPause){this.options.onPause()}};Base.prototype.resume=function(){if(this.options.onResume){this.options.onResume()}};Base.prototype.data=function(data){if(this.options.onFinish){this.options.onData(data)}};Base.prototype.finish=function(){if(this.options.onFinish){this.options.onFinish()}};return Base}());Modifier.Base=Base})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Pointer;(function(Pointer){var PickLonLat;(function(PickLonLat){var Base=(function(s4){__extends(Base,s4);function Base(){return s4!==null&&s4.apply(this,arguments)||this} return Base}(GeoFly.OmniViewer.SubViewer.Modifier.Base));PickLonLat.Base=Base})(PickLonLat=Pointer.PickLonLat||(Pointer.PickLonLat={}))})(Pointer=Modifier.Pointer||(Modifier.Pointer={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Pointer;(function(Pointer){var PickLonLat;(function(PickLonLat){var OpenLayers=(function(s4){__extends(OpenLayers,s4);function OpenLayers(options,subViewer){var s6=s4.call(this,options,subViewer)||this;s6.subViewer=subViewer;return s6} OpenLayers.prototype.start=function(){var modifier=this;this.subViewer.getMap().on('click',modifier.processMapClick,modifier)};OpenLayers.prototype.stop=function(){var modifier=this;this.subViewer.getMap().un('click',modifier.processMapClick,modifier)};OpenLayers.prototype.processMapClick=function(evt){var coord=this.subViewer.toLonLat(evt.coordinate);this.data({lon:coord[0],lat:coord[1]})};return OpenLayers}(GeoFly.OmniViewer.SubViewer.Modifier.Pointer.PickLonLat.Base));PickLonLat.OpenLayers=OpenLayers})(PickLonLat=Pointer.PickLonLat||(Pointer.PickLonLat={}))})(Pointer=Modifier.Pointer||(Modifier.Pointer={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Pointer;(function(Pointer){var PickLonLat;(function(PickLonLat){var Oblique=(function(s4){__extends(Oblique,s4);function Oblique(options,subViewer){var s6=s4.call(this,options,subViewer)||this;s6.subViewer=subViewer;return s6} Oblique.prototype.start=function(){var modifier=this;this.subViewer.getMap().on('click',modifier.processMapClick,modifier)};Oblique.prototype.stop=function(){var modifier=this;this.subViewer.getMap().un('click',modifier.processMapClick,modifier)};Oblique.prototype.processMapClick=function(evt){var coord=this.subViewer.toLonLat(evt.coordinate);this.data({lon:coord[0],lat:coord[1]})};return Oblique}(GeoFly.OmniViewer.SubViewer.Modifier.Pointer.PickLonLat.Base));PickLonLat.Oblique=Oblique})(PickLonLat=Pointer.PickLonLat||(Pointer.PickLonLat={}))})(Pointer=Modifier.Pointer||(Modifier.Pointer={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Pointer;(function(Pointer){var PickLonLat;(function(PickLonLat){var s18=(function(s4){__extends(s18,s4);function s18(options,subViewer){var s6=s4.call(this,options,subViewer)||this;s6.clickHandler=null;s6.subViewer=subViewer;return s6} s18.prototype.start=function(){var modifier=this;this.clickHandler=new Cesium.ScreenSpaceEventHandler(this.subViewer.getCesiumViewer().scene.canvas);this.clickHandler.setInputAction(function(movement){var pickPosition=modifier.subViewer.getLonLatFromMouseCoordinate(movement.position.x,movement.position.y);if(pickPosition){modifier.data({lon:pickPosition.longitude,lat:pickPosition.latitude})}},Cesium.ScreenSpaceEventType.LEFT_CLICK)};s18.prototype.stop=function(){this.clickHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK)};return s18}(GeoFly.OmniViewer.SubViewer.Modifier.Pointer.PickLonLat.Base));PickLonLat.s18=s18})(PickLonLat=Pointer.PickLonLat||(Pointer.PickLonLat={}))})(Pointer=Modifier.Pointer||(Modifier.Pointer={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Point;(function(Point){var Edit;(function(Edit){var Base=(function(s4){__extends(Base,s4);function Base(){return s4!==null&&s4.apply(this,arguments)||this} return Base}(GeoFly.OmniViewer.SubViewer.Modifier.Base));Edit.Base=Base})(Edit=Point.Edit||(Point.Edit={}))})(Point=Modifier.Point||(Modifier.Point={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Point;(function(Point){var Edit;(function(Edit){var OpenLayers=(function(s4){__extends(OpenLayers,s4);function OpenLayers(options,subViewer){var s6=s4.call(this,options,subViewer)||this;s6.interaction=null;s6.subViewer=subViewer;return s6} OpenLayers.prototype.start=function(){var modifier=this;this.interaction=new ol.interaction.Modify({features:this.options.features,style:null,deleteCondition:function(event){return ol.events.condition.shiftKeyOnly(event)&&ol.events.condition.singleClick(event)}});this.interaction.on("modifyend",modifier.processEditFeature,modifier);this.subViewer.getMap().addInteraction(this.interaction)};OpenLayers.prototype.stop=function(){var modifier=this;this.interaction.un("modifyend",modifier.processEditFeature,modifier);if(this.interaction!==null){this.subViewer.getMap().removeInteraction(this.interaction);this.interaction=null}};OpenLayers.prototype.processEditFeature=function(evt){this.data(evt.features)};return OpenLayers}(GeoFly.OmniViewer.SubViewer.Modifier.Point.Edit.Base));Edit.OpenLayers=OpenLayers})(Edit=Point.Edit||(Point.Edit={}))})(Point=Modifier.Point||(Modifier.Point={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Polygon;(function(Polygon){var Create;(function(Create){var Base=(function(s4){__extends(Base,s4);function Base(){return s4!==null&&s4.apply(this,arguments)||this} return Base}(GeoFly.OmniViewer.SubViewer.Modifier.Base));Create.Base=Base})(Create=Polygon.Create||(Polygon.Create={}))})(Polygon=Modifier.Polygon||(Modifier.Polygon={}))})(Modifier=SubViewer.Modifier||(SubViewer.Modifier={}))})(SubViewer=OmniViewer.SubViewer||(OmniViewer.SubViewer={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var SubViewer;(function(SubViewer){var Modifier;(function(Modifier){var Polygon;(function(Polygon){var Create;(function(Create){var OpenLayers=(function(s4){__extends(OpenLayers,s4);function OpenLayers(options,subViewer){var s6=s4.call(this,options,subViewer)||this;s6.interaction=null;s6.subViewer=subViewer;return s6} OpenLayers.prototype.start=function(){var modifier=this;this.options.vectorLayer.getSource().on("addfeature",modifier.processAddFeature,modifier);this.interaction=new ol.interaction.Draw({type:"Polygon",source:this.options.vectorLayer.getSource()});this.subViewer.getMap().addInteraction(this.interaction)};OpenLayers.prototype.stop=function(){var modifier=this;if(this.interaction!==null){this.subViewer.getMap().removeInteraction(this.interaction);this.interaction=null} this.options.vectorLayer.getSource().un("addfeature",modifier.processAddFeature,modifier)};OpenLayers.prototype.processAddFeature=function(evt){var coords=[];var coordinates=evt.feature.getGeometry().getCoordinates();for(var i=0;i1000?(measurement/1000).toFixed(2)+'km':measurement.toFixed(2)+'m'}else{measurementFormatted=measurement>1000000?(measurement/1000000).toFixed(2)+'km²':measurement.toFixed(2)+'m²'} plugin.measureTooltipElement.innerHTML=(measurementFormatted);plugin.measureTooltip.setPosition(tooltipCoord)})});map.addLayer(this.vectorLayer);this.createMeasureTooltip();map.addInteraction(this.interaction)};Plugin.prototype.stop=function(){var map=this.getMap();if(this.interaction!==null){map.removeInteraction(this.interaction);this.interaction=null} if(this.vectorLayer!==null){map.getLayers().remove(this.vectorLayer);this.vectorLayer=null} if(this.measureTooltipElement){this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement);this.measureTooltipElement=null} s4.prototype.stop.call(this)};Plugin.prototype.createMeasureTooltip=function(){this.measureTooltipElement=document.createElement('div');this.measureTooltipElement.className='tooltip tooltip-measure';this.measureTooltip=new ol.Overlay({element:this.measureTooltipElement,offset:[0,-15],positioning:'bottom-center'});this.getMap().addOverlay(this.measureTooltip)};Plugin.prototype.getLineStringLength=function(lineString){var len=0;var transformedGeometry=lineString.clone().transform(this.getMap().getView().getProjection(),"EPSG:4326");this.options.coordinates=transformedGeometry.getCoordinates();for(var i=0;i0){this.interaction.extend(feature);this.interaction.finishDrawing()}};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=Measure.OpenLayers||(Measure.OpenLayers={}))})(Measure=Plugin_1.Measure||(Plugin_1.Measure={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var Measure;(function(Measure){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.start=function(options){s4.prototype.start.call(this,options);this.subViewer.updateTransformationParams()};Plugin.prototype.getLineStringLength=function(lineString){var transformedGeometry=lineString.clone().transform(this.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");this.options.coordinates=transformedGeometry.getCoordinates();return s4.prototype.getLineStringLength.call(this,transformedGeometry.clone().transform("EPSG:4326","EPSG:3857"))};return Plugin}(GeoFly.OmniViewer.Plugin.Measure.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=Measure.Oblique||(Measure.Oblique={}))})(Measure=Plugin_1.Measure||(Plugin_1.Measure={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var MeasureArea;(function(MeasureArea){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="MeasureArea";s6.geometryType="Polygon";return s6} Plugin.prototype.getOptions=function(){return this.options};Plugin.prototype.start=function(options){s4.prototype.start.call(this,GeoFly.OmniViewer.Util.getMergedOptions({coordinates:[]},options))};Plugin.prototype.setSyncData=function(data){var coords=[];if(typeof data.options.areaCoordinates!=="undefined"){for(var i=0;i1000?(measurement/1000).toFixed(2)+'km':measurement.toFixed(2)+'m';plugin.measureTooltipElement.innerHTML=(measurementFormatted);plugin.measureTooltip.setPosition(tooltipCoord)})});this.interaction.on('drawend',function(event){var geometry=event.feature.getGeometry().clone();plugin.options.height=plugin.getHeight(geometry)});map.addLayer(this.vectorLayer);this.createMeasureTooltip();map.addInteraction(this.interaction);this.subViewer.updateTransformationParams();$(this.subViewer).on("onUpdateTransformInfo",function(){plugin.rebuildGeometry()})};Plugin.prototype.stop=function(){var map=this.getMap();if(this.interaction!==null){map.removeInteraction(this.interaction);this.interaction=null} if(this.vectorLayer!==null){map.getLayers().remove(this.vectorLayer);this.vectorLayer=null} if(this.measureTooltipElement){this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement);this.measureTooltipElement=null} s4.prototype.stop.call(this)};Plugin.prototype.rebuildGeometry=function(){var coords=[];if(this.options.coordinates.length>0){var height=this.options.height;var coord0=this.options.coordinates[0];coords.push(ol.proj.transform(coord0,"EPSG:4326",this.subViewer.getProjection().getCustomProjectionId()));if(height!==null){coords.push(ol.proj.transform(this.get3DLonLatFromLonLat(coord0,height),"EPSG:4326",this.subViewer.getProjection().getCustomProjectionId()))} var feature=new ol.Feature({geometry:new ol.geom.LineString(coords)});if(this.interaction!==null){this.interaction.extend(feature);if(height!==null){this.interaction.finishDrawing()}} this.options.height=height;this.options.coordinates[0]=coord0}};Plugin.prototype.createMeasureTooltip=function(){this.measureTooltipElement=document.createElement('div');this.measureTooltipElement.className='tooltip tooltip-measure';this.measureTooltip=new ol.Overlay({element:this.measureTooltipElement,offset:[0,-15],positioning:'bottom-center'});this.getMap().addOverlay(this.measureTooltip)};Plugin.prototype.deg2rad=function(deg){return deg*Math.PI/180};Plugin.prototype.getHeight=function(geometry){var transformedGeometry=geometry.clone().transform(this.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");var points=transformedGeometry.getCoordinates();var viewPortPx=this.getMap().getPixelFromCoordinate(ol.proj.transform(points[0],"EPSG:4326",this.subViewer.getProjection().getCustomProjectionId()));var initialCompareHeight=50.0;var lonLatTmp=this.get3DLonLatFromViewPortPx(viewPortPx,initialCompareHeight);var orthoVector=[lonLatTmp[0]-points[0][0],lonLatTmp[1]-points[0][1]];var orthoVectorLength=Math.sqrt(orthoVector[0]*orthoVector[0]+orthoVector[1]*orthoVector[1]);if(orthoVectorLength==0){return 0} var orthoVectorNorm=[orthoVector[0]/orthoVectorLength,orthoVector[1]/orthoVectorLength];var mouseVector=[points[1][0]-points[0][0],points[1][1]-points[0][1]];var mouseVectorLength=Math.sqrt(mouseVector[0]*mouseVector[0]+mouseVector[1]*mouseVector[1]);if(mouseVectorLength==0){return 0} var mouseVectorNorm=[mouseVector[0]/mouseVectorLength,mouseVector[1]/mouseVectorLength];var scale=orthoVectorNorm[0]*mouseVectorNorm[0]+orthoVectorNorm[1]*mouseVectorNorm[1];scale*=(mouseVectorLength/orthoVectorLength);points[1]=[points[0][0]+scale*orthoVector[0],points[0][1]+scale*orthoVector[1]];transformedGeometry.setCoordinates(points);transformedGeometry.transform("EPSG:4326",this.subViewer.getProjection().getCustomProjectionId());this.internalChange=!0;geometry.setCoordinates(transformedGeometry.getCoordinates());this.internalChange=!1;return initialCompareHeight*scale};Plugin.prototype.getLonLatFromViewPortPx=function(viewPortCoord){return ol.proj.transform(this.getMap().getCoordinateFromPixel(viewPortCoord),this.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326")};Plugin.prototype.generate3DMatrix=function(omega,phi,kappa,rotationsreihenfolge){if(rotationsreihenfolge==='POK'){return{r11:Math.cos(phi)*Math.cos(kappa)+Math.sin(omega)*Math.sin(phi)*Math.sin(kappa),r12:-Math.cos(phi)*Math.sin(kappa)+Math.sin(omega)*Math.sin(phi)*Math.cos(kappa),r13:Math.cos(omega)*Math.sin(phi),r21:Math.cos(omega)*Math.sin(kappa),r22:Math.cos(omega)*Math.cos(kappa),r23:-Math.sin(omega),r31:-Math.sin(phi)*Math.cos(kappa)+Math.sin(omega)*Math.cos(phi)*Math.sin(kappa),r32:Math.sin(phi)*Math.sin(kappa)+Math.sin(omega)*Math.cos(phi)*Math.cos(kappa),r33:Math.cos(omega)*Math.cos(phi)}}else{return{r11:Math.cos(phi)*Math.cos(kappa),r12:-Math.cos(phi)*Math.sin(kappa),r13:Math.sin(phi),r21:Math.cos(omega)*Math.sin(kappa)+Math.sin(omega)*Math.sin(phi)*Math.cos(kappa),r22:Math.cos(omega)*Math.cos(kappa)-Math.sin(omega)*Math.sin(phi)*Math.sin(kappa),r23:-Math.sin(omega)*Math.cos(phi),r31:Math.sin(omega)*Math.sin(kappa)-Math.cos(omega)*Math.sin(phi)*Math.cos(kappa),r32:Math.sin(omega)*Math.cos(kappa)+Math.cos(omega)*Math.sin(phi)*Math.sin(kappa),r33:Math.cos(omega)*Math.cos(phi)}}};Plugin.prototype.get3DLonLatFromLonLat=function(lonLat,height){var bildPixel=this.transform3DLatLngToPixel(lonLat,0);return this.transform3DPixelToLatLng(bildPixel,height)};Plugin.prototype.get3DLonLatFromViewPortPx=function(viewPortPx,height){var lonLat=this.getLonLatFromViewPortPx(viewPortPx);var bildPixel=this.transform3DLatLngToPixel(lonLat,0);return this.transform3DPixelToLatLng(bildPixel,height)};Plugin.prototype.transform3DPixelToLatLng=function(px,height){var omega=this.subViewer.getProjection().getTransformationInfo().transformationParams.roll;var phi=this.subViewer.getProjection().getTransformationInfo().transformationParams.decline;var kappa=this.subViewer.getProjection().getTransformationInfo().transformationParams.bearing;height*=-1.0;var erg=this.generate3DMatrix(this.deg2rad(omega),this.deg2rad(phi),this.deg2rad(kappa),'POK');var result=[this.subViewer.getProjection().getTransformationInfo().transformationParams.lon+(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt)*(erg.r11*(px[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppx)+erg.r12*(px[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppy)-erg.r13*this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen)/(erg.r31*(px[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppx)+erg.r32*(px[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppy)-erg.r33*this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen),this.subViewer.getProjection().getTransformationInfo().transformationParams.lat+(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt)*(erg.r21*(px[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppx)+erg.r22*(px[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppy)-erg.r23*this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen)/(erg.r31*(px[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppx)+erg.r32*(px[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.ppy)-erg.r33*this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen)];return result};Plugin.prototype.transform3DLatLngToPixel=function(lonLat,height){var omega=this.subViewer.getProjection().getTransformationInfo().transformationParams.roll;var phi=this.subViewer.getProjection().getTransformationInfo().transformationParams.decline;var kappa=this.subViewer.getProjection().getTransformationInfo().transformationParams.bearing;var erg=this.generate3DMatrix(this.deg2rad(omega),this.deg2rad(phi),this.deg2rad(kappa),'POK');return[this.subViewer.getProjection().getTransformationInfo().transformationParams.ppx-this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen*(erg.r11*(lonLat[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lon)+erg.r21*(lonLat[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lat)+erg.r31*(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt))/(erg.r13*(lonLat[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lon)+erg.r23*(lonLat[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lat)+erg.r33*(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt)),this.subViewer.getProjection().getTransformationInfo().transformationParams.ppy-this.subViewer.getProjection().getTransformationInfo().transformationParams.focallen*(erg.r12*(lonLat[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lon)+erg.r22*(lonLat[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lat)+erg.r32*(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt))/(erg.r13*(lonLat[0]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lon)+erg.r23*(lonLat[1]-this.subViewer.getProjection().getTransformationInfo().transformationParams.lat)+erg.r33*(height-this.subViewer.getProjection().getTransformationInfo().transformationParams.alt))]};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=MeasureHeight.Oblique||(MeasureHeight.Oblique={}))})(MeasureHeight=Plugin_1.MeasureHeight||(Plugin_1.MeasureHeight={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s69;(function(s69){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(subViewer){var s6=s4.call(this,subViewer)||this;s6.name="s69";s6.frame=null;s6.divMain=null;s6.onFrameChanged=null;return s6} Plugin.prototype.getFrame=function(){return this.frame};Plugin.prototype.setOnFrameChanged=function(onFrameChanged){this.onFrameChanged=onFrameChanged};Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);this.divMain=document.createElement("div");this.subViewer.getMainDiv().appendChild(this.divMain);this.frame=new GeoFly.OmniViewer.Plugin.s69.OpenLayers.Frame(this,this.divMain,this.onFrameChanged);this.running=!0};Plugin.prototype.stop=function(){if(this.frame!==null){this.frame.deinit();this.frame=null} if(this.divMain!==null){this.subViewer.getMainDiv().removeChild(this.divMain);this.divMain=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=s69.OpenLayers||(s69.OpenLayers={}))})(s69=Plugin_1.s69||(Plugin_1.s69={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s69;(function(s69){var OpenLayers;(function(OpenLayers){var Frame=(function(){function Frame(plugin,divMain,onFrameChanged){if(onFrameChanged===void 0){onFrameChanged=null} this.plugin=null;this.frameSize={width:1000,height:1000};this.ratio=-1;this.borderX=50;this.borderY=40;this.imgWidth=62;this.imgHeight=62;this.imgBorderX=11;this.imgBorderY=11;this.minGroundResolution=0.03;this.maxGroundResolution=156543.03392804096;this.defaultMinGroundResolution=0.03;this.defaultMaxGroundResolution=156543.03392804096;this.resultImageWidth=1000;this.resultImageHeight=1000;this.minFrameWidth=51;this.minFrameHeight=51;this.maxFrameWidth=10000;this.maxFrameHeight=10000;this.resulutionScaleMercatorRealApprox=1.6;this.updateDivsInterval=null;this.scale=null;this.dpi=96;this.onFrameChanged=onFrameChanged;this.plugin=plugin;this.divMain=divMain;this.minFrameWidth=this.imgWidth-this.imgBorderX;this.minFrameHeight=this.imgHeight-this.imgBorderY;this.minFrameWidth=Math.round((this.imgWidth-this.imgBorderX)*2);this.minFrameHeight=Math.round((this.imgHeight-this.imgBorderY)*2);this.divContainer=document.createElement("div");this.divContainer.className="view mapFrame container";this.divPaddingTop=document.createElement("div");this.divPaddingTop.className="view mapFrame padding top";this.divPaddingLeft=document.createElement("div");this.divPaddingLeft.className="view mapFrame padding left";this.divPaddingRight=document.createElement("div");this.divPaddingRight.className="view mapFrame padding right";this.divPaddingBottom=document.createElement("div");this.divPaddingBottom.className="view mapFrame padding bottom";this.divCornerUpperLeft=document.createElement("div");this.divCornerUpperLeft.className="view mapFrame corner upperLeft";this.divCornerUpperRight=document.createElement("div");this.divCornerUpperRight.className="view mapFrame corner upperRight";this.divCornerLowerLeft=document.createElement("div");this.divCornerLowerLeft.className="view mapFrame corner lowerLeft";this.divCornerLowerRight=document.createElement("div");this.divCornerLowerRight.className="view mapFrame corner lowerRight";this.init()} Frame.prototype.setRatio=function(ratio){this.ratio=ratio;this.setFrameRatio()};Frame.prototype.setScale=function(scale,dpi){this.scale=scale;this.dpi=dpi;this.updateDivs()};Frame.prototype.getDefaultMaxGroundResolution=function(){return this.defaultMaxGroundResolution};Frame.prototype.init=function(){var view=this;this.divMain.className="view mapFrame";this.divMain.appendChild(this.divContainer);this.divContainer.appendChild(this.divPaddingTop);this.divContainer.appendChild(this.divPaddingLeft);this.divContainer.appendChild(this.divPaddingRight);this.divContainer.appendChild(this.divPaddingBottom);this.divContainer.appendChild(this.divCornerUpperLeft);this.divContainer.appendChild(this.divCornerUpperRight);this.divContainer.appendChild(this.divCornerLowerLeft);this.divContainer.appendChild(this.divCornerLowerRight);jQuery(this.divCornerUpperLeft).draggable({start:function(event,ui){view.dragPosition=ui.position},drag:function(event,ui){view.frameSize.width+=(view.dragPosition.left-ui.position.left)*2;view.frameSize.height+=(view.dragPosition.top-ui.position.top)*2;view.dragPosition=ui.position;view.updateDivs()},stop:function(event,ui){view.updateWkt()},containment:"#PackageCreatorMapContainer",scroll:!1});jQuery(this.divCornerUpperRight).draggable({start:function(event,ui){view.dragPosition=ui.position},drag:function(event,ui){view.frameSize.width-=(view.dragPosition.left-ui.position.left)*2;view.frameSize.height+=(view.dragPosition.top-ui.position.top)*2;view.dragPosition=ui.position;view.updateDivs()},stop:function(event,ui){view.updateWkt()},containment:"#PackageCreatorMapContainer",scroll:!1});jQuery(this.divCornerLowerLeft).draggable({start:function(event,ui){view.dragPosition=ui.position},drag:function(event,ui){view.frameSize.width+=(view.dragPosition.left-ui.position.left)*2;view.frameSize.height-=(view.dragPosition.top-ui.position.top)*2;view.dragPosition=ui.position;view.updateDivs()},stop:function(event,ui){view.updateWkt()},containment:"#PackageCreatorMapContainer",scroll:!1});jQuery(this.divCornerLowerRight).draggable({start:function(event,ui){view.dragPosition=ui.position},drag:function(event,ui){view.frameSize.width-=(view.dragPosition.left-ui.position.left)*2;view.frameSize.height-=(view.dragPosition.top-ui.position.top)*2;view.dragPosition=ui.position;view.updateDivs()},stop:function(event,ui){view.updateWkt()},containment:"#PackageCreatorMapContainer",scroll:!1});this.divCornerUpperLeft.style.position="absolute";this.divCornerUpperRight.style.position="absolute";this.divCornerLowerLeft.style.position="absolute";this.divCornerLowerRight.style.position="absolute";this.plugin.getMap().on("moveend",function(){view.updateDivs();view.updateWkt()});this.plugin.getMap().getView().on('change:resolution',function(){view.updateFrameLimits()});view.updateDivs();this.updateDivsInterval=setInterval(function(){view.updateDivs()},200)};Frame.prototype.deinit=function(){if(this.updateDivsInterval!==null){clearInterval(this.updateDivsInterval);this.updateDivsInterval=null}};Frame.prototype.getMapSize=function(){return{width:jQuery(this.divMain).width(),height:jQuery(this.divMain).height()}};Frame.prototype.limitToContainer=function(){var mapSize=this.getMapSize();if(this.frameSize.width>mapSize.width-(this.borderX+this.imgBorderX)*2){this.frameSize.width=mapSize.width-(this.borderX+this.imgBorderX)*2;if(this.ratio!=-1){this.frameSize.height=this.frameSize.width/this.ratio}} if(this.frameSize.height>mapSize.height-(this.borderY+this.imgBorderY)*2){this.frameSize.height=mapSize.height-(this.borderY+this.imgBorderY)*2}};Frame.prototype.getUpperLeftContainment=function(mapSize){return{minX:Math.round(Math.max(mapSize.width*0.5-this.maxFrameWidth*0.5-this.imgBorderX+jQuery(this.divMain).offset().left,this.borderX+jQuery(this.divMain).offset().left)),minY:Math.round(Math.max(mapSize.height*0.5-this.maxFrameHeight*0.5-this.imgBorderY+jQuery(this.divMain).offset().top,this.borderY+jQuery(this.divMain).offset().top)),maxX:Math.round(mapSize.width*0.5-this.minFrameWidth*0.5-this.imgBorderX+jQuery(this.divMain).offset().left),maxY:Math.round(mapSize.height*0.5-this.minFrameHeight*0.5-this.imgBorderY+jQuery(this.divMain).offset().top)}};Frame.prototype.getUpperRightContainment=function(mapSize){return{minX:Math.round(mapSize.width*0.5+this.minFrameWidth*0.5-this.imgWidth+this.imgBorderX+jQuery(this.divMain).offset().left),minY:Math.round(Math.max(mapSize.height*0.5-this.maxFrameHeight*0.5-this.imgBorderY+jQuery(this.divMain).offset().top,this.borderY+jQuery(this.divMain).offset().top)),maxX:Math.round(Math.min(mapSize.width*0.5+this.maxFrameWidth*0.5-this.imgWidth+this.imgBorderX+jQuery(this.divMain).offset().left,mapSize.width-this.borderX-this.imgWidth+jQuery(this.divMain).offset().left)),maxY:Math.round(mapSize.height*0.5-this.minFrameHeight*0.5-this.imgBorderY+jQuery(this.divMain).offset().top)}};Frame.prototype.getLowerLeftContainment=function(mapSize){return{minX:Math.round(Math.max(mapSize.width*0.5-this.maxFrameWidth*0.5-this.imgBorderX+jQuery(this.divMain).offset().left,this.borderX+jQuery(this.divMain).offset().left)),minY:Math.round(mapSize.height*0.5+this.minFrameHeight*0.5-this.imgHeight+this.imgBorderY+jQuery(this.divMain).offset().top),maxX:Math.round(mapSize.width*0.5-this.minFrameWidth*0.5-this.imgBorderX+jQuery(this.divMain).offset().left),maxY:Math.round(Math.min(mapSize.height*0.5+this.maxFrameHeight*0.5-this.imgHeight+this.imgBorderY+jQuery(this.divMain).offset().top,mapSize.height-this.borderY-this.imgHeight+jQuery(this.divMain).offset().top))}};Frame.prototype.getLowerRightContainment=function(mapSize){return{minX:Math.round(mapSize.width*0.5+this.minFrameWidth*0.5-this.imgWidth+this.imgBorderX+jQuery(this.divMain).offset().left),minY:Math.round(mapSize.height*0.5+this.minFrameHeight*0.5-this.imgHeight+this.imgBorderY+jQuery(this.divMain).offset().top),maxX:Math.round(Math.min(mapSize.width*0.5+this.maxFrameWidth*0.5-this.imgWidth+this.imgBorderX+jQuery(this.divMain).offset().left,mapSize.width-this.borderX-this.imgWidth+jQuery(this.divMain).offset().left)),maxY:Math.round(Math.min(mapSize.height*0.5+this.maxFrameHeight*0.5-this.imgHeight+this.imgBorderY+jQuery(this.divMain).offset().top,mapSize.height-this.borderY-this.imgHeight+jQuery(this.divMain).offset().top))}};Frame.prototype.updateDivs=function(){var mapSize=this.getMapSize();this.frameSize={width:Math.min(mapSize.width-90,Math.max(100,this.frameSize.width)),height:Math.min(mapSize.height-30,Math.max(100,this.frameSize.height))};this.setFrameRatio();this.limitToContainer();var upperLeftContainment=this.getUpperLeftContainment(mapSize);var upperRightContainment=this.getUpperRightContainment(mapSize);var lowerLeftContainment=this.getLowerLeftContainment(mapSize);var lowerRightContainment=this.getLowerRightContainment(mapSize);jQuery(this.divCornerUpperLeft).draggable("option","containment",[upperLeftContainment.minX,upperLeftContainment.minY,upperLeftContainment.maxX,upperLeftContainment.maxY]);jQuery(this.divCornerUpperRight).draggable("option","containment",[upperRightContainment.minX,upperRightContainment.minY,upperRightContainment.maxX,upperRightContainment.maxY]);jQuery(this.divCornerLowerLeft).draggable("option","containment",[lowerLeftContainment.minX,lowerLeftContainment.minY,lowerLeftContainment.maxX,lowerLeftContainment.maxY]);jQuery(this.divCornerLowerRight).draggable("option","containment",[lowerRightContainment.minX,lowerRightContainment.minY,lowerRightContainment.maxX,lowerRightContainment.maxY]);var screenRect={ul:{x:mapSize.width*0.5-this.frameSize.width*0.5,y:mapSize.height*0.5-this.frameSize.height*0.5},ur:{x:mapSize.width*0.5+this.frameSize.width*0.5,y:mapSize.height*0.5-this.frameSize.height*0.5},ll:{x:mapSize.width*0.5-this.frameSize.width*0.5,y:mapSize.height*0.5+this.frameSize.height*0.5},lr:{x:mapSize.width*0.5+this.frameSize.width*0.5,y:mapSize.height*0.5+this.frameSize.height*0.5}};this.divPaddingTop.style.height=Math.round(screenRect.ul.y)+"px";this.divPaddingBottom.style.height=this.divPaddingTop.style.height;this.divPaddingBottom.style.top=Math.round(mapSize.height-screenRect.ul.y)+"px";this.divPaddingLeft.style.width=Math.round(screenRect.ul.x)+"px";this.divPaddingRight.style.width=this.divPaddingLeft.style.width;this.divPaddingRight.style.left=Math.round(mapSize.width-screenRect.ul.x)+"px";this.divPaddingLeft.style.top=this.divPaddingTop.style.height;this.divPaddingRight.style.top=this.divPaddingTop.style.height;this.divPaddingLeft.style.height=Math.round(this.frameSize.height)+"px";this.divPaddingRight.style.height=this.divPaddingLeft.style.height;this.divCornerUpperLeft.style.left=Math.round(screenRect.ul.x-this.imgBorderX)+"px";this.divCornerUpperLeft.style.top=Math.round(screenRect.ul.y-this.imgBorderY)+"px";this.divCornerUpperRight.style.left=Math.round(screenRect.lr.x-this.imgWidth+this.imgBorderX)+"px";this.divCornerUpperRight.style.top=Math.round(screenRect.ul.y-this.imgBorderY)+"px";this.divCornerLowerLeft.style.left=Math.round(screenRect.ul.x-this.imgBorderX)+"px";this.divCornerLowerLeft.style.top=Math.round(screenRect.lr.y-this.imgHeight+this.imgBorderY)+"px";this.divCornerLowerRight.style.left=Math.round(screenRect.lr.x-this.imgWidth+this.imgBorderX)+"px";this.divCornerLowerRight.style.top=Math.round(screenRect.lr.y-this.imgHeight+this.imgBorderY)+"px";jQuery(".ol-zoom").css({"left":Math.round(mapSize.width*0.5-this.frameSize.width*0.5-40)+"px","top":Math.round(mapSize.height*0.5-29)+"px"});jQuery(".ol-scale-line").css({"left":Math.round(mapSize.width*0.5-this.frameSize.width*0.5+10)+"px","bottom":Math.round(mapSize.height*0.5-this.frameSize.height*0.5+10)+"px"})};Frame.prototype.updateWkt=function(){var mapSize=this.getMapSize();this.frameSize={width:Math.min(mapSize.width-90,Math.max(100,this.frameSize.width)),height:Math.min(mapSize.height-30,Math.max(100,this.frameSize.height))};var screenRect={ul:{x:mapSize.width*0.5-this.frameSize.width*0.5,y:mapSize.height*0.5-this.frameSize.height*0.5},ur:{x:mapSize.width*0.5+this.frameSize.width*0.5,y:mapSize.height*0.5-this.frameSize.height*0.5},ll:{x:mapSize.width*0.5-this.frameSize.width*0.5,y:mapSize.height*0.5+this.frameSize.height*0.5},lr:{x:mapSize.width*0.5+this.frameSize.width*0.5,y:mapSize.height*0.5+this.frameSize.height*0.5}};if(this.onFrameChanged!==null){this.onFrameChanged([ol.proj.transform(this.plugin.getMap().getCoordinateFromPixel([screenRect.ul.x,screenRect.ul.y]),'EPSG:3857','EPSG:4326'),ol.proj.transform(this.plugin.getMap().getCoordinateFromPixel([screenRect.ll.x,screenRect.ll.y]),'EPSG:3857','EPSG:4326'),ol.proj.transform(this.plugin.getMap().getCoordinateFromPixel([screenRect.lr.x,screenRect.lr.y]),'EPSG:3857','EPSG:4326'),ol.proj.transform(this.plugin.getMap().getCoordinateFromPixel([screenRect.ur.x,screenRect.ur.y]),'EPSG:3857','EPSG:4326'),ol.proj.transform(this.plugin.getMap().getCoordinateFromPixel([screenRect.ul.x,screenRect.ul.y]),'EPSG:3857','EPSG:4326')],"EPSG:4326")}};Frame.prototype.setFrameRatio=function(){if(this.ratio==-1){return} var w=this.frameSize.width;var h=this.frameSize.height;if(this.ratio>=1.0){this.frameSize.width=Math.min(w,h)*this.ratio;this.frameSize.height=Math.min(w,h)}else{this.frameSize.width=Math.max(w,h)*this.ratio;this.frameSize.height=Math.max(w,h)} this.limitToContainer()};Frame.prototype.updateMapView=function(){var view=this;var currentView=this.plugin.getMap().getView();var imageFactor=Math.max(this.resultImageWidth*0.001,this.resultImageHeight*0.001);this.updateResolutionScaleMercatorRealApprox();var viewParams={center:currentView.getCenter(),minResolution:this.minGroundResolution*this.resulutionScaleMercatorRealApprox*2.0*imageFactor};if(this.maxGroundResolution==null){viewParams.maxResolution=this.defaultMaxGroundResolution}else{viewParams.maxResolution=this.maxGroundResolution*this.resulutionScaleMercatorRealApprox*2.0*imageFactor} viewParams.zoom=Math.round(Math.log(viewParams.maxResolution/currentView.getResolution())*Math.LOG2E);this.plugin.getMap().setView(new ol.View(viewParams));this.plugin.getMap().getView().on('change:resolution',function(){view.updateFrameLimits()})};Frame.prototype.setMinGroundResolution=function(minGroundResolution){this.minGroundResolution=minGroundResolution;this.updateMapView();this.updateFrameLimits()};Frame.prototype.setMaxGroundResolution=function(maxGroundResolution){this.maxGroundResolution=maxGroundResolution;this.updateMapView();this.updateFrameLimits()};Frame.prototype.setResultImageWidth=function(resultImageWidth){this.resultImageWidth=resultImageWidth;this.updateMapView()};Frame.prototype.setResultImageHeight=function(resultImageHeight){this.resultImageHeight=resultImageHeight;this.updateMapView()};Frame.prototype.refreshContainment=function(){this.minFrameWidth=Math.round(Math.max((this.imgWidth-this.imgBorderX)*2,this.minFrameWidth));this.minFrameHeight=Math.round(Math.max((this.imgHeight-this.imgBorderY)*2,this.minFrameHeight));this.frameSize.width=Math.min(Math.max(this.frameSize.width,this.minFrameWidth),this.maxFrameWidth);this.frameSize.height=Math.min(Math.max(this.frameSize.height,this.minFrameHeight),this.maxFrameHeight);this.updateDivs()};Frame.prototype.updateResolutionScaleMercatorRealApprox=function(){var center=ol.proj.transform(this.plugin.getMap().getView().getCenter(),"EPSG:3857","EPSG:4326");var params={lat1:54.3,factor1:1.6*29.7/28.3,lat2:47.51,factor2:1.6*29.7/32.2};var vector=(params.factor2-params.factor1)/(params.lat2-params.lat1);var factor=params.factor1+((center[1]-params.lat1))*vector;this.resulutionScaleMercatorRealApprox=factor};Frame.prototype.updateFrameLimits=function(){var resolution=this.plugin.getMap().getView().getResolution();this.updateResolutionScaleMercatorRealApprox();this.minFrameWidth=this.resultImageWidth/resolution*this.minGroundResolution*this.resulutionScaleMercatorRealApprox;this.minFrameHeight=this.resultImageHeight/resolution*this.minGroundResolution*this.resulutionScaleMercatorRealApprox;if(this.maxGroundResolution==null){this.maxFrameWidth=this.resultImageWidth/resolution*this.defaultMaxGroundResolution*this.resulutionScaleMercatorRealApprox;this.maxFrameHeight=this.resultImageHeight/resolution*this.defaultMaxGroundResolution*this.resulutionScaleMercatorRealApprox}else{this.maxFrameWidth=this.resultImageWidth/resolution*this.maxGroundResolution*this.resulutionScaleMercatorRealApprox;this.maxFrameHeight=this.resultImageHeight/resolution*this.maxGroundResolution*this.resulutionScaleMercatorRealApprox} this.refreshContainment()};Frame.prototype.resetLimits=function(){this.minGroundResolution=this.defaultMinGroundResolution;this.maxGroundResolution=this.defaultMaxGroundResolution;this.updateFrameLimits()};Frame.prototype.fitToBoundingBox=function(bb){this.plugin.getMap().getView().setCenter(ol.proj.transform([(bb.minX+bb.maxX)*0.5,(bb.minY+bb.maxY)*0.5],'EPSG:4326','EPSG:3857'))};return Frame}());OpenLayers.Frame=Frame})(OpenLayers=s69.OpenLayers||(s69.OpenLayers={}))})(s69=Plugin.s69||(Plugin.s69={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s69;(function(s69){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(subViewer){var s6=s4.call(this,subViewer)||this;s6.name="s69";s6.frame=null;s6.divMain=null;s6.onFrameChanged=null;return s6} Plugin.prototype.getFrame=function(){return this.frame};Plugin.prototype.setOnFrameChanged=function(onFrameChanged){this.onFrameChanged=onFrameChanged};Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);this.divMain=document.createElement("div");this.subViewer.getMainDiv().appendChild(this.divMain);this.frame=new GeoFly.OmniViewer.Plugin.s69.Oblique.Frame(this,this.divMain,this.onFrameChanged);this.running=!0};Plugin.prototype.stop=function(){if(this.frame!==null){this.frame.deinit();this.frame=null} if(this.divMain!==null){this.subViewer.getMainDiv().removeChild(this.divMain);this.divMain=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=s69.Oblique||(s69.Oblique={}))})(s69=Plugin_1.s69||(Plugin_1.s69={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s69;(function(s69){var Oblique;(function(Oblique){var Frame=(function(){function Frame(plugin,divMain,onFrameChanged){if(onFrameChanged===void 0){onFrameChanged=null} this.plugin=null;this.updateDivsInterval=null;this.scale=null;this.dpi=96;this.onFrameChanged=onFrameChanged;this.plugin=plugin;this.divMain=divMain;this.init()} Frame.prototype.init=function(){var view=this;this.divMain.className="view mapFrame";this.plugin.getMap().on("moveend",function(){view.updateWkt()})};Frame.prototype.deinit=function(){if(this.updateDivsInterval!==null){clearInterval(this.updateDivsInterval);this.updateDivsInterval=null}};Frame.prototype.getMapSize=function(){return{width:jQuery(this.divMain).width(),height:jQuery(this.divMain).height()}};Frame.prototype.updateWkt=function(){if(this.onFrameChanged!==null){this.onFrameChanged([ol.proj.transform(this.plugin.getMap().getView().getCenter(),'EPSG:3857','EPSG:4326')],"EPSG:4326")}};Frame.prototype.updateDivs=function(){};Frame.prototype.setRatio=function(){};return Frame}());Oblique.Frame=Frame})(Oblique=s69.Oblique||(s69.Oblique={}))})(s69=Plugin.s69||(Plugin.s69={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var MouseEvent;(function(MouseEvent){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="MouseEvent";s6.events={onMouseMove:{callbackFunction:null,eventObject:null},onClick:{callbackFunction:null,eventObject:null},onPointerDown:{callbackFunction:null,eventObject:null},onMoveEnd:{callbackFunction:null,eventObject:null}};return s6} Plugin.prototype.assignCallbackFunctions=function(options){if(typeof options.onMouseMove!=="undefined"){this.events.onMouseMove.callbackFunction=options.onMouseMove} if(typeof options.onClick!=="undefined"){this.events.onClick.callbackFunction=options.onClick} if(typeof options.onPointerDown!=="undefined"){this.events.onPointerDown.callbackFunction=options.onPointerDown} if(typeof options.onMoveEnd!=="undefined"){this.events.onMoveEnd.callbackFunction=options.onMoveEnd}};Plugin.prototype.start=function(options){if(options===void 0){options={}} var plugin=this;var map=this.getMap();s4.prototype.start.call(this,options);this.assignCallbackFunctions(options);this.events.onMouseMove.eventObject=map.on("pointermove",function(event){if(plugin.events.onMouseMove.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,map.getView().getProjection(),"EPSG:4326");plugin.events.onMouseMove.callbackFunction(coord[0],coord[1])}});this.events.onClick.eventObject=map.on("click",function(event){if(plugin.events.onClick.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,map.getView().getProjection(),"EPSG:4326");plugin.events.onClick.callbackFunction(coord[0],coord[1])}});this.events.onPointerDown.eventObject=map.on("pointerdown",function(event){if(plugin.events.onPointerDown.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,map.getView().getProjection(),"EPSG:4326");plugin.events.onPointerDown.callbackFunction(coord[0],coord[1])}});this.events.onMoveEnd.eventObject=map.on("moveend",function(event){if(plugin.events.onMoveEnd.callbackFunction!==null){var coord=ol.proj.transform(map.getView().getCenter(),map.getView().getProjection(),"EPSG:4326");plugin.events.onMoveEnd.callbackFunction(coord[0],coord[1])}})};Plugin.prototype.stop=function(){var map=this.getMap();if(this.events.onMouseMove.eventObject){map.un("pointermove",this.events.onMouseMove.eventObject);this.events.onMouseMove.eventObject=null} if(this.events.onClick.eventObject){map.un("click",this.events.onClick.eventObject);this.events.onClick.eventObject=null} if(this.events.onPointerDown.eventObject){map.un("pointerdown",this.events.onPointerDown.eventObject);this.events.onPointerDown.eventObject=null} if(this.events.onMoveEnd.eventObject){map.un("moveend",this.events.onMoveEnd.eventObject);this.events.onMoveEnd.eventObject=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=MouseEvent.OpenLayers||(MouseEvent.OpenLayers={}))})(MouseEvent=Plugin_1.MouseEvent||(Plugin_1.MouseEvent={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var MouseEvent;(function(MouseEvent){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="MouseEvent";s6.events={onMouseMove:{callbackFunction:null,eventObject:null},onClick:{callbackFunction:null,eventObject:null},onPointerDown:{callbackFunction:null,eventObject:null},onMoveEnd:{callbackFunction:null,eventObject:null}};return s6} Plugin.prototype.assignCallbackFunctions=function(options){if(typeof options.onMouseMove!=="undefined"){this.events.onMouseMove.callbackFunction=options.onMouseMove} if(typeof options.onClick!=="undefined"){this.events.onClick.callbackFunction=options.onClick} if(typeof options.onPointerDown!=="undefined"){this.events.onPointerDown.callbackFunction=options.onPointerDown} if(typeof options.onMoveEnd!=="undefined"){this.events.onMoveEnd.callbackFunction=options.onMoveEnd}};Plugin.prototype.start=function(options){if(options===void 0){options={}} var plugin=this;var map=this.getMap();s4.prototype.start.call(this,options);this.assignCallbackFunctions(options);this.events.onMouseMove.eventObject=map.on("pointermove",function(event){if(plugin.events.onMouseMove.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,plugin.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");plugin.events.onMouseMove.callbackFunction(coord[0],coord[1])}});this.events.onClick.eventObject=map.on("click",function(event){if(plugin.events.onClick.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,plugin.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");plugin.events.onClick.callbackFunction(coord[0],coord[1])}});this.events.onPointerDown.eventObject=map.on("pointerdown",function(event){if(plugin.events.onPointerDown.callbackFunction!==null){var coord=ol.proj.transform(event.coordinate,plugin.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");plugin.events.onPointerDown.callbackFunction(coord[0],coord[1])}});this.events.onMoveEnd.eventObject=map.on("moveend",function(event){if(plugin.events.onMoveEnd.callbackFunction!==null){var coord=ol.proj.transform(map.getView().getCenter(),plugin.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326");plugin.events.onMoveEnd.callbackFunction(coord[0],coord[1])}})};Plugin.prototype.stop=function(){var map=this.getMap();if(this.events.onClick.eventObject){map.un("pointermove",this.events.onMouseMove.eventObject);this.events.onMouseMove.eventObject=null} if(this.events.onClick.eventObject){map.un("click",this.events.onClick.eventObject);this.events.onClick.eventObject=null} if(this.events.onPointerDown.eventObject){map.un("pointerdown",this.events.onPointerDown.eventObject);this.events.onPointerDown.eventObject=null} if(this.events.onMoveEnd.eventObject){map.un("moveend",this.events.onMoveEnd.eventObject);this.events.onMoveEnd.eventObject=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=MouseEvent.Oblique||(MouseEvent.Oblique={}))})(MouseEvent=Plugin_1.MouseEvent||(Plugin_1.MouseEvent={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var MouseEvent;(function(MouseEvent){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="MouseEvent";s6.events={onMouseMove:{callbackFunction:null,eventObject:null}};return s6} Plugin.prototype.assignCallbackFunctions=function(options){if(typeof options.onMouseMove!=="undefined"){this.events.onMouseMove.callbackFunction=options.onMouseMove}};Plugin.prototype.start=function(options){if(options===void 0){options={}} var plugin=this;var subViewer=this.getSubViewer();s4.prototype.start.call(this,options);this.assignCallbackFunctions(options);this.events.onMouseMove.eventObject=subViewer.getCesiumViewer().canvas.addEventListener('mousemove',function(evt){if(plugin.events.onMouseMove.callbackFunction!==null){var rect=subViewer.getCesiumViewer().canvas.getBoundingClientRect();var pos={x:evt.clientX-rect.left,y:evt.clientY-rect.top};var lookAt=subViewer.getWgs84AtPixel(pos.x,pos.y);if(lookAt!==null){plugin.events.onMouseMove.callbackFunction(lookAt[0],lookAt[1])}}},!1)};Plugin.prototype.stop=function(){var subViewer=this.getSubViewer();if(this.events.onMouseMove.eventObject!==null){subViewer.getCesiumViewer().canvas.removeEventListener('mousemove',this.events.onMouseMove.eventObject);this.events.onMouseMove.eventObject=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.s18));s18.Plugin=Plugin})(s18=MouseEvent.s18||(MouseEvent.s18={}))})(MouseEvent=Plugin_1.MouseEvent||(Plugin_1.MouseEvent={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GeoCoder;(function(GeoCoder){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="GeoCoder";s6.input=null;s6.pickModifier=null;return s6} Plugin.prototype.start=function(options){s4.prototype.start.call(this,options)};Plugin.prototype.stop=function(){if(this.pickModifier!==null){this.subViewer.getModifierManager().pop(this.pickModifier)} if(this.input!==null&&(typeof this.options.input=="undefined")){this.subViewer.getMainDiv().removeChild(this.input);this.input=null} s4.prototype.stop.call(this)};Plugin.prototype.reverseGeocode=function(lon,lat){var plugin=this;var r=new XMLHttpRequest();r.open("POST",this.options.geoCoderUrl);r.setRequestHeader("Content-type","application/x-www-form-urlencoded");r.onload=function(){var result=JSON.parse(r.responseText);if(result.features.length>0){plugin.input.value=result.features[0].properties.Straße+" "+result.features[0].properties.Hausnummer+", "+result.features[0].properties.Postleitzahl+" "+result.features[0].properties.Ort}};r.send("revgeocode="+lat+","+lon)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));GeoCoder.Plugin=Plugin})(GeoCoder=Plugin_1.GeoCoder||(Plugin_1.GeoCoder={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GeoCoder;(function(GeoCoder){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.start=function(options){var plugin=this;s4.prototype.start.call(this,options);if(typeof options=="undefined"||typeof options.input=="undefined"){this.input=document.createElement("input");this.input.placeholder="Ort, Gebiet suchen";this.input.className="omniviewer_openlayers_plugincontrol GeoCoderInput"}else{this.input=options.input} this.input.onfocus=function(){if(plugin.pickModifier!==null){plugin.subViewer.getModifierManager().pop(plugin.pickModifier)} plugin.pickModifier=new GeoFly.OmniViewer.SubViewer.Modifier.Pointer.PickLonLat.OpenLayers({onData:function(data){plugin.reverseGeocode(data.lon,data.lat)},finishOnData:!0},plugin.subViewer);plugin.subViewer.getModifierManager().push(plugin.pickModifier)};new GeoFly.GeoCoder.s12({input:this.input,geoCoderUrl:plugin.options.geoCoderUrl,select:function(event,ui){plugin.centerToLonLat(ui.item.data.geometry.coordinates);return!1}});if(typeof options=="undefined"||typeof options.input=="undefined"){this.subViewer.getMainDiv().appendChild(this.input)}};Plugin.prototype.centerToLonLat=function(coord){this.getMap().getView().setCenter(ol.proj.fromLonLat(coord));this.getMap().getView().setZoom(15)};return Plugin}(GeoFly.OmniViewer.Plugin.GeoCoder.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=GeoCoder.OpenLayers||(GeoCoder.OpenLayers={}))})(GeoCoder=Plugin_1.GeoCoder||(Plugin_1.GeoCoder={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GeoCoder;(function(GeoCoder){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.centerToLonLat=function(coord){this.subViewer.centerToLonLat(coord)};return Plugin}(GeoFly.OmniViewer.Plugin.GeoCoder.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=GeoCoder.Oblique||(GeoCoder.Oblique={}))})(GeoCoder=Plugin_1.GeoCoder||(Plugin_1.GeoCoder={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GeoCoder;(function(GeoCoder){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.start=function(options){var plugin=this;s4.prototype.start.call(this,options);if(typeof options.input=="undefined"){this.input=document.createElement("input");this.input.placeholder="Ort, Gebiet suchen";this.input.className="omniviewer_openlayers_plugincontrol GeoCoderInput"}else{this.input=options.input} this.input.onfocus=function(){if(plugin.pickModifier!==null){plugin.subViewer.getModifierManager().pop(plugin.pickModifier)} plugin.pickModifier=new GeoFly.OmniViewer.SubViewer.Modifier.Pointer.PickLonLat.s18({onData:function(data){plugin.reverseGeocode(data.lon,data.lat)},finishOnData:!0},plugin.subViewer);plugin.subViewer.getModifierManager().push(plugin.pickModifier)};new GeoFly.GeoCoder.s12({input:this.input,geoCoderUrl:plugin.options.geoCoderUrl,select:function(event,ui){plugin.centerToLonLat(ui.item.data.geometry.coordinates);return!1}});if(typeof options.input=="undefined"){this.subViewer.getMainDiv().appendChild(this.input)}};Plugin.prototype.centerToLonLat=function(coord){this.subViewer.getCesiumViewer().camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(coord[0],coord[1],500),duration:5,orientation:new Cesium.HeadingPitchRange(0,-90/(180.0/Math.PI),500)})};return Plugin}(GeoFly.OmniViewer.Plugin.GeoCoder.Plugin));s18.Plugin=Plugin})(s18=GeoCoder.s18||(GeoCoder.s18={}))})(GeoCoder=Plugin_1.GeoCoder||(Plugin_1.GeoCoder={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s57;(function(s57){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="s57";s6.previews={n:null,s:null,w:null,e:null,ortho:null};s6.resizerWidth=5;s6.tablePreview=null;s6.togglePreviewsButton=null;s6.timerHidePreviews=null;return s6} Plugin.prototype.getOptions=function(){return this.options};Plugin.prototype.setUserListViewWidth=function(userListViewWidth){this.userListViewWidth=userListViewWidth};Plugin.prototype.foreachPreview=function(func){var previews=[this.previews.n,this.previews.s,this.previews.w,this.previews.e,this.previews.ortho];for(var i=0;i0){plugin.showPreviews()}else{plugin.hidePreviews()}}},200);if(this.options.showing===!1){this.hidePreviews()} this.running=!0};Plugin.prototype.stop=function(){var plugin=this;if(this.running){if(this.timerHidePreviews!==null){clearInterval(this.timerHidePreviews);this.timerHidePreviews=null} $(this.subViewer.getOptions().viewer).off("addedDatasource",plugin.onDatasourceAdded);this.foreachPreview(function(preview){preview.destroy()});this.previews.n=null;this.previews.s=null;this.previews.w=null;this.previews.e=null;this.previews.ortho=null;if(this.subViewer.getMapContainerDiv()!==null&&this.subViewer.getMapContainerDiv().parentElement!==null){this.subViewer.getMapContainerDiv().style.width=this.subViewer.getMapContainerDiv().parentElement.clientWidth+"px"} this.deinitTable()} s4.prototype.stop.call(this)};Plugin.prototype.getSyncData=function(){this.options.showing=this.listViewWidth!==0;return s4.prototype.getSyncData.call(this)};Plugin.prototype.setListView=function(){this.subViewer.getMapContainerDiv().style.width=(this.subViewer.getMapContainerDiv().parentElement.clientWidth-this.options.listViewWidth-this.resizerWidth)+"px";var plugin=this.subViewer.getViewer().getPlugin("s57");if(plugin!==null){plugin.setUserListViewWidth(this.subViewer.getPreviewContainerDiv().parentElement.clientWidth-this.subViewer.getMapContainerDiv().clientWidth-5)} this.updateLayout()};Plugin.prototype.setSmartView=function(){this.subViewer.getMapContainerDiv().style.width=Math.round(this.subViewer.getMapContainerDiv().parentElement.clientWidth*0.5)+"px";var plugin=this.subViewer.getViewer().getPlugin("s57");if(plugin!==null){plugin.setUserListViewWidth(this.subViewer.getPreviewContainerDiv().parentElement.clientWidth-this.subViewer.getMapContainerDiv().clientWidth-5)} this.updateLayout()};Plugin.prototype.setPreviewResolution=function(resolution){for(var preview in this.previews){if(this.previews[preview]!==null){if(this.previews[preview].getActiveSubviewer().getMap().getView().getResolution()!==resolution){this.previews[preview].getActiveSubviewer().getMap().getView().setResolution(resolution)}}}};Plugin.prototype.showPreviews=function(){this.listViewWidth=this.options.listViewWidth;this.userListViewWidth=this.listViewWidth;this.updateLayout();this.subViewer.getPreviewContainerDiv().style.width=this.options.listViewWidth+"px";this.updateLayout()};Plugin.prototype.hidePreviews=function(){this.listViewWidth=0;this.userListViewWidth=this.listViewWidth;this.updateLayout();this.subViewer.getMapContainerDiv().style.width=this.subViewer.getMapContainerDiv().parentElement.clientWidth+"px";this.subViewer.getPreviewContainerDiv().style.width="0px";this.updateLayout()};Plugin.prototype.togglePreviews=function(){if(this.listViewWidth==0){this.showPreviews()}else{this.hidePreviews()}};return Plugin}(GeoFly.OmniViewer.Plugin.s10));s57.Plugin=Plugin})(s57=Plugin_1.s57||(Plugin_1.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s57;(function(s57){var Preview=(function(s4){__extends(Preview,s4);function Preview(plugin,parentDiv,className,viewDirection,datasource){var s6=s4.call(this,parentDiv)||this;s6.listenerCenterChange=null;s6.listenerMoveStart=null;s6.listenerMoveEnd=null;s6.subViewerInitialized=!1;s6.obliqueAvailable=!0;var preview=s6;if(typeof datasource!=="undefined"){datasource.show()} s6.plugin=plugin;s6.parentDiv=parentDiv;s6.viewDirection=viewDirection;s6.mainDiv.className=className;var viewport=plugin.getSubViewer().gets81();if(viewport!==null){var center=viewport.getCenter();s6.setCenter(center.x,center.y)} s6.activateSubviewer("oblique");if(typeof datasource!=="undefined"){s6.addDatasource(datasource)} s6.initSubViewer(datasource);$(plugin.getSubViewer().getPreviewContainerDiv()).on("resize",function(){preview.updateLayout(plugin.getSubViewer().getPreviewContainerDiv());plugin.getOptions().width=plugin.getSubViewer().getPreviewContainerDiv().clientWidth});preview.getActiveSubviewer().getMap().getControls().forEach(function(control){preview.getActiveSubviewer().getMap().removeControl(control)});preview.getActiveSubviewer().getMap().addControl(new ol.control.Zoom({className:"obliquePreviewZoomButtons"}));preview.getActiveSubviewer().getMap().getView().on("change:resolution",function(){preview.plugin.setPreviewResolution(preview.getActiveSubviewer().getMap().getView().getResolution())});s6.divOverlay=document.createElement("div");s6.divOverlay.style.position="absolute";s6.divOverlay.style.top="0";s6.divOverlay.style.left="0";s6.divOverlay.style.width="100%";s6.divOverlay.style.height="100%";s6.divOverlay.style.cursor="pointer";s6.divOverlay.style.color="#fff";s6.divOverlay.style.fontSize="2em";s6.divOverlay.style.fontFamily="sans-serif";s6.divOverlay.style.fontWeight="bold";s6.divOverlay.style.opacity="0.5";s6.divOverlay.style.textAlign="center";s6.divOverlay.style.textShadow="0 0 5px black";s6.divOverlay.style.lineHeight="70px";s6.divOverlay.innerHTML=s6.viewDirection;s6.divOverlay.onclick=function(){plugin.getSubViewer().getViewer().activateSubviewer("oblique");plugin.getSubViewer().getViewer().getActiveSubviewer().setViewDirection(viewDirection);for(var i=0;i";this.button.style.position="absolute";this.button.style.width="17px";this.button.style.padding="3px 0 3px 3px";this.button.style.top="4px";this.button.style.right="0px";this.button.style.borderRadius="10px 0 0 10px";this.button.style.border="solid #fff";this.button.style.borderWidth="1px 0 1px 1px";this.mainDiv.appendChild(this.button);this.button.onclick=function(){var plugin=viewer.getPlugin("s57");if(plugin!==null){plugin.togglePreviews()}}} return TogglePreviewsButton}());s57.TogglePreviewsButton=TogglePreviewsButton})(s57=Plugin.s57||(Plugin.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s57;(function(s57){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="s57";return s6} Plugin.prototype.getMap=function(){return this.subViewer.getMap()};Plugin.prototype.beforeUpdateTransformInfo=function(transformationInfo){};Plugin.prototype.afterUpdateTransformInfo=function(transformationInfo){};Plugin.prototype.createPreviews=function(datasource){if(this.options.n.enabled){this.previews.n=new GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_n","N",datasource)} if(this.options.s.enabled){this.previews.s=new GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_s","S",datasource)} if(this.options.w.enabled){this.previews.w=new GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_w","W",datasource)} if(this.options.e.enabled){this.previews.e=new GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_e","E",datasource)} if(this.options.ortho.enabled){this.previews.ortho=new GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" ui-widget-content previewContainer mapContainer mapContainer_ortho","")}};Plugin.prototype.updateLayout=function(){if(this.getMap()!==null){this.subViewer.updatePreviewContainerLayout();this.getMap().updateSize();this.subViewer.getMapContainerDiv().style.maxWidth=(this.subViewer.getMapContainerDiv().parentElement.clientWidth-this.listViewWidth-this.resizerWidth)+"px";this.subViewer.getMapContainerDiv().style.width=(this.subViewer.getMapContainerDiv().parentElement.clientWidth-this.userListViewWidth-this.resizerWidth)+"px"}};return Plugin}(GeoFly.OmniViewer.Plugin.s57.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=s57.OpenLayers||(s57.OpenLayers={}))})(s57=Plugin_1.s57||(Plugin_1.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s57;(function(s57){var OpenLayers;(function(OpenLayers){var Preview=(function(s4){__extends(Preview,s4);function Preview(plugin,parentDiv,className,viewDirection,datasource){var s6=s4.call(this,plugin,parentDiv,className,viewDirection,datasource)||this;if(plugin.getMap()!==null){var coord=plugin.getSubViewer().toLonLat(plugin.getMap().getView().getCenter());s6.getActiveSubviewer().sets81(new GeoFly.s76.s81(coord[0]-0.01,coord[0]+0.01,coord[1]-0.01,coord[1]+0.01,coord[0],coord[1],null,null))} return s6} Preview.prototype.registerListeners=function(){var preview=this;if(this.listenerCenterChange==null){this.listenerCenterChange=this.plugin.getMap().getView().on('change:center',preview.onCenterChange,preview)} if(this.listenerMoveStart==null){this.listenerMoveStart=this.plugin.getMap().on("movestart",preview.onMoveStart,preview)} if(this.listenerMoveEnd==null){this.listenerMoveEnd=this.plugin.getMap().on("moveend",preview.onMoveEnd,preview)}};Preview.prototype.unregisterListeners=function(){var preview=this;if(this.plugin.getMap()!==null){this.plugin.getMap().getView().un("change:center",preview.onCenterChange,preview);this.plugin.getMap().getView().un("movestart",preview.onMoveStart,preview);this.plugin.getMap().getView().un("moveend",preview.onMoveEnd,preview);this.listenerCenterChange=null;this.listenerMoveStart=null;this.listenerMoveEnd=null}};Preview.prototype.toLonLat=function(coord){return ol.proj.toLonLat(coord)};Preview.prototype.fromLonLat=function(coord){return ol.proj.fromLonLat(coord)};return Preview}(GeoFly.OmniViewer.Plugin.s57.Preview));OpenLayers.Preview=Preview})(OpenLayers=s57.OpenLayers||(s57.OpenLayers={}))})(s57=Plugin.s57||(Plugin.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s57;(function(s57){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.createPreviews=function(datasource){if(this.options.n.enabled){this.previews.n=new GeoFly.OmniViewer.Plugin.s57.Oblique.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_n","N",datasource)} if(this.options.s.enabled){this.previews.s=new GeoFly.OmniViewer.Plugin.s57.Oblique.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_s","S",datasource)} if(this.options.w.enabled){this.previews.w=new GeoFly.OmniViewer.Plugin.s57.Oblique.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_w","W",datasource)} if(this.options.e.enabled){this.previews.e=new GeoFly.OmniViewer.Plugin.s57.Oblique.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_e","E",datasource)} if(this.options.ortho.enabled){this.previews.ortho=new GeoFly.OmniViewer.Plugin.s57.Oblique.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" ui-widget-content previewContainer mapContainer mapContainer_ortho","")}};return Plugin}(GeoFly.OmniViewer.Plugin.s57.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=s57.Oblique||(s57.Oblique={}))})(s57=Plugin_1.s57||(Plugin_1.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s57;(function(s57){var Oblique;(function(Oblique){var Preview=(function(s4){__extends(Preview,s4);function Preview(){return s4!==null&&s4.apply(this,arguments)||this} return Preview}(GeoFly.OmniViewer.Plugin.s57.OpenLayers.Preview));Oblique.Preview=Preview})(Oblique=s57.Oblique||(s57.Oblique={}))})(s57=Plugin.s57||(Plugin.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s57;(function(s57){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.pointerIsDown=!1;s6.timerUpdatePosition=null;s6.previews={n:null,s:null,w:null,e:null,ortho:null};return s6} Plugin.prototype.createPreviews=function(datasource){if(this.options.n.enabled){this.previews.n=new GeoFly.OmniViewer.Plugin.s57.s18.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_n","N",datasource)} if(this.options.s.enabled){this.previews.s=new GeoFly.OmniViewer.Plugin.s57.s18.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_s","S",datasource)} if(this.options.w.enabled){this.previews.w=new GeoFly.OmniViewer.Plugin.s57.s18.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_w","W",datasource)} if(this.options.e.enabled){this.previews.e=new GeoFly.OmniViewer.Plugin.s57.s18.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" previewContainer mapContainer mapContainer_e","E",datasource)} if(this.options.ortho.enabled){this.previews.ortho=new GeoFly.OmniViewer.Plugin.s57.s18.Preview(this,this.divMapContainer,this.subViewer.getMainDiv().className+" ui-widget-content previewContainer mapContainer mapContainer_ortho","")}};Plugin.prototype.updateLayout=function(){this.subViewer.updatePreviewContainerLayout();if(this.subViewer.getMapContainerDiv()!==null){this.subViewer.getMapContainerDiv().style.maxWidth=(this.subViewer.getMapContainerDiv().parentElement.clientWidth-this.listViewWidth-this.resizerWidth)+"px";this.subViewer.getMapContainerDiv().style.width=(this.subViewer.getMapContainerDiv().parentElement.clientWidth-this.userListViewWidth-this.resizerWidth)+"px"}};Plugin.prototype.updatePosition=function(){var lookAtWgs84=this.subViewer.getLookAtWgs84();if(lookAtWgs84!==null){$(this).trigger("centerChanged",lookAtWgs84)}};Plugin.prototype.start=function(options){s4.prototype.start.call(this,options);var plugin=this;var viewer=this.subViewer.getCesiumViewer();viewer.canvas.addEventListener('pointerdown',function(e){plugin.pointerIsDown=!0;$(plugin).trigger("movestart")});viewer.canvas.addEventListener('pointerup',function(e){plugin.pointerIsDown=!1;$(plugin).trigger("moveend");plugin.updatePosition()});viewer.canvas.addEventListener('pointermove',function(e){if(plugin.pointerIsDown){plugin.updatePosition()}});this.timerUpdatePosition=setInterval(function(){plugin.foreachPreview(function(preview){var lookat=plugin.subViewer.getLookAtWgs84();if(lookat!==null){preview.setCenter(lookat[0],lookat[1])}})},2000)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this);if(this.timerUpdatePosition!==null){clearInterval(this.timerUpdatePosition)}};return Plugin}(GeoFly.OmniViewer.Plugin.s57.Plugin));s18.Plugin=Plugin})(s18=s57.s18||(s57.s18={}))})(s57=Plugin_1.s57||(Plugin_1.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s57;(function(s57){var s18;(function(s18){var Preview=(function(s4){__extends(Preview,s4);function Preview(plugin,parentDiv,className,viewDirection,datasource){return s4.call(this,plugin,parentDiv,className,viewDirection,datasource)||this} Preview.prototype.registerListeners=function(){var preview=this;$(this.plugin).on("centerChanged",function(event,lon,lat){preview.getActiveSubviewer().setCenter(lon,lat)});$(this.plugin).on("movestart",function(){preview.onMoveStart()});$(this.plugin).on("moveend",function(){preview.onMoveEnd()})};Preview.prototype.unregisterListeners=function(){var preview=this;$(this.plugin).off("centerChanged",function(event,lon,lat){preview.getActiveSubviewer().setCenter(lon,lat)});$(this.plugin).off("movestart",function(){preview.onMoveStart()});$(this.plugin).off("moveend",function(){preview.onMoveEnd()})};Preview.prototype.toLonLat=function(coord){return ol.proj.toLonLat(coord)};Preview.prototype.fromLonLat=function(coord){return ol.proj.fromLonLat(coord)};return Preview}(GeoFly.OmniViewer.Plugin.s57.Preview));s18.Preview=Preview})(s18=s57.s18||(s57.s18={}))})(s57=Plugin.s57||(Plugin.s57={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ObliqueImageName;(function(ObliqueImageName){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ObliqueImageName";s6.divImageName=null;return s6} Plugin.prototype.onObliqueAvailability=function(event,available){if(!available){this.divImageName.innerHTML="keine Vorschau verfügbar"}};Plugin.prototype.onUpdateTransformInfo=function(event,transformInfo){this.divImageName.innerHTML=transformInfo.imageId.match(".+%2F(.+)%2F.")[1]};Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);var plugin=this;this.divImageName=document.createElement("div");this.divImageName.style.position="absolute";this.divImageName.style.backgroundColor="rgba(255, 255, 255, 0.7)";this.divImageName.style.width="100%";this.divImageName.style.textAlign="center";this.divImageName.style.fontSize="0.8em";this.divImageName.innerHTML="";this.subViewer.getMainDiv().appendChild(this.divImageName);$(this.subViewer).on("onUpdateTransformInfo",function(event,transformInfo){plugin.onUpdateTransformInfo(event,transformInfo)});$(this.subViewer).on("obliqueAvailability",function(event,available){plugin.onObliqueAvailability(event,available)})};Plugin.prototype.stop=function(){var plugin=this;$(this.subViewer).off("onUpdateTransformInfo",function(event,transformInfo){plugin.onUpdateTransformInfo(event,transformInfo)});$(this.subViewer).off("obliqueAvailability",function(event,available){plugin.onObliqueAvailability(event,available)});if(this.divImageName!==null){this.subViewer.getMainDiv().removeChild(this.divImageName);this.divImageName=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=ObliqueImageName.Oblique||(ObliqueImageName.Oblique={}))})(ObliqueImageName=Plugin_1.ObliqueImageName||(Plugin_1.ObliqueImageName={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ViewDirection;(function(ViewDirection){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ViewDirection";s6.viewDirectionControl=null;return s6} Plugin.prototype.gets79=function(){return this.viewDirectionControl};Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);this.viewDirectionControl=new GeoFly.OmniViewer.Plugin.ViewDirection.s79(this.subViewer,{});this.getMap().addControl(this.viewDirectionControl);this.running=!0};Plugin.prototype.stop=function(){if(this.viewDirectionControl!==null){this.getMap().removeControl(this.viewDirectionControl);this.viewDirectionControl=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=ViewDirection.Oblique||(ViewDirection.Oblique={}))})(ViewDirection=Plugin_1.ViewDirection||(Plugin_1.ViewDirection={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var ViewDirection;(function(ViewDirection){var s79=(function(s4){__extends(s79,s4);function s79(subViewer,options){var s6=s4.call(this,options)||this;s6.subViewer=null;s6.extent=null;s6.divArrowContainer=null;s6.divArrow=null;s6.imgArrow=null;s6.imgMap=null;s6.viewDirection="N";var control=s6;s6.subViewer=subViewer;var options=options||{};var anchor=document.createElement('a');anchor.href='#zoom-to';anchor.className='zoom-to';var selectDirection=function(e){control.selectDirection(e)};s6.divArrowContainer=document.createElement('div');s6.divArrowContainer.className='omniviewer_plugin_viewdirection_div ol-unselectable';s6.divArrowContainer.appendChild(anchor);s6.divArrow=document.createElement('div');s6.divArrow.className='omniviewer_plugin_viewdirection_div_arrow ol-unselectable';s6.divArrowContainer.appendChild(s6.divArrow);s6.createImageMap();ol.control.Control.call(s6,{element:s6.divArrowContainer,map:subViewer.getMap(),target:options.target});return s6} s79.prototype.createImageMap=function(){var control=this;this.imgMap=document.createElement("map");this.imgMap.name="MapViewDirection";var areaN=document.createElement("area");areaN.shape="poly";areaN.coords="0,0,50,50,100,0";areaN.onclick=function(){control.subViewer.setViewDirection("N")};this.imgMap.appendChild(areaN);var areaE=document.createElement("area");areaE.shape="poly";areaE.coords="100,0,50,50,100,100";areaE.onclick=function(){control.subViewer.setViewDirection("E")};this.imgMap.appendChild(areaE);var areaS=document.createElement("area");areaS.shape="poly";areaS.coords="100,100,50,50,0,100";areaS.onclick=function(){control.subViewer.setViewDirection("S")};this.imgMap.appendChild(areaS);var areaW=document.createElement("area");areaW.shape="poly";areaW.coords="0,100,50,50,0,0";areaW.onclick=function(){control.subViewer.setViewDirection("W")};this.imgMap.appendChild(areaW);this.divArrow.appendChild(this.imgMap);this.imgArrow=document.createElement("img");this.imgArrow.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";this.imgArrow.useMap="#"+this.imgMap.name;this.divArrow.appendChild(this.imgArrow)};s79.prototype.setViewDirection=function(viewDirection){this.viewDirection=viewDirection;switch(viewDirection){case "N":this.divArrow.style.transform="rotateZ(0deg)";break;case "W":this.divArrow.style.transform="rotateZ(90deg)";break;case "S":this.divArrow.style.transform="rotateZ(180deg)";break;case "E":this.divArrow.style.transform="rotateZ(-90deg)";break}};s79.prototype.selectDirection=function(e){var control=this;e.preventDefault();var directions=["N","E","S","W"];var offset=0;var posX=e.layerX;var posY=e.layerY;if(posX>posY){offset=(posX+posY>100?1:0)}else{offset=(posX+posY>100?2:3)} this.subViewer.setViewDirection(directions[(directions.indexOf(this.viewDirection)+offset)%directions.length])};s79.prototype.setMap=function(map){ol.control.Control.prototype.setMap.call(this,map)};return s79}(ol.control.Control));ViewDirection.s79=s79})(ViewDirection=Plugin.ViewDirection||(Plugin.ViewDirection={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var Crosshairs;(function(Crosshairs){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="Crosshairs";s6.div=null;return s6} Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);var mapContainerDiv=this.subViewer.getMapContainerDiv();this.div=document.createElement("div");this.div.style.width="100%";this.div.style.height="100%";this.div.style.left="0px";this.div.style.top="0px";this.div.style.position="absolute";this.div.style.pointerEvents="none";this.div.style.backgroundPosition="center";this.div.style.backgroundRepeat="no-repeat";this.div.style.transform="perspective(600px) rotateX(45deg)";this.div.className="omniviewer_plugin_crosshairs_icon";mapContainerDiv.appendChild(this.div)};Plugin.prototype.stop=function(){if(this.div!==null){this.subViewer.getMapContainerDiv().removeChild(this.div);this.div=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.Oblique));Oblique.Plugin=Plugin})(Oblique=Crosshairs.Oblique||(Crosshairs.Oblique={}))})(Crosshairs=Plugin_1.Crosshairs||(Plugin_1.Crosshairs={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var Crosshairs;(function(Crosshairs){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="Crosshairs";s6.div=null;return s6} Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);var mapContainerDiv=this.subViewer.getMapContainerDiv();this.div=document.createElement("div");this.div.style.width="100%";this.div.style.height="100%";this.div.style.left="0px";this.div.style.top="0px";this.div.style.position="absolute";this.div.style.pointerEvents="none";this.div.style.backgroundPosition="center";this.div.style.backgroundRepeat="no-repeat";this.div.className="omniviewer_plugin_crosshairs_icon";mapContainerDiv.appendChild(this.div)};Plugin.prototype.stop=function(){if(this.div!==null){this.subViewer.getMapContainerDiv().removeChild(this.div);this.div=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=Crosshairs.OpenLayers||(Crosshairs.OpenLayers={}))})(Crosshairs=Plugin_1.Crosshairs||(Plugin_1.Crosshairs={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var Crosshairs;(function(Crosshairs){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="Crosshairs";s6.div=null;return s6} Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);var mapContainerDiv=this.subViewer.getMapContainerDiv();this.div=document.createElement("div");this.div.style.width="100%";this.div.style.height="100%";this.div.style.left="0px";this.div.style.top="0px";this.div.style.position="absolute";this.div.style.pointerEvents="none";this.div.style.backgroundPosition="center";this.div.style.backgroundRepeat="no-repeat";this.div.className="omniviewer_plugin_crosshairs_icon";mapContainerDiv.appendChild(this.div)};Plugin.prototype.stop=function(){if(this.div!==null){this.subViewer.getMapContainerDiv().removeChild(this.div);this.div=null} s4.prototype.stop.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.s18));s18.Plugin=Plugin})(s18=Crosshairs.s18||(Crosshairs.s18={}))})(Crosshairs=Plugin_1.Crosshairs||(Plugin_1.Crosshairs={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var GraphHopper;(function(GraphHopper){var EditMode;(function(EditMode){EditMode[EditMode.None=0]="None";EditMode[EditMode.AddSamplingPoint=1]="AddSamplingPoint";EditMode[EditMode.MoveSamplingPoint=2]="MoveSamplingPoint";EditMode[EditMode.SelectSamplingPoint=3]="SelectSamplingPoint"})(EditMode=GraphHopper.EditMode||(GraphHopper.EditMode={}))})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var GraphHopper;(function(GraphHopper){var AvoidAreas=(function(){function AvoidAreas(){this.divAvoidAreas=null;this.options=null;this.plugin=null;this.divRadioButtons=null;this.buttonDisableInteraction=null;this.labelNavigate=null;this.buttonNavigate=null;this.labelAddArea=null;this.buttonAddArea=null;this.labelEditArea=null;this.buttonEditArea=null;this.labelRemoveArea=null;this.buttonRemoveArea=null;this.modifierAddArea=null;this.modifierEditArea=null;this.modifierDeleteArea=null} AvoidAreas.prototype.init=function(divAvoidAreas,options,plugin){var avoidAreas=this;this.divAvoidAreas=divAvoidAreas;this.divAvoidAreas.style.width="285px";this.divAvoidAreas.style.height="0px";this.divAvoidAreas.style.overflow="hidden";this.options=options;this.plugin=plugin;var labelAvoidAreas=document.createElement("label");labelAvoidAreas.innerHTML="Vermeide Bereiche";labelAvoidAreas.dataset.i18n=labelAvoidAreas.innerHTML;this.divAvoidAreas.innerHTML="";this.divAvoidAreas.appendChild(labelAvoidAreas);this.divRadioButtons=document.createElement("div");this.buttonNavigate=document.createElement("input");this.buttonNavigate.innerHTML="+";this.buttonNavigate.type="radio";this.buttonNavigate.id="radioButtonNavigateAvoidArea";this.buttonNavigate.name="radioButtonsAvoidArea";this.buttonNavigate.checked=!0;this.buttonNavigate.onclick=function(){avoidAreas.disableInteraction()};this.divRadioButtons.appendChild(this.buttonNavigate);this.labelNavigate=document.createElement("label");this.labelNavigate.htmlFor="radioButtonNavigateAvoidArea";this.divRadioButtons.appendChild(this.labelNavigate);this.buttonAddArea=document.createElement("input");this.buttonAddArea.innerHTML="+";this.buttonAddArea.type="radio";this.buttonAddArea.id="radioButtonAddAvoidArea";this.buttonAddArea.name="radioButtonsAvoidArea";this.buttonAddArea.onclick=function(){avoidAreas.addAddAreaInteraction()};this.divRadioButtons.appendChild(this.buttonAddArea);this.labelAddArea=document.createElement("label");this.labelAddArea.htmlFor="radioButtonAddAvoidArea";this.divRadioButtons.appendChild(this.labelAddArea);this.buttonEditArea=document.createElement("input");this.buttonEditArea.innerHTML="Edit";this.buttonEditArea.type="radio";this.buttonEditArea.id="radioButtonEditAvoidArea";this.buttonEditArea.name="radioButtonsAvoidArea";this.buttonEditArea.onclick=function(){avoidAreas.addEditAreaInteraction()};this.divRadioButtons.appendChild(this.buttonEditArea);this.labelAddArea=document.createElement("label");this.labelAddArea.htmlFor="radioButtonEditAvoidArea";this.divRadioButtons.appendChild(this.labelAddArea);this.buttonRemoveArea=document.createElement("input");this.buttonRemoveArea.innerHTML="-";this.buttonRemoveArea.type="radio";this.buttonRemoveArea.id="radioButtonRemoveAvoidArea";this.buttonRemoveArea.name="radioButtonsAvoidArea";this.buttonRemoveArea.onclick=function(){avoidAreas.addRemoveAreaInteraction()};this.divRadioButtons.appendChild(this.buttonRemoveArea);this.labelRemoveArea=document.createElement("label");this.labelRemoveArea.htmlFor="radioButtonRemoveAvoidArea";this.divRadioButtons.appendChild(this.labelRemoveArea);this.divAvoidAreas.appendChild(this.divRadioButtons);$(this.divRadioButtons).children("input").checkboxradio({icons:!1})};AvoidAreas.prototype.deinit=function(){};AvoidAreas.prototype.open=function(){this.divAvoidAreas.style.height="50px"};AvoidAreas.prototype.close=function(){this.divAvoidAreas.style.height="0px"};AvoidAreas.prototype.toggle=function(){if(this.divAvoidAreas.style.height=="0px"){this.open()}else{this.close()}};AvoidAreas.prototype.disableInteraction=function(){this.plugin.getSubViewer().getModifierManager().pop(this.modifierAddArea);this.modifierAddArea=null;this.plugin.getSubViewer().getModifierManager().pop(this.modifierEditArea);this.modifierEditArea=null;this.plugin.getSubViewer().getModifierManager().pop(this.modifierDeleteArea);this.modifierDeleteArea=null};return AvoidAreas}());GraphHopper.AvoidAreas=AvoidAreas})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var GraphHopper;(function(GraphHopper){var Ui=(function(){function Ui(){this.plugin=null;this.options=null;this.ulSamplingPoints=null;this.divVehicleRadioButtons=null;this.vehicleButtons=[];this.divHeightProfile=null;this.divAvoidAreas=null;this.divRouteSummary=null;this.labelTotalTimeValue=null;this.labelTotalDistanceValue=null;this.labelHeightMetersValue=null;this.divTurnByTurn=null;this.heightProfile=null;this.buttonToggleHeightProfile=null;this.avoidAreas=null;this.buttonToggleAvoidAreas=null;this.buttonAddSamplingPoint=null;this.dragStartIndex=0} Ui.prototype.clearSamplingPoints=function(){this.ulSamplingPoints.innerHTML=""};Ui.prototype.addSamplingPoint=function(lon,lat,value){var gui=this;var li=document.createElement("li");var divImg=document.createElement("div");divImg.className="GraphHopper_samplingpoint_image";li.appendChild(divImg);var input=document.createElement("input");input.id="GraphHopper_input_"+this.plugin.samplingPoints.length;input.placeholder="Adresse o. auf Karte klicken";input.dataset.i18n=input.placeholder;input.value=value;var samplingPoint=this.plugin.createSamplingPoint(lon,lat,input);new GeoFly.GeoCoder.s12({input:input,geoCoderUrl:this.options.geoCoderUrl,select:function(event,ui){samplingPoint.setPosition(ui.item.data.geometry.coordinates[0],ui.item.data.geometry.coordinates[1]);gui.plugin.updateRoute();return!1}});li.appendChild(input);var buttonRemove=document.createElement("button");buttonRemove.innerHTML="X";buttonRemove.onclick=function(){for(var i=0;i=this.plugin.samplingPoints.length){var k=new_index-this.plugin.samplingPoints.length;while((k--)+1){this.plugin.samplingPoints.push(undefined)}} this.plugin.samplingPoints.splice(new_index,0,this.plugin.samplingPoints.splice(old_index,1)[0])};Ui.prototype.init=function(plugin,options){var gui=this;this.plugin=plugin;this.options=options;this.options.pluginContainerDiv.innerHTML="";this.ulSamplingPoints=document.createElement("ul");this.plugin.addSamplingPoint(this.addSamplingPoint(null,null,""));this.plugin.addSamplingPoint(this.addSamplingPoint(null,null,""));this.options.pluginContainerDiv.appendChild(this.ulSamplingPoints);$(this.ulSamplingPoints).sortable({start:function(event,ui){gui.dragStartIndex=$(ui.item).index()},update:function(event,ui){gui.reorderSamplingPoints(gui.dragStartIndex,$(ui.item).index());gui.plugin.updateRoute()}});$(this.ulSamplingPoints).disableSelection();this.buttonAddSamplingPoint=document.createElement("button");this.buttonAddSamplingPoint.innerHTML="+";this.buttonAddSamplingPoint.className="GraphHopperButtonAddSamplingPoint";this.buttonAddSamplingPoint.onclick=function(){var newSamplingPoint=gui.addSamplingPoint(null,null,"");gui.plugin.addSamplingPoint(newSamplingPoint);newSamplingPoint.getInput().focus()};this.options.pluginContainerDiv.appendChild(this.buttonAddSamplingPoint);this.divVehicleRadioButtons=document.createElement("div");this.divVehicleRadioButtons.id="GraphHopperVehicleRadioButtons";this.vehicleButtons=[];this.addVehicleType("car");this.addVehicleType("bike2");this.addVehicleType("mtb");this.addVehicleType("foot");this.options.pluginContainerDiv.appendChild(this.divVehicleRadioButtons);this.createToggleHeightProfileButton();this.createToggleAvoidAreasButton();this.divHeightProfile=document.createElement("div");this.divHeightProfile.innerHTML="Höhenprofil";this.divHeightProfile.id="GraphHopperToggleHeightProfile";this.options.pluginContainerDiv.appendChild(this.divHeightProfile);this.divAvoidAreas=document.createElement("div");this.divAvoidAreas.innerHTML="Vermeide Bereiche";this.divAvoidAreas.id="GraphHopperToggleAvoidAreas";this.options.pluginContainerDiv.appendChild(this.divAvoidAreas);this.addRouteSummary();this.divTurnByTurn=document.createElement("div");this.divTurnByTurn.id="divGraphhopperTurnbyturn";this.divTurnByTurn.className="graphhopper_div_turnbyturn";this.options.pluginContainerDiv.appendChild(this.divTurnByTurn);$("#GraphHopperVehicleRadioButtons input").checkboxradio({icons:!1});$("#GraphHopperToggleHeightProfileButton").checkboxradio({icons:!1});$("#GraphHopperToggleAvoidAreasButton").checkboxradio({icons:!1});document.getElementById("GraphHopperToggleHeightProfileLabel").innerHTML="";this.heightProfile=new GeoFly.OmniViewer.Plugin.GraphHopper.HeightProfile();this.heightProfile.init(this.divHeightProfile,this.options)};Ui.prototype.deinit=function(){if(this.options!==null){if(typeof this.options.pluginContainerDiv!=="undefined"&&this.options.pluginContainerDiv!==null){this.options.pluginContainerDiv.innerHTML=""}}};Ui.prototype.updateRouteSummary=function(data){var timeValue="0 Min.";if(typeof data.paths!=="undefined"&&typeof data.paths[0]!=="undefined"){if(data.paths[0].time*0.001>60){if(data.paths[0].time*0.001>3600){timeValue=Math.floor(data.paths[0].time*0.001/3600.0).toString()+" Std. "+(Math.floor(data.paths[0].time*0.001/60.0)%60).toString()+" Min."}else{timeValue=Math.round(data.paths[0].time*0.001/60.0).toString()+" Min."}}else{timeValue=Math.round(data.paths[0].time*0.001).toString()+" Sek."}} var distValue="0 km";if(typeof data.paths!=="undefined"&&typeof data.paths[0]!=="undefined"){if(data.paths[0].distance>1000){distValue=(data.paths[0].distance*0.001).toFixed(1)+" km"}else{distValue=Math.round(data.paths[0].distance).toString()+" m"}} var hmValue="0 Hm";if(typeof data.paths!=="undefined"&&typeof data.paths[0]!=="undefined"){hmValue=Math.round(data.paths[0].ascend).toString()+" Hm"} if(this.divRouteSummary!==null){this.divRouteSummary.innerHTML=timeValue+" ("+distValue+", "+hmValue+")"} this.setTurnByTurn(data);if(this.heightProfile!==null){this.heightProfile.update(data)}};return Ui}());GraphHopper.Ui=Ui})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var GraphHopper;(function(GraphHopper){var SamplingPoint=(function(){function SamplingPoint(plugin,lon,lat,input){this.plugin=null;this.input=null;this.pickModifier=null;this.plugin=plugin;this.setPosition(lon,lat);this.input=input} SamplingPoint.prototype.getLon=function(){return this.lon};SamplingPoint.prototype.getLat=function(){return this.lat};SamplingPoint.prototype.setPosition=function(lon,lat){this.lon=lon;this.lat=lat;if(this.input!==null&&lon!==null&&lat!==null&&lon!==0&&lat!==0){this.input.value=lon+", "+lat;this.reverseGeocode(lon,lat)}};SamplingPoint.prototype.getInput=function(){return this.input};SamplingPoint.prototype.reverseGeocode=function(lon,lat){var samplingPoint=this;var plugin=this.plugin;var r=new XMLHttpRequest();r.open("POST",plugin.getOptions().geoCoderUrl);r.setRequestHeader("Content-type","application/x-www-form-urlencoded");r.onload=function(){var result=JSON.parse(r.responseText);if(result.features.length>0){samplingPoint.input.value=result.features[0].properties.Straße+" "+result.features[0].properties.Hausnummer+", "+result.features[0].properties.Postleitzahl+" "+result.features[0].properties.Ort}};r.send("revgeocode="+lat+","+lon)};return SamplingPoint}());GraphHopper.SamplingPoint=SamplingPoint})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var GraphHopper;(function(GraphHopper){var OpenLayers;(function(OpenLayers){var Interaction=(function(){function Interaction(plugin){this.selectedSamplingPoint=null;this.currentSamplingPointIndex=-1;this.editSamplingPointModifier=null;this.plugin=plugin;var features=new ol.Collection();for(var i=0;i1000){tdDistance.innerHTML=(data.paths[0].instructions[i].distance*0.001).toFixed(1)+" km"}else{tdDistance.innerHTML=data.paths[0].instructions[i].distance.toFixed(0)+" m"}} tr.appendChild(tdDistance);table.appendChild(tr)} this.divTurnByTurn.appendChild(table)};return Ui}(GeoFly.OmniViewer.Plugin.GraphHopper.Ui));OpenLayers.Ui=Ui})(OpenLayers=GraphHopper.OpenLayers||(GraphHopper.OpenLayers={}))})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GraphHopper;(function(GraphHopper){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(subViewer){var s6=s4.call(this,subViewer)||this;s6.name="GraphHopper";s6.samplingPoints=[];s6.editMode=GeoFly.OmniViewer.Plugin.GraphHopper.EditMode.AddSamplingPoint;s6.router=null;s6.ui=null;s6.mapContainerDiv=null;s6.markerSource=null;s6.markerLayer=null;s6.routeSource=null;s6.routeLayer=null;s6.interaction=null;s6.locale="de";s6.router=new GeoFly.OmniViewer.Plugin.GraphHopper.Router();s6.ui=new GeoFly.OmniViewer.Plugin.GraphHopper.OpenLayers.Ui();s6.mapContainerDiv=s6.subViewer.getMainDiv();s6.markerSource=new ol.source.Vector();return s6} Plugin.prototype.getSubViewer=function(){return this.subViewer};Plugin.prototype.getOptions=function(){return this.options};Plugin.prototype.getUi=function(){return this.ui};Plugin.prototype.setLocale=function(locale){this.locale=locale};Plugin.prototype.start=function(options){var plugin=this;s4.prototype.start.call(this,options);this.ui.init(this,options);this.routeSource=new ol.source.Vector();this.routeLayer=new ol.layer.Vector({source:this.routeSource,style:new ol.style.Style({stroke:new ol.style.Stroke({width:3,color:[255,0,0,1]}),fill:new ol.style.Fill({color:[0,0,255,0.6]})})});this.getMap().addLayer(this.routeLayer);this.markerLayer=new ol.layer.Vector({source:this.markerSource,style:new ol.style.Style({image:new ol.style.Icon(({anchor:[0.5,1.0],anchorXUnits:'fraction',anchorYUnits:'fraction',opacity:0.95,src:'img/Marker_40.png'})),stroke:new ol.style.Stroke({width:3,color:[255,0,0,1]}),fill:new ol.style.Fill({color:[0,0,255,0.6]})})});this.getMap().addLayer(this.markerLayer);this.addInteraction()};Plugin.prototype.stop=function(){if(this.markerLayer!==null){for(var i=0;i1000){tdDistance.innerHTML=(data.paths[0].instructions[i].distance*0.001).toFixed(1)+" km"}else{tdDistance.innerHTML=data.paths[0].instructions[i].distance.toFixed(0)+" m"}} tr.appendChild(tdDistance);table.appendChild(tr)} this.divTurnByTurn.appendChild(table)};return Ui}(GeoFly.OmniViewer.Plugin.GraphHopper.Ui));s18.Ui=Ui})(s18=GraphHopper.s18||(GraphHopper.s18={}))})(GraphHopper=Plugin.GraphHopper||(Plugin.GraphHopper={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var GraphHopper;(function(GraphHopper){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(subViewer){var s6=s4.call(this,subViewer)||this;s6.name="GraphHopper";s6.samplingPoints=[];s6.polyline=null;s6.editMode=GeoFly.OmniViewer.Plugin.GraphHopper.EditMode.AddSamplingPoint;s6.router=null;s6.ui=null;s6.mapContainerDiv=null;s6.interaction=null;s6.locale="de";s6.router=new GeoFly.OmniViewer.Plugin.GraphHopper.Router();s6.ui=new GeoFly.OmniViewer.Plugin.GraphHopper.s18.Ui();s6.mapContainerDiv=s6.subViewer.getMainDiv();return s6} Plugin.prototype.getSubViewer=function(){return this.subViewer};Plugin.prototype.getOptions=function(){return this.options};Plugin.prototype.getUi=function(){return this.ui};Plugin.prototype.setLocale=function(locale){this.locale=locale};Plugin.prototype.start=function(options){var plugin=this;s4.prototype.start.call(this,options);this.ui.init(this,options);this.addInteraction()};Plugin.prototype.stop=function(){this.ui.deinit();this.removeInteraction();s4.prototype.stop.call(this)};Plugin.prototype.getInteraction=function(){return this.interaction};Plugin.prototype.addInteraction=function(){if(this.interaction!==null){this.interaction.destroy()} this.interaction=new OmniViewer.Plugin.GraphHopper.s18.Interaction(this)};Plugin.prototype.removeInteraction=function(){if(this.interaction!==null){this.interaction.destroy();this.interaction=null}};Plugin.prototype.createSamplingPoint=function(lon,lat,input){return new GeoFly.OmniViewer.Plugin.GraphHopper.s18.SamplingPoint(this,lon,lat,input)};Plugin.prototype.addSamplingPoint=function(samplingPoint){this.samplingPoints.push(samplingPoint);this.updateRoute()};Plugin.prototype.clearSamplingPoints=function(){this.ui.clearSamplingPoints();this.samplingPoints=[]};Plugin.prototype.setSamplingPoints=function(samplingPoints){for(var i=0;i=dist){return data.paths[0].points.coordinates[i][2]}} return 0};HeightProfile.prototype.update=function(data){this.data.labels=[];this.data.datasets[0].data=[];if(typeof data.paths!=="undefined"&&typeof data.paths[0]!=="undefined"){var totalDist=0;for(var i=1;iplugin.minZoom){plugin.switchToOblique()}}})};Plugin.prototype.unregisterOsmEvents=function(){if(this.zoomChangeEvent!==null){var subViewer=this.getSubViewer();subViewer.getMap().un("moveend",this.zoomChangeEvent)} this.zoomChangeEvent=null};Plugin.prototype.switchToOblique=function(){this.unregisterOsmEvents();this.getSubViewer().getViewer().activateSubviewer("oblique")};Plugin.prototype.getSyncData=function(){return{}};Plugin.prototype.setSyncData=function(data){this.minZoom=data.minZoom};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=ObliqueCoverage.OpenLayers||(ObliqueCoverage.OpenLayers={}))})(ObliqueCoverage=Plugin_1.ObliqueCoverage||(Plugin_1.ObliqueCoverage={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var s46;(function(s46){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="s46";s6.loadingCount=0;return s6} Plugin.prototype.getConnectors=function(){var connectors=[];for(var i=0;i=2){evt.feature.getStyle().getText().setFont(plugin.getTextFont(evt.feature.getGeometry(),evt.feature.getStyle().getText().getText()))}})}});this.setStyle(this.currentStyle);this.getMap().addLayer(this.vectorLayer)};Plugin.prototype.setInitialStyle=function(){var style={fill:{color:this.initialFillColor},stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth,lineDash:[]},image:{fill:{color:this.initialFillColor},stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth},radius:5},text:{text:"Textlabel",baseLine:"bottom",textAlign:"left",stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth},fill:{color:this.initialFillColor},rotation:0,placement:"line",maxAngle:!1,overflow:!0}};this.setStyle(style)};Plugin.prototype.updatePointStyle=function(style){var radius=style.image.radius;this.setStyle(style);var plugin=this;this.currentFeatures.forEach(function(item,index,array){plugin.setFeatureStyle(item,style)});document.getElementById("inputAnnotationPointStylePreview").style.width=(radius*2-style.image.stroke.width)+"px";document.getElementById("inputAnnotationPointStylePreview").style.height=(radius*2-style.image.stroke.width)+"px";document.getElementById("inputAnnotationPointStylePreview").style.borderRadius="100px";document.getElementById("inputAnnotationPointStylePreview").style.backgroundColor=style.image.fill.color;document.getElementById("inputAnnotationPointStylePreview").style.border=style.image.stroke.width+"px solid "+style.image.stroke.color;document.getElementById("labelAnnotationPointStrokeWidth").innerHTML=style.image.stroke.width.toString()};Plugin.prototype.updateLineStyle=function(style){this.setStyle(style);var plugin=this;this.currentFeatures.forEach(function(item,index,array){plugin.setFeatureStyle(item,style)});document.getElementById("inputAnnotationLineStylePreview").style.width="40px";document.getElementById("inputAnnotationLineStylePreview").style.height=(1-style.stroke.width)+"px";document.getElementById("inputAnnotationLineStylePreview").style.borderTop=style.stroke.width+"px solid "+style.stroke.color;document.getElementById("labelAnnotationLineStrokeWidth").innerHTML=style.stroke.width.toString()};Plugin.prototype.updatePolygonStyle=function(style){this.setStyle(style);var plugin=this;this.currentFeatures.forEach(function(item,index,array){plugin.setFeatureStyle(item,style)});document.getElementById("inputAnnotationPolygonStylePreview").style.width=(40-style.stroke.width)+"px";document.getElementById("inputAnnotationPolygonStylePreview").style.height=(10-style.stroke.width)+"px";document.getElementById("inputAnnotationPolygonStylePreview").style.backgroundColor=style.fill.color;document.getElementById("inputAnnotationPolygonStylePreview").style.border=style.stroke.width+"px solid "+style.stroke.color;document.getElementById("labelAnnotationPolygonStrokeWidth").innerHTML=style.stroke.width.toString()};Plugin.prototype.updateTextStyle=function(style){this.setStyle(style);var plugin=this;this.currentFeatures.forEach(function(item,index,array){plugin.setFeatureStyle(item,style)});document.getElementById("inputAnnotationTextStylePreview").style.width=(40-style.text.stroke.width)+"px";document.getElementById("inputAnnotationTextStylePreview").style.height=(10-style.text.stroke.width)+"px";document.getElementById("inputAnnotationTextStylePreview").style.backgroundColor=style.text.fill.color;document.getElementById("inputAnnotationTextStylePreview").style.border=style.text.stroke.width+"px solid "+style.text.stroke.color;document.getElementById("labelAnnotationTextStrokeWidth").innerHTML=style.text.stroke.width.toString()};Plugin.prototype.startCreateGeometry=function(){this.stopCreateGeometry();if(this.currentGeometryType==GeoFly.OmniViewer.Plugin.Annotations.GeometryType.text){this.currentStyle.stroke.lineDash=this.lineDash}else{this.currentStyle.stroke.lineDash=[];this.currentStyle.text.text=""} this.setStyle(this.currentStyle);this.enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.create)};Plugin.prototype.stopCreateGeometry=function(){this.disableInteraction()};Plugin.prototype.setStyle=function(style){this.currentStyle=style;if(this.vectorLayer!==null){if(this.currentGeometryType==GeoFly.OmniViewer.Plugin.Annotations.GeometryType.point){this.vectorLayer.setStyle(new ol.style.Style({image:new ol.style.Circle({stroke:new ol.style.Stroke(style.image.stroke),fill:new ol.style.Fill(style.image.fill),radius:style.image.radius})}))}else{this.vectorLayer.setStyle(new ol.style.Style({stroke:new ol.style.Stroke(style.stroke),fill:new ol.style.Fill(style.fill),}))}}};Plugin.prototype.getStyle=function(){return this.currentStyle};Plugin.prototype.setGeometryType=function(geometryType){this.currentGeometryType=geometryType;this.startCreateGeometry()};Plugin.prototype.getGeometryType=function(feature){for(var i=0;i0){this.setStyle(options.annotations[options.annotations.length-1].style)} this.setGeometryType(options.geometryType);this.startCreateGeometry();if(options.interactionType!==GeoFly.OmniViewer.Plugin.Annotations.InteractionType.none){this.enableInteraction(options.interactionType)}else{this.disableInteraction()}};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=Annotations.OpenLayers||(Annotations.OpenLayers={}))})(Annotations=Plugin_1.Annotations||(Plugin_1.Annotations={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var Annotations;(function(Annotations){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.tempInteractionType=null;return s6} Plugin.prototype.start=function(options){s4.prototype.start.call(this,GeoFly.OmniViewer.Util.getMergedOptions({geoJsonStrings:""},options));this.subViewer.updateTransformationParams()};Plugin.prototype.getAnnotationsConfig=function(sourceProjection){if(sourceProjection===void 0){sourceProjection=null} return s4.prototype.getAnnotationsConfig.call(this,this.subViewer.getProjection().getCustomProjectionId())};Plugin.prototype.beforeUpdateTransformInfo=function(transformationInfo){};Plugin.prototype.afterUpdateTransformInfo=function(transformationInfo){};return Plugin}(GeoFly.OmniViewer.Plugin.Annotations.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=Annotations.Oblique||(Annotations.Oblique={}))})(Annotations=Plugin_1.Annotations||(Plugin_1.Annotations={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var ExportImage;(function(ExportImage){var OptionsDialog=(function(){function OptionsDialog(options){this.dialogFormDiv=null;this.dpiSelect=null;this.formatSelect=null;this.layoutSelect=null;this.progressBarContainerDiv=null;this.progressBarDiv=null;this.dialog=null;this.previewDiv=null;this.titleInput=null;this.freeTextInput=null;this.previewBlob=null;this.previewLogo=null;this.compassImage=null;this.options=options} OptionsDialog.prototype.getFormat=function(){return this.formatSelect.value};OptionsDialog.prototype.getLayout=function(){return this.layoutSelect.value};OptionsDialog.prototype.onParamsUpdated=function(){window.localStorage.setItem("PluginExportImage_format",this.formatSelect.value);window.localStorage.setItem("PluginExportImage_layout",this.layoutSelect.value);window.localStorage.setItem("PluginExportImage_dpi",this.dpiSelect.value);window.localStorage.setItem("PluginExportImage_title",this.titleInput.value);window.localStorage.setItem("PluginExportImage_freeText",this.freeTextInput.value);var dim=this.getFormatDimInPixels(this.formatSelect.value,parseFloat(this.dpiSelect.value));if(this.layoutSelect.value=="landscape"){dim=[dim[1],dim[0]]} this.previewDiv.style.width=(parseFloat(this.previewDiv.style.height)*dim[0]/dim[1])+"px";this.previewDiv.style.backgroundSize="cover";this.previewDiv.style.backgroundPosition="center"};OptionsDialog.prototype.getFormatDimInMM=function(format){switch(format){case "A5":return[148,210];case "A4":return[210,297];case "A3":return[297,420]} return[1,1]};OptionsDialog.prototype.getFormatDimInPixels=function(format,dpi){var dimMM=this.getFormatDimInMM(format);return[dimMM[0]/25.4*dpi,dimMM[1]/25.4*dpi]};OptionsDialog.prototype.createPreviewDiv=function(height){var dialog=this;this.previewDiv=document.createElement("div");this.previewDiv.style.width="1px";this.previewDiv.style.height=height+"px";this.previewDiv.style.marginTop="30px";this.previewDiv.style.border="1px solid #aaa";this.previewDiv.style.position="relative";this.titleInput=document.createElement("input");this.titleInput.style.width="100%";this.titleInput.style.marginTop="0";this.titleInput.style.border="0";this.titleInput.style.textAlign="center";this.titleInput.style.fontSize="17px";this.titleInput.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.titleInput.placeholder="Überschrift (optional)";this.titleInput.value=window.localStorage.getItem("PluginExportImage_title");this.titleInput.onchange=function(){window.localStorage.setItem("PluginExportImage_title",dialog.titleInput.value)};if(this.options.optionsDialog.showTitleInput){this.previewDiv.appendChild(this.titleInput)} this.freeTextInput=document.createElement("textarea");this.freeTextInput.style.position="absolute";this.freeTextInput.style.width="210px";this.freeTextInput.style.bottom="0";this.freeTextInput.style.right="0";this.freeTextInput.style.border="0";this.freeTextInput.style.fontSize="17px";this.freeTextInput.style.backgroundColor="rgba(255, 255, 255, 0.5)";this.freeTextInput.placeholder="Freitext (optional)";this.freeTextInput.value=window.localStorage.getItem("PluginExportImage_freeText");this.freeTextInput.oninput=function(){window.localStorage.setItem("PluginExportImage_freeText",dialog.freeTextInput.value)};if(this.options.optionsDialog.showFreeTextInput){this.previewDiv.appendChild(this.freeTextInput)} this.dialogFormDiv.appendChild(this.previewDiv)};OptionsDialog.prototype.createContentDiv=function(){var dialog=this;this.dialogFormDiv=document.createElement("div");this.dialogFormDiv.style.alignContent="center";this.dialogFormDiv.title="";var table=document.createElement("table");var tr=document.createElement("tr");var td=document.createElement("td");td.innerHTML="Papierformat";tr.appendChild(td);td=document.createElement("td");this.formatSelect=document.createElement("select");var savedExportFormat=window.localStorage.getItem("PluginExportImage_format");for(var i=0;i0&&idx<=words.length){var str=words.slice(0,idx).join(' ');var w=context.measureText(str).width;if(w>fitWidth){if(idx==1){idx=2} context.fillText(words.slice(0,idx-1).join(' '),x,y+(lineHeight*currentLine));++currentLine;words=words.splice(idx-1);idx=1}else{idx++}} if(idx>0){context.fillText(words.join(' '),x,y+(lineHeight*currentLine))} ++currentLine}};OptionsDialog.prototype.drawFreeText=function(context,boxPos,boxSize){if(this.freeTextInput.value!==""){var pos={x:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.freeText.position.x),y:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.freeText.position.y)};var fontSize=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.freeText.textHeight);context.fillStyle=(typeof this.options.optionsDialog.detailBox.freeText.color!=="undefined"?this.options.optionsDialog.detailBox.freeText.color:"black");context.font=Math.round(fontSize)+"px Arial";this.printAtWordWrap(context,this.freeTextInput.value,Math.round(boxPos[0]+pos.x),Math.round(boxPos[1]+pos.y),Math.round(fontSize),boxSize[0]-pos.x)}};OptionsDialog.prototype.drawPrintDate=function(context,boxPos,boxSize){var pos={x:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.createDateText.position.x),y:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.createDateText.position.y)};var fontSize=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.createDateText.textHeight);context.fillStyle=(typeof this.options.optionsDialog.detailBox.createDateText.color!=="undefined"?this.options.optionsDialog.detailBox.createDateText.color:"black");context.font=Math.round(fontSize)+"px Arial";context.fillText("Erstellungsdatum:",Math.round(boxPos[0]+pos.x),Math.round(boxPos[1]+pos.y));var currDate=new Date();context.fillText((currDate.getDate()<10?"0":"")+currDate.getDate()+"."+(currDate.getMonth()<9?"0":"")+(currDate.getMonth()+1)+"."+currDate.getFullYear(),Math.round(boxPos[0]+pos.x+fontSize*10.0),Math.round(boxPos[1]+pos.y))};OptionsDialog.prototype.addCommas=function(nStr){nStr+='';var x=nStr.split('.');var x1=x[0];var x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+'.'+'$2')} return x1+x2};OptionsDialog.prototype.drawScale=function(context,boxPos,boxSize){var scale=this.getScale();if(scale!==null){var pos={x:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.scaleText.position.x),y:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.scaleText.position.y)};var fontSize=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.scaleText.textHeight);context.fillStyle=(typeof this.options.optionsDialog.detailBox.scaleText.color!=="undefined"?this.options.optionsDialog.detailBox.scaleText.color:"black");context.font=Math.round(fontSize)+"px Arial";context.fillText("Maßstab:",Math.round(boxPos[0]+pos.x),Math.round(boxPos[1]+pos.y));context.fillText("1 : "+this.addCommas(this.getScale().toString()),Math.round(boxPos[0]+pos.x+fontSize*10.0),Math.round(boxPos[1]+pos.y))}};OptionsDialog.prototype.drawCopyrightText=function(context,boxPos,boxSize){if(typeof this.options.optionsDialog.detailBox.copyright!=="undefined"&&this.options.optionsDialog.detailBox.copyright.text!==""){var pos={x:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.copyright.position.x),y:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.copyright.position.y)};var fontSize=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.copyright.textHeight);context.fillStyle=(typeof this.options.optionsDialog.detailBox.copyright.color!=="undefined"?this.options.optionsDialog.detailBox.copyright.color:"black");context.font=Math.round(fontSize)+"px Arial";context.fillText(this.options.optionsDialog.detailBox.copyright.text,Math.round(boxPos[0]+pos.x),Math.round(boxPos[1]+pos.y))}};OptionsDialog.prototype.drawCompass=function(context,boxPos,boxSize,onFinish){var dialog=this;var pos={x:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.compass.position.x),y:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.compass.position.y)};var size={width:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.compass.size.width),height:Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.compass.size.height)};this.compassImage=document.createElement("img");this.compassImage.onload=function(){context.drawImage(dialog.compassImage,boxPos[0]+pos.x+size.width*0.1,boxPos[1]+pos.y+size.height*0.1,size.width*0.8,size.height*0.8);var fontSize=parseFloat(dialog.dpiSelect.value)/25.4*dialog.options.optionsDialog.detailBox.compass.size.width*0.15;context.fillStyle="black";context.font=Math.round(fontSize)+"px Arial";var labels={"N":["N","W","E","S"],"W":["W","S","N","E"],"S":["S","E","W","N"],"E":["E","N","S","W"]};context.fillText(labels[dialog.options.optionsDialog.viewDirection][0],Math.round(boxPos[0]+pos.x+(size.width*0.44)),Math.round(boxPos[1]+pos.y+(size.height*0.14)));context.fillText(labels[dialog.options.optionsDialog.viewDirection][1],Math.round(boxPos[0]+pos.x+(size.width*0.02)),Math.round(boxPos[1]+pos.y+(size.height*0.56)));context.fillText(labels[dialog.options.optionsDialog.viewDirection][2],Math.round(boxPos[0]+pos.x+(size.width*0.85)),Math.round(boxPos[1]+pos.y+(size.height*0.56)));context.fillText(labels[dialog.options.optionsDialog.viewDirection][3],Math.round(boxPos[0]+pos.x+(size.width*0.44)),Math.round(boxPos[1]+pos.y+(size.height*0.98)));onFinish()};this.compassImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wAAAAAzJ3zzAAAACXBIWXMAABcSAAAXEgFnn9JSAAAAB3RJTUUH4gkTDSwWHdnHhQAAA8tJREFUeNrt3b1O21AYxvHHLRK34UtAXEGlpKrkjYGpnWm88bGyMWVgT7t3YmAiQ52oN8AAV+CVJrAhJsrpUCdKQxwfxyc573N4HylDl4rmn/cXCVkqoNPpdDqdTqfT6XQ6Hfm2AFwVry19O/yvfXx8bNI0NQDa7P+YdwEE2U+SBHEcA8C+BvHP1d7Ozg7yPAeAPWVLAFfGGAMgCLbYL2Q/SZLpH0JgiznIlKvJlC0hXE3ICoEt5gv5j6tQ2GIN8oorZUsQV7NksbPFeiELuQqBLcYgpVwpW0K4mieLmS3GC1nKFTtbbEEquVK2BHC1iCxWttguxIorZraYglhzpWx55qqMLEa2mC6kFlesbLEEqc2VsuWRq2VksbHFciErccXIFkOQlblStjxxVUUWE1sMF9KIKza2pAdpzJWy5YErG7JY2JJ+IU64YmJrS+jP9KF44z674GqOrS8AIgAXAH4BeFaIFkdoA/gGYJSmqel2u6bT6Zgsy5yRNRgMzP39vRkOh+bk5MQAGAP4DuCjfrcsiTD/RtpEsYkxP41TI0LdKHVjvOU4K0eoE6VJjLcQx1kE2yiuYoQUZ20RbKKsIwZjnI1FqIqy7hiS43iLsCzKJmNIiCMmQlkUXzFcx4ksg1ylaZrEcYw8z9Hr9UR9eWVZhiiK0Gq1RP1cDw8PuL29Rb/fx/n5+U8An1z9Lutle3sbu7u7ODs7gzFG1Gv66YoiUa/T01NcX1/j6ekJAF5cxn4PoAWgB2B0eHhosiwz4/HYOxFZlhkAxhhjBoOBd0I7nY7pdruT3yyPCubb6/w+mY3z22ecSYxJEF9RfEQQF2c2xmyQTUWRFMF7nPkY80HWFYUhglWco6MjZ3EWxVgUxFUU5ghrv5yyGGVBVo0SYgTncZbFWBbENspbitA4TlWMqiBlUTTCCnFsYtgEmUTRCM3iPBZvnJMg4/HYAHiUHEHip+IPgGHxiuI4PnD1F9/c3ADADwBfpX4apT+XdVE8uuNk/X4f+Pf4j67BBY9s2LLkaiT9u0L6hTwDuCyeOHTB1SWEPxjH8PS7E7aUqw2zFQJXLBfSmC0WrliCNGZLufLAVghcMV3IymwxccUUZGW2lCtPbIXAFduF1GaLjSu2ILXZUq48shUCV4wXYs0WI1eMQazZUq48sxUCV6wXUskWK1esQSrZUq4EsBUCV8wXUsoWM1fMQUrZUq6EsBUCV+wX8ootdq7Yg7xiS7kSxFYIXIVwIVO2QuAKCOOJ74s8zw/u7u6UK0EfKv0P7nU6nU6n0+l0Op1OF8b+At8bvnnR65n7AAAAAElFTkSuQmCC"};OptionsDialog.prototype.drawDetailBox=function(canvas,onFinish){var dialog=this;var ctx=canvas.getContext("2d");ctx.fillStyle="white";ctx.strokeStyle="black";ctx.lineWidth=1;var detailBoxSizeWidth=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.size.width);var detailBoxSizeHeight=Math.round(parseFloat(this.dpiSelect.value)/25.4*this.options.optionsDialog.detailBox.size.height);var boxSize=[Math.min(canvas.width,detailBoxSizeWidth),Math.min(canvas.width,detailBoxSizeHeight)];var boxPos=[canvas.width-boxSize[0],canvas.height-boxSize[1]];ctx.rect(boxPos[0],boxPos[1],boxSize[0],boxSize[1]);ctx.fill();ctx.stroke();this.drawLogo(ctx,boxPos,boxSize,function(){dialog.drawFreeText(ctx,boxPos,boxSize);dialog.drawScale(ctx,boxPos,boxSize);dialog.drawPrintDate(ctx,boxPos,boxSize);dialog.drawCopyrightText(ctx,boxPos,boxSize);dialog.drawCompass(ctx,boxPos,boxSize,function(){onFinish()})})};OptionsDialog.prototype.show=function(onExport,onClose){var dialog=this;this.createContentDiv();var buttons={};buttons[this.options.optionsDialog.exportLabel]=function(){onExport()};buttons[this.options.optionsDialog.cancelLabel]=function(){dialog.dialog.dialog("close")};this.dialog=$(this.dialogFormDiv).dialog({autoOpen:!1,height:620,width:465,modal:!0,buttons:buttons,close:function(){onClose()}});this.dialog.dialog("open")};OptionsDialog.prototype.close=function(){if(this.dialog!==null){this.dialog.dialog("close");this.dialog=null}};return OptionsDialog}());ExportImage.OptionsDialog=OptionsDialog})(ExportImage=Plugin.ExportImage||(Plugin.ExportImage={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var ExportImage;(function(ExportImage){var OpenLayers;(function(OpenLayers){var OptionsDialog=(function(s4){__extends(OptionsDialog,s4);function OptionsDialog(options,subViewer){var s6=s4.call(this,options)||this;s6.subViewer=null;s6.originalMapContainer=null;s6.initialMapSize=[null,null];s6.initialMaxWidth=null;s6.initialZoom=0;s6.mapPrintContainer=null;s6.subViewer=subViewer;return s6} OptionsDialog.prototype.createContentDiv=function(){s4.prototype.createContentDiv.call(this);this.createPrintMap();return this.dialogFormDiv};OptionsDialog.prototype.extractPreviewBlob=function(){var dialog=this;var canvases=$(this.subViewer.getMap().getViewport()).find("canvas");if(canvases.length>0){canvases[0].toBlob(function(blob){dialog.previewBlob=blob;dialog.previewDiv.style.backgroundImage="url("+URL.createObjectURL(blob)+")"})}};OptionsDialog.prototype.createPrintMap=function(){var dialog=this;this.extractPreviewBlob();this.subViewer.getViewer().startPlugin("LayerLoadingStatus",{onLoadStart:function(){dialog.setExportButtonStatus(!1);dialog.progressBarContainerDiv.style.opacity="1"},onLoadFinish:function(){dialog.setExportButtonStatus(!0);dialog.progressBarContainerDiv.style.opacity="0"},onLoadProgress:function(progress){dialog.setExportButtonStatus(!1);dialog.progressBarContainerDiv.style.opacity="1";dialog.progressBarDiv.style.width=(progress*100.0)+"%"}});this.originalMapContainer=this.subViewer.getMapContainerDiv().parentElement;this.initialMapSize=this.subViewer.getMap().getSize();this.initialMaxWidth=this.subViewer.getMapContainerDiv().style.maxWidth;this.subViewer.getMapContainerDiv().style.maxWidth="";this.initialZoom=this.subViewer.getMap().getView().getZoom();var mapPrintScrollBox=document.createElement("div");mapPrintScrollBox.style.position="relative";mapPrintScrollBox.style.width="20px";mapPrintScrollBox.style.height="20px";mapPrintScrollBox.style.overflow="scroll";mapPrintScrollBox.style.opacity="0";this.mapPrintContainer=document.createElement("div");this.mapPrintContainer.style.position="absolute";this.mapPrintContainer.style.width="600px";this.mapPrintContainer.style.height="400px";this.mapPrintContainer.appendChild(this.subViewer.getMapContainerDiv());mapPrintScrollBox.appendChild(this.mapPrintContainer);this.dialogFormDiv.appendChild(mapPrintScrollBox);setTimeout(function(){dialog.subViewer.getMap().updateSize()},500);this.onParamsUpdated()};OptionsDialog.prototype.revertPrintMap=function(){this.subViewer.getMapContainerDiv().style.width=this.initialMapSize[0]+"px";this.subViewer.getMapContainerDiv().style.height=this.initialMapSize[1]+"px";this.subViewer.getMapContainerDiv().style.maxWidth=this.initialMaxWidth;this.originalMapContainer.appendChild(this.subViewer.getMapContainerDiv());this.subViewer.getMap().getView().setZoom(this.initialZoom);this.subViewer.updateSize()};OptionsDialog.prototype.onParamsUpdated=function(){s4.prototype.onParamsUpdated.call(this);var dpi=parseInt(this.dpiSelect.value);var format=this.formatSelect.value;var dim=this.getFormatDimInPixels(format,dpi);if(this.layoutSelect.value=="landscape"){dim=[dim[1],dim[0]]} var scaleRatio=Math.min(dim[0]/this.initialMapSize[0],dim[1]/this.initialMapSize[1]);this.mapPrintContainer.style.width=dim[0]+"px";this.mapPrintContainer.style.height=Math.round(dim[1]*this.options.optionsDialog.pageHeightScale)+"px";this.subViewer.getMapContainerDiv().style.width=this.mapPrintContainer.style.width;this.subViewer.getMapContainerDiv().style.height=this.mapPrintContainer.style.height;this.subViewer.getMap().updateSize();this.subViewer.getMap().getView().setZoom(this.initialZoom+(Math.log(scaleRatio)*Math.LOG2E))};OptionsDialog.prototype.getScale=function(){var dimMM=this.getFormatDimInMM(this.formatSelect.value);return Math.round(this.subViewer.getMap().getView().getResolution()*parseFloat(this.mapPrintContainer.style.width)/dimMM[0]*1000.0)};return OptionsDialog}(GeoFly.OmniViewer.Plugin.ExportImage.OptionsDialog));OpenLayers.OptionsDialog=OptionsDialog})(OpenLayers=ExportImage.OpenLayers||(ExportImage.OpenLayers={}))})(ExportImage=Plugin.ExportImage||(Plugin.ExportImage={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var ExportImage;(function(ExportImage){var Oblique;(function(Oblique){var OptionsDialog=(function(s4){__extends(OptionsDialog,s4);function OptionsDialog(){return s4!==null&&s4.apply(this,arguments)||this} OptionsDialog.prototype.getScale=function(){return null};return OptionsDialog}(GeoFly.OmniViewer.Plugin.ExportImage.OpenLayers.OptionsDialog));Oblique.OptionsDialog=OptionsDialog})(Oblique=ExportImage.Oblique||(ExportImage.Oblique={}))})(ExportImage=Plugin.ExportImage||(Plugin.ExportImage={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPng;(function(ExportPng){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPng";return s6} Plugin.prototype.start=function(options){if(options===void 0){options={}} s4.prototype.start.call(this,options);var plugin=this;setTimeout(function(){plugin.doExport()},1)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.doExport=function(){var plugin=this;this.getMap().once('postcompose',function(event){html2canvas(plugin.subViewer.getViewer().getActiveSubviewer().getMainDiv()).then(function(canvas){if(navigator.msSaveBlob){navigator.msSaveBlob(canvas.msToBlob(),(typeof plugin.options.fileName=="undefined"?'map.png':plugin.options.fileName))}else{canvas.toBlob(function(blob){window.saveAs(blob,(typeof plugin.options.fileName=="undefined"?'map.png':plugin.options.fileName))})}})});plugin.getMap().renderSync();this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPng.OpenLayers||(ExportPng.OpenLayers={}))})(ExportPng=Plugin_1.ExportPng||(Plugin_1.ExportPng={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPng;(function(ExportPng){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} return Plugin}(GeoFly.OmniViewer.Plugin.ExportPng.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPng.Oblique||(ExportPng.Oblique={}))})(ExportPng=Plugin_1.ExportPng||(Plugin_1.ExportPng={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPngHQ;(function(ExportPngHQ){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPngHQ";return s6} Plugin.prototype.getSubViewer=function(){return this.subViewer};Plugin.prototype.start=function(options){if(typeof options=="undefined"){options={fileName:"",optionsDialog:{dpiOptions:[72],formatOptions:["A4"],exportLabel:"Export",cancelLabel:"Cancel",showTitleInput:!0,showFreeTextInput:!0,detailBox:{size:{width:50,height:50},logo:{url:"",position:{x:0,y:0},size:{width:10,height:10}},compass:{url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wAAAAAzJ3zzAAAACXBIWXMAABcSAAAXEgFnn9JSAAAAB3RJTUUH4gkTDSwWHdnHhQAAA8tJREFUeNrt3b1O21AYxvHHLRK34UtAXEGlpKrkjYGpnWm88bGyMWVgT7t3YmAiQ52oN8AAV+CVJrAhJsrpUCdKQxwfxyc573N4HylDl4rmn/cXCVkqoNPpdDqdTqfT6XQ6Hfm2AFwVry19O/yvfXx8bNI0NQDa7P+YdwEE2U+SBHEcA8C+BvHP1d7Ozg7yPAeAPWVLAFfGGAMgCLbYL2Q/SZLpH0JgiznIlKvJlC0hXE3ICoEt5gv5j6tQ2GIN8oorZUsQV7NksbPFeiELuQqBLcYgpVwpW0K4mieLmS3GC1nKFTtbbEEquVK2BHC1iCxWttguxIorZraYglhzpWx55qqMLEa2mC6kFlesbLEEqc2VsuWRq2VksbHFciErccXIFkOQlblStjxxVUUWE1sMF9KIKza2pAdpzJWy5YErG7JY2JJ+IU64YmJrS+jP9KF44z674GqOrS8AIgAXAH4BeFaIFkdoA/gGYJSmqel2u6bT6Zgsy5yRNRgMzP39vRkOh+bk5MQAGAP4DuCjfrcsiTD/RtpEsYkxP41TI0LdKHVjvOU4K0eoE6VJjLcQx1kE2yiuYoQUZ20RbKKsIwZjnI1FqIqy7hiS43iLsCzKJmNIiCMmQlkUXzFcx4ksg1ylaZrEcYw8z9Hr9UR9eWVZhiiK0Gq1RP1cDw8PuL29Rb/fx/n5+U8An1z9Lutle3sbu7u7ODs7gzFG1Gv66YoiUa/T01NcX1/j6ekJAF5cxn4PoAWgB2B0eHhosiwz4/HYOxFZlhkAxhhjBoOBd0I7nY7pdruT3yyPCubb6/w+mY3z22ecSYxJEF9RfEQQF2c2xmyQTUWRFMF7nPkY80HWFYUhglWco6MjZ3EWxVgUxFUU5ghrv5yyGGVBVo0SYgTncZbFWBbENspbitA4TlWMqiBlUTTCCnFsYtgEmUTRCM3iPBZvnJMg4/HYAHiUHEHip+IPgGHxiuI4PnD1F9/c3ADADwBfpX4apT+XdVE8uuNk/X4f+Pf4j67BBY9s2LLkaiT9u0L6hTwDuCyeOHTB1SWEPxjH8PS7E7aUqw2zFQJXLBfSmC0WrliCNGZLufLAVghcMV3IymwxccUUZGW2lCtPbIXAFduF1GaLjSu2ILXZUq48shUCV4wXYs0WI1eMQazZUq48sxUCV6wXUskWK1esQSrZUq4EsBUCV8wXUsoWM1fMQUrZUq6EsBUCV+wX8ootdq7Yg7xiS7kSxFYIXIVwIVO2QuAKCOOJ74s8zw/u7u6UK0EfKv0P7nU6nU6n0+l0Op1OF8b+At8bvnnR65n7AAAAAElFTkSuQmCC",position:{x:0,y:0},size:{width:10,height:10}}},viewDirection:"N"}}} if(typeof options.optionsDialog.dpiOptions=="undefined"){options.optionsDialog.dpiOptions=[72]} if(typeof options.optionsDialog.formatOptions=="undefined"){options.optionsDialog.formatOptions=["A4"]} if(typeof options.optionsDialog.exportLabel=="undefined"){options.optionsDialog.exportLabel="Export"} if(typeof options.optionsDialog.cancelLabel=="undefined"){options.optionsDialog.cancelLabel="Cancel"} s4.prototype.start.call(this,options);var plugin=this;setTimeout(function(){plugin.doExport()},1)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.getOptionsDialog=function(options){return new Plugin_1.ExportImage.OpenLayers.OptionsDialog(options,this.subViewer)};Plugin.prototype.doExport=function(){var plugin=this;var dialogOptions=this.options;if(typeof dialogOptions.optionsDialog.pageHeightScale=="undefined"){dialogOptions.optionsDialog.pageHeightScale=1.0} if(typeof dialogOptions.optionsDialog.viewDirection=="undefined"){dialogOptions.optionsDialog.viewDirection="N"} var optionsDialog=this.getOptionsDialog(dialogOptions);optionsDialog.show(function(){plugin.getMap().once('postcompose',function(event){var canvas=event.context.canvas;optionsDialog.drawTitle(canvas);optionsDialog.drawDetailBox(canvas,function(){if(navigator.msSaveBlob){navigator.msSaveBlob(canvas.msToBlob(),(typeof plugin.options.fileName=="undefined"?'map.png':plugin.options.fileName))}else{canvas.toBlob(function(blob){window.saveAs(blob,(typeof plugin.options.fileName=="undefined"?'map.png':plugin.options.fileName))},"image/png")} optionsDialog.close()})});plugin.getMap().renderSync()},function(){optionsDialog.revertPrintMap();plugin.subViewer.getViewer().stopPlugin(plugin.name)})};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPngHQ.OpenLayers||(ExportPngHQ.OpenLayers={}))})(ExportPngHQ=Plugin_1.ExportPngHQ||(Plugin_1.ExportPngHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPngHQ;(function(ExportPngHQ){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.getOptionsDialog=function(options){options.optionsDialog.viewDirection=this.subViewer.getViewDirection();return new Plugin_1.ExportImage.Oblique.OptionsDialog(options,this.subViewer)};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPngHQ.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPngHQ.Oblique||(ExportPngHQ.Oblique={}))})(ExportPngHQ=Plugin_1.ExportPngHQ||(Plugin_1.ExportPngHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPdf;(function(ExportPdf){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPdf";return s6} Plugin.prototype.doExport=function(){var plugin=this;this.getMap().once('postcompose',function(event){html2canvas(plugin.subViewer.getViewer().getActiveSubviewer().getMainDiv()).then(function(canvas){var docDefinition={pageSize:'A4',pageOrientation:'landscape',content:[{image:canvas.toDataURL(),fit:[750,500]}]};window.pdfMake.createPdf(docDefinition).download((typeof plugin.options.fileName=="undefined"?'map.pdf':plugin.options.fileName))})});plugin.getMap().renderSync();this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPng.OpenLayers.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPdf.OpenLayers||(ExportPdf.OpenLayers={}))})(ExportPdf=Plugin_1.ExportPdf||(Plugin_1.ExportPdf={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPdf;(function(ExportPdf){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} return Plugin}(GeoFly.OmniViewer.Plugin.ExportPdf.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPdf.Oblique||(ExportPdf.Oblique={}))})(ExportPdf=Plugin_1.ExportPdf||(Plugin_1.ExportPdf={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPdfHQ;(function(ExportPdfHQ){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPdfHQ";return s6} Plugin.prototype.doExport=function(){var plugin=this;var dialogOptions=this.options;if(typeof dialogOptions.optionsDialog.pageHeightScale=="undefined"){dialogOptions.optionsDialog.pageHeightScale=1.0} if(typeof dialogOptions.optionsDialog.viewDirection=="undefined"){dialogOptions.optionsDialog.viewDirection="N"} var optionsDialog=this.getOptionsDialog(dialogOptions);optionsDialog.show(function(){plugin.getMap().once('postcompose',function(event){var canvas=event.context.canvas;optionsDialog.drawTitle(canvas);optionsDialog.drawDetailBox(canvas,function(){var pageSize=optionsDialog.getFormatDimInMM(optionsDialog.getFormat());if(optionsDialog.getLayout()=="landscape"){pageSize=[pageSize[1],pageSize[0]]} var docDefinition={pageSize:{width:pageSize[0]*72.0/25.4,height:pageSize[1]*72.0/25.4},pageMargins:0.0001,pageOrientation:optionsDialog.getLayout(),content:[{image:canvas.toDataURL(),width:pageSize[0]*72.0/25.4}]};window.pdfMake.createPdf(docDefinition).download((typeof plugin.options.fileName=="undefined"?'map.pdf':plugin.options.fileName));optionsDialog.close()})});plugin.getMap().renderSync()},function(){optionsDialog.revertPrintMap();plugin.subViewer.getViewer().stopPlugin(plugin.name)})};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPngHQ.OpenLayers.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPdfHQ.OpenLayers||(ExportPdfHQ.OpenLayers={}))})(ExportPdfHQ=Plugin_1.ExportPdfHQ||(Plugin_1.ExportPdfHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPdfHQ;(function(ExportPdfHQ){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.getOptionsDialog=function(options){options.optionsDialog.viewDirection=this.subViewer.getViewDirection();return new Plugin_1.ExportImage.Oblique.OptionsDialog(options,this.subViewer)};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPdfHQ.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPdfHQ.Oblique||(ExportPdfHQ.Oblique={}))})(ExportPdfHQ=Plugin_1.ExportPdfHQ||(Plugin_1.ExportPdfHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrint;(function(ExportPrint){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPrint";return s6} Plugin.prototype.doExport=function(){var plugin=this;var disp_setting="";var docprint=window.open("","",disp_setting);this.getMap().once('postcompose',function(event){html2canvas(plugin.subViewer.getViewer().getActiveSubviewer().getMainDiv()).then(function(canvas){var docType="";if(navigator.appName!="Microsoft Internet Explorer"){disp_setting=""} if(docprint==null){alert("Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.")}else{docprint.document.open();docprint.document.write(docType);docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.close();docprint.focus()}})});plugin.getMap().renderSync();this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPng.OpenLayers.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPrint.OpenLayers||(ExportPrint.OpenLayers={}))})(ExportPrint=Plugin_1.ExportPrint||(Plugin_1.ExportPrint={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrint;(function(ExportPrint){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} return Plugin}(GeoFly.OmniViewer.Plugin.ExportPrint.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPrint.Oblique||(ExportPrint.Oblique={}))})(ExportPrint=Plugin_1.ExportPrint||(Plugin_1.ExportPrint={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrint;(function(ExportPrint){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPrint";return s6} Plugin.prototype.start=function(options){if(options===void 0){options={dpiOptions:[150,300]}} s4.prototype.start.call(this,options);var plugin=this;setTimeout(function(){plugin.print()},1)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.print=function(){var plugin=this;var disp_setting="";var docprint=window.open("","",disp_setting);var div=document.createElement("div");div.innerHTML=plugin.subViewer.getViewer().getActiveSubviewer().getMainDiv().innerHTML;this.subViewer.getCesiumViewer().render();var canvas=this.subViewer.getCesiumViewer().canvas;var docType="";if(navigator.appName!="Microsoft Internet Explorer"){disp_setting=""} if(docprint==null){alert("Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.")}else{docprint.document.open();docprint.document.write(docType);docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.close();docprint.focus()} this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.s18));s18.Plugin=Plugin})(s18=ExportPrint.s18||(ExportPrint.s18={}))})(ExportPrint=Plugin_1.ExportPrint||(Plugin_1.ExportPrint={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrintHQ;(function(ExportPrintHQ){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPrintHQ";return s6} Plugin.prototype.getViewDirection=function(){return"N"};Plugin.prototype.doExport=function(){var plugin=this;var dialogOptions=this.options;if(typeof dialogOptions.optionsDialog.pageHeightScale=="undefined"){dialogOptions.optionsDialog.pageHeightScale=0.95} if(typeof dialogOptions.optionsDialog.viewDirection=="undefined"){dialogOptions.optionsDialog.viewDirection="N"} var optionsDialog=this.getOptionsDialog(dialogOptions);optionsDialog.show(function(){var disp_setting="";var docprint=window.open("","",disp_setting);plugin.getMap().once('postcompose',function(event){var canvas=event.context.canvas;var docType="";if(navigator.appName!="Microsoft Internet Explorer"){disp_setting=""} if(docprint==null){alert("Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.")}else{optionsDialog.drawTitle(canvas);optionsDialog.drawDetailBox(canvas,function(){canvas.toBlob(function(blob){var blobUrl=URL.createObjectURL(blob);docprint.document.open();docprint.document.write(docType);docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.close();docprint.focus()});optionsDialog.close()})}});plugin.getMap().renderSync()},function(){optionsDialog.revertPrintMap();plugin.subViewer.getViewer().stopPlugin(plugin.name)})};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPngHQ.OpenLayers.Plugin));OpenLayers.Plugin=Plugin})(OpenLayers=ExportPrintHQ.OpenLayers||(ExportPrintHQ.OpenLayers={}))})(ExportPrintHQ=Plugin_1.ExportPrintHQ||(Plugin_1.ExportPrintHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrintHQ;(function(ExportPrintHQ){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.getOptionsDialog=function(options){options.optionsDialog.viewDirection=this.subViewer.getViewDirection();return new Plugin_1.ExportImage.Oblique.OptionsDialog(options,this.subViewer)};return Plugin}(GeoFly.OmniViewer.Plugin.ExportPrintHQ.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportPrintHQ.Oblique||(ExportPrintHQ.Oblique={}))})(ExportPrintHQ=Plugin_1.ExportPrintHQ||(Plugin_1.ExportPrintHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportPrintHQ;(function(ExportPrintHQ){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportPrintHQ";return s6} Plugin.prototype.start=function(options){if(typeof options=="undefined"){options={optionsDialog:{dpiOptions:[72],formatOptions:["A4"],exportLabel:"Export",cancelLabel:"Cancel",showTitleInput:!0,showFreeTextInput:!0,detailBox:{size:{width:50,height:50},logo:{url:"",position:{x:0,y:0},size:{width:10,height:10}},compass:{url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wAAAAAzJ3zzAAAACXBIWXMAABcSAAAXEgFnn9JSAAAAB3RJTUUH4gkTDSwWHdnHhQAAA8tJREFUeNrt3b1O21AYxvHHLRK34UtAXEGlpKrkjYGpnWm88bGyMWVgT7t3YmAiQ52oN8AAV+CVJrAhJsrpUCdKQxwfxyc573N4HylDl4rmn/cXCVkqoNPpdDqdTqfT6XQ6Hfm2AFwVry19O/yvfXx8bNI0NQDa7P+YdwEE2U+SBHEcA8C+BvHP1d7Ozg7yPAeAPWVLAFfGGAMgCLbYL2Q/SZLpH0JgiznIlKvJlC0hXE3ICoEt5gv5j6tQ2GIN8oorZUsQV7NksbPFeiELuQqBLcYgpVwpW0K4mieLmS3GC1nKFTtbbEEquVK2BHC1iCxWttguxIorZraYglhzpWx55qqMLEa2mC6kFlesbLEEqc2VsuWRq2VksbHFciErccXIFkOQlblStjxxVUUWE1sMF9KIKza2pAdpzJWy5YErG7JY2JJ+IU64YmJrS+jP9KF44z674GqOrS8AIgAXAH4BeFaIFkdoA/gGYJSmqel2u6bT6Zgsy5yRNRgMzP39vRkOh+bk5MQAGAP4DuCjfrcsiTD/RtpEsYkxP41TI0LdKHVjvOU4K0eoE6VJjLcQx1kE2yiuYoQUZ20RbKKsIwZjnI1FqIqy7hiS43iLsCzKJmNIiCMmQlkUXzFcx4ksg1ylaZrEcYw8z9Hr9UR9eWVZhiiK0Gq1RP1cDw8PuL29Rb/fx/n5+U8An1z9Lutle3sbu7u7ODs7gzFG1Gv66YoiUa/T01NcX1/j6ekJAF5cxn4PoAWgB2B0eHhosiwz4/HYOxFZlhkAxhhjBoOBd0I7nY7pdruT3yyPCubb6/w+mY3z22ecSYxJEF9RfEQQF2c2xmyQTUWRFMF7nPkY80HWFYUhglWco6MjZ3EWxVgUxFUU5ghrv5yyGGVBVo0SYgTncZbFWBbENspbitA4TlWMqiBlUTTCCnFsYtgEmUTRCM3iPBZvnJMg4/HYAHiUHEHip+IPgGHxiuI4PnD1F9/c3ADADwBfpX4apT+XdVE8uuNk/X4f+Pf4j67BBY9s2LLkaiT9u0L6hTwDuCyeOHTB1SWEPxjH8PS7E7aUqw2zFQJXLBfSmC0WrliCNGZLufLAVghcMV3IymwxccUUZGW2lCtPbIXAFduF1GaLjSu2ILXZUq48shUCV4wXYs0WI1eMQazZUq48sxUCV6wXUskWK1esQSrZUq4EsBUCV8wXUsoWM1fMQUrZUq6EsBUCV+wX8ootdq7Yg7xiS7kSxFYIXIVwIVO2QuAKCOOJ74s8zw/u7u6UK0EfKv0P7nU6nU6n0+l0Op1OF8b+At8bvnnR65n7AAAAAElFTkSuQmCC",position:{x:0,y:0},size:{width:10,height:10}}},viewDirection:"N"}}} s4.prototype.start.call(this,options);var plugin=this;setTimeout(function(){plugin.print()},1)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.print=function(){var plugin=this;var disp_setting="";var docprint=window.open("","",disp_setting);var div=document.createElement("div");div.innerHTML=plugin.subViewer.getViewer().getActiveSubviewer().getMainDiv().innerHTML;this.subViewer.getCesiumViewer().render();var canvas=this.subViewer.getCesiumViewer().canvas;var docType="";if(navigator.appName!="Microsoft Internet Explorer"){disp_setting=""} if(docprint==null){alert("Bitte aktivieren Sie für diese Seite Popups und wiederholen Sie den Vorgang.")}else{docprint.document.open();docprint.document.write(docType);docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.write('');docprint.document.close();docprint.focus()} this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.s18));s18.Plugin=Plugin})(s18=ExportPrintHQ.s18||(ExportPrintHQ.s18={}))})(ExportPrintHQ=Plugin_1.ExportPrintHQ||(Plugin_1.ExportPrintHQ={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportCityGml;(function(ExportCityGml){var OpenLayers;(function(OpenLayers){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportCityGml";return s6} Plugin.prototype.start=function(options){if(options===void 0){options={buildings:[],mapTextures:!1}} s4.prototype.start.call(this,options);var plugin=this;setTimeout(function(){plugin.exportCityGml(options.buildings)},1)};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.transformFeature=function(feature){feature.getGeometry().transform(this.getMap().getView().getProjection(),"EPSG:4326")};Plugin.prototype.download=function(filename,text){var element=document.createElement('a');element.setAttribute('href','data:text/plain;charset=utf-8,'+encodeURIComponent(text));element.setAttribute('download',filename);element.style.display='none';document.body.appendChild(element);element.click();document.body.removeChild(element)};Plugin.prototype.exportCityGml=function(buildings){var plugin=this;var cityGml=new GeoFly.s76.CityGml.CityGmlDocument({buildings:buildings});this.download((typeof plugin.options.fileName=="undefined"?'buildings.gml':plugin.options.fileName),cityGml.getText());this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=ExportCityGml.OpenLayers||(ExportCityGml.OpenLayers={}))})(ExportCityGml=Plugin_1.ExportCityGml||(Plugin_1.ExportCityGml={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportCityGml;(function(ExportCityGml){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.transformFeature=function(feature){feature.getGeometry().transform(this.subViewer.getProjection().getCustomProjectionId(),"EPSG:4326")};return Plugin}(GeoFly.OmniViewer.Plugin.ExportCityGml.OpenLayers.Plugin));Oblique.Plugin=Plugin})(Oblique=ExportCityGml.Oblique||(ExportCityGml.Oblique={}))})(ExportCityGml=Plugin_1.ExportCityGml||(Plugin_1.ExportCityGml={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var ExportCityGml;(function(ExportCityGml){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.name="ExportCityGml";return s6} Plugin.prototype.start=function(options){if(options===void 0){options={buildings:[],mapTextures:!1}} s4.prototype.start.call(this,options);var plugin=this;$("#dialogExportCityGmlOptions").dialog({modal:!0,buttons:{Ok:function(){$(this).dialog("close");plugin.exportCityGml(options.buildings,document.getElementById("dialogExportCityGmlOptions_texture").checked)}}})};Plugin.prototype.stop=function(){s4.prototype.stop.call(this)};Plugin.prototype.download=function(filename,text){var element=document.createElement('a');element.setAttribute('href','data:text/plain;charset=utf-8,'+encodeURIComponent(text));element.setAttribute('download',filename);element.style.display='none';document.body.appendChild(element);element.click();document.body.removeChild(element)};Plugin.prototype.mapTextures=function(faces,onFinish){var plugin=this;var progressBar=document.createElement("progress");progressBar.max=100;progressBar.style.width="20%";progressBar.style.left="40%";progressBar.style.top="45%";progressBar.style.position="absolute";progressBar.style.zIndex="1000";var s75=new GeoFly.s76.s74.s74({onStartProgress:function(){progressBar.value=0;plugin.subViewer.getCesiumViewer().canvas.parentElement.appendChild(progressBar)},onUpdateProgress:function(progress){console.log(progress);progressBar.value=progress*100.0},onEndProgress:function(){plugin.subViewer.getCesiumViewer().canvas.parentElement.removeChild(progressBar)}});var centerVectors=[];for(var i=0;i0.99){vecX=faceNormal.getCrossProduct(new GeoFly.s76.Vector3(0,-1,0)).getNormalized().scale(maxRadius*2.0);vecY=faceNormal.getCrossProduct(vecX.getNormalized()).scale(-1).getNormalized().scale(maxRadius*2.0)}else{vecX=center.getNormalized().getCrossProduct(faceNormal).getNormalized().scale(maxRadius*2.0);vecY=vecX.getNormalized().getCrossProduct(faceNormal).getNormalized().scale(maxRadius*2.0)} var origin=center.subtract(vecX.scale(0.5)).subtract(vecY.scale(0.5));var plane=new GeoFly.s76.Geometry.Plane(new GeoFly.s76.Vector3(0,0,0),faceNormal);var minX=Infinity;var maxX=-Infinity;var minY=Infinity;var maxY=-Infinity;for(var i=0;i0){this.overlayContentDiv.appendChild(document.createElement("br"))} this.overlayContentDiv.appendChild(layerConfig.inputElement);this.overlayContentDiv.appendChild(label);layerConfig.datasource=this.getDatasource(layerConfig.datasourceName);layerConfig.datasources=this.getDatasources(layerConfig.datasourceName);if(typeof layerConfig.datasource!=="undefined"&&layerConfig.active!==!0){layerConfig.datasource.hide()} this.overlays.push(layerConfig);this.labelOverlays.style.display=""};Plugin.prototype.triggerLayerVisibilityChanged=function(){if(this.subViewer instanceof GeoFly.OmniViewer.SubViewer.s18){var scene=this.subViewer.getCesiumViewer().scene;scene.requestRenderMode=!1;setTimeout(function(){scene.requestRenderMode=!0},1000)}};Plugin.prototype.updateLayerVisibility=function(layer){var triggerChangeEvent=!1;if(layer.inputElement.checked){if(typeof layer.datasource!=="undefined"&&layer.datasource!==null){triggerChangeEvent=triggerChangeEvent||!layer.datasource.getVisible();this.getSubViewer().getViewer().showDatasource(layer.datasource)} if(typeof layer.datasources!=="undefined"){for(var i=0;i=viewport.minLon)&&(dataSource.boundingBox.minLat<=viewport.maxLat&&dataSource.boundingBox.maxLat>=viewport.minLat)){this.baseLayers[i].imageElement.classList.remove("unvisible");++availableDataSourcesCount;lastAvailableDataSourceIndex=i}else{this.baseLayers[i].imageElement.classList.add("unvisible")}}} if(availableDataSourcesCount==1){this.baseLayers[lastAvailableDataSourceIndex].imageElement.click()}};Plugin.prototype.getBaseLayerIndex=function(){for(var i=0;i=0;--i){if(input.faceClusters[clusterName].clusters[i].getClusters30s().length0){for(var clusterIndex=0;clusterIndex=0;--i){if(input.roofAngles30s[i].faces.length==0){input.roofAngles30s.splice(i,1)}} console.log(input.roofAngles30s)}} onFinish(input)};return ClassifyRoofAngles30s}(GeoFly.s76.s74.Tool.Base));Tool.ClassifyRoofAngles30s=ClassifyRoofAngles30s})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Cleanup=(function(s4){__extends(Cleanup,s4);function Cleanup(){return s4!==null&&s4.apply(this,arguments)||this} Cleanup.prototype.run=function(input,onFinish){if(typeof input!=="undefined"){input.faces={};input.pointCloud=[];input.volumeGrid=null;input.boundingVolume=null;input.faceClusters={};input.roofAngles30s=[]} onFinish(input)};return Cleanup}(GeoFly.s76.s74.Tool.Base));Tool.Cleanup=Cleanup})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var s19=(function(s4){__extends(s19,s4);function s19(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} s19.prototype.vertexIsPartOfRoof=function(vertex,roof){for(var i=0;iselectedDist){selectedCoord=roofCoords[i];selectedDist=GeoFly.s76.Vector3.average(roofCoords).getSquaredDistance(roofCoords[i])}} if(selectedCoord!==null){for(var i=0;i0){coords.push(edges[0].getPoints()[0].getCoord());coords.push(edges[0].getPoints()[1].getCoord());edges.splice(0,1)} var maxIterations=1000;while(edges.length>0&&--maxIterations>0){for(var i=edges.length-1;i>=0;--i){if(edges[i].getPoints()[0].getCoord().equals(coords[0])){coords.unshift(edges[i].getPoints()[1].getCoord());edges.splice(i,1)}else{if(edges[i].getPoints()[1].getCoord().equals(coords[0])){coords.unshift(edges[i].getPoints()[0].getCoord());edges.splice(i,1)}else{if(edges[i].getPoints()[0].getCoord().equals(coords[coords.length-1])){coords.push(edges[i].getPoints()[1].getCoord());edges.splice(i,1)}else{if(edges[i].getPoints()[1].getCoord().equals(coords[coords.length-1])){coords.push(edges[i].getPoints()[0].getCoord());edges.splice(i,1)}}}}}} return coords};CreateRoofFroms68s.prototype.createClusters67=function(edges,cesiumViewer,building,roofPlane){var coords=this.getOrderedEdgeCoords(edges,roofPlane);var vertices=[];for(var i=0;i0){content+="l "+(i+0)+" "+(i+1)+"\n"}} content+="l "+input.footprintVectors.length+" 1\n";GeoFly.s76.Downloader.download(content,this.options.fileName)} onFinish(input)};return DownloadFootprint}(GeoFly.s76.s74.Tool.Base));Tool.DownloadFootprint=DownloadFootprint})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var DownloadJson=(function(s4){__extends(DownloadJson,s4);function DownloadJson(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} DownloadJson.prototype.run=function(input,onFinish){if(typeof input.faces!=="undefined"){GeoFly.s76.Downloader.download(JSON.stringify(input.faces),'download.json')} onFinish(input)};return DownloadJson}(GeoFly.s76.s74.Tool.Base));Tool.DownloadJson=DownloadJson})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var DownloadObj=(function(s4){__extends(DownloadObj,s4);function DownloadObj(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} DownloadObj.prototype.run=function(input,onFinish){if(typeof input.faces!=="undefined"&&typeof input.faces.all.faces!=="undefined"){GeoFly.OmniViewer.s76.s40.ObjExporter.download(input.faces.all.faces,!0)} onFinish(input)};return DownloadObj}(GeoFly.s76.s74.Tool.Base));Tool.DownloadObj=DownloadObj})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Downloads68sAsObj=(function(s4){__extends(Downloads68sAsObj,s4);function Downloads68sAsObj(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} Downloads68sAsObj.prototype.getCenterOffset=function(seamlines){var min=[Infinity,Infinity,Infinity];var max=[-Infinity,-Infinity,-Infinity];for(var i=0;i1){var coords=seamlines[i].getPointCoords();var indexes=[];var color={r:(Math.random()*547865782)%1000,g:(Math.random()*324069509)%1000,b:(Math.random()*855975434)%1000,};for(var j=0;j0){content+="l "+(verticesCount-1)+" "+verticesCount+"\n"}}}} GeoFly.s76.Downloader.download(content,'seamlines.obj')};Downloads68sAsObj.prototype.run=function(input,onFinish){for(var clusterName in input.seamlines){this.downloads68sAsObj(input.seamlines[clusterName])} onFinish(input)};return Downloads68sAsObj}(GeoFly.s76.s74.Tool.Base));Tool.Downloads68sAsObj=Downloads68sAsObj})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var DownloadRoofObj=(function(s4){__extends(DownloadRoofObj,s4);function DownloadRoofObj(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} DownloadRoofObj.prototype.run=function(input,onFinish){if(typeof input.faces.roof!=="undefined"){GeoFly.OmniViewer.s76.s40.ObjExporter.download(input.faces.roof.faces,!0)} onFinish(input)};return DownloadRoofObj}(GeoFly.s76.s74.Tool.Base));Tool.DownloadRoofObj=DownloadRoofObj})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var s26=(function(s4){__extends(s26,s4);function s26(){return s4!==null&&s4.apply(this,arguments)||this} s26.prototype.run=function(input,onFinish){try{if(typeof input.volumeGrid!=="undefined"&&typeof input.footprintVectors!=="undefined"){var rasterPlanes=input.volumeGrid.gets63sWiths30s();if(rasterPlanes.length>0){var accuCanvas=rasterPlanes[0].createCanvas();accuCanvas.clear("#000000");for(var i=0;ithis.options.maxVertexDist){this.insertVertexToFootprint(edges[j].getPoints()[k].getCoord(),input)}}}}}} onFinish(input)};return ExtendFootprintByRoofs68s}(GeoFly.s76.s74.Tool.Base));Tool.ExtendFootprintByRoofs68s=ExtendFootprintByRoofs68s})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Extends68sToRoofHeight=(function(s4){__extends(Extends68sToRoofHeight,s4);function Extends68sToRoofHeight(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} Extends68sToRoofHeight.prototype.getNearests68Point=function(seamlines,ray,maxDist){var minDist=Infinity;var minCoord=null;for(var i=0;i0.4&&dist<=maxDist){minDist=dist;minCoord=seamlines[i].getPointCoords()[j]}}}} return minCoord};Extends68sToRoofHeight.prototype.extends68s=function(seamlines,roofPlane,building){for(var i=0;i0.0){if(coords[1].getDistance(intersectionPoint)/coords[1].getDistance(coords[0])<2.0){if(building.getClosestVertex(intersectionPoint).coord.getDistance(intersectionPoint)<10.0){seamlines[i].getEdges()[0].getPoints()[0].setCoord(intersectionPoint)}}}} if(connectedEndEdgesCount==0){var coords=[seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[0].getCoord(),seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[1].getCoord()];var line=new GeoFly.s76.Geometry.Line3(coords[0],coords[1]);var intersectionPoint=roofPlane.getIntersectionPoint(line);if(coords[1].subtract(coords[0]).getDotProduct(intersectionPoint.subtract(coords[0]))>0.0){if(coords[0].getDistance(intersectionPoint)/coords[0].getDistance(coords[1])<2.0){if(building.getClosestVertex(intersectionPoint).coord.getDistance(intersectionPoint)<10.0){seamlines[i].getEdges()[0].getPoints()[1].setCoord(intersectionPoint)}}}}}};Extends68sToRoofHeight.prototype.run=function(input,onFinish){if(input.flatRoofDetected!==!0){var roofPlane=new GeoFly.s76.Geometry.Plane(input.building.getCenter().getNormalized().scale(input.height.roof),input.building.getCenter().getNormalized());if(typeof this.options.classNames=="undefined"){for(var className in input.seamlines){if(typeof input.seamlines[className]!=="undefined"){this.extends68s(input.seamlines[className],roofPlane,input.building)}}}else{for(var i=0;i=0.0){if(solid.containsPoint(input.faces.allWithGround.faces[i].vertices[j].coord)){faceIsRoof=!0;break}}} if(faceIsRoof){input.faces.roof.faces.push(input.faces.allWithGround.faces[i])}}} onFinish(input)};return ExtractRoofs30s}(GeoFly.s76.s74.Tool.Base));Tool.ExtractRoofs30s=ExtractRoofs30s})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Extracts68s=(function(s4){__extends(Extracts68s,s4);function Extracts68s(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} Extracts68s.prototype.run=function(input,onFinish){if(input.flatRoofDetected!==!0){input.seamlines={};if(typeof this.options=="undefined"){for(var clusterName in input.faceClusters){if(typeof input.faceClusters[clusterName]!=="undefined"){var seamlineDetector=new Tool.Strategy.s68.Detector();input.seamlines[clusterName]=seamlineDetector.run(input.faceClusters[clusterName].clusters)}}}else{for(var i=0;imaxValue){maxValue=projection.getMaxValue();maxValueAngle=angle}} console.log("building rotation",maxValueAngle,"deg");maxValueAngle/=180.0/Math.PI;input.horizontalMainVector=input.footprints63.getBaseVectors()[0].scale(Math.cos(maxValueAngle)).add(input.footprints63.getBaseVectors()[1].scale(Math.sin(maxValueAngle)));var centerVector=input.footprints63.getOffset().add(input.footprints63.getBaseVectors()[0].scale(0.5)).add(input.footprints63.getBaseVectors()[1].scale(0.5)).add(input.footprints63.getBaseVectors()[2].scale(0.5));input.faces.all.faces.push(new GeoFly.s76.Geometry.s30([new GeoFly.s76.Geometry.Vertex(centerVector.add(input.horizontalMainVector)),new GeoFly.s76.Geometry.Vertex(centerVector),new GeoFly.s76.Geometry.Vertex(centerVector)]))} onFinish(input)};return FindHorizontalMainVector}(GeoFly.s76.s74.Tool.Base));Tool.FindHorizontalMainVector=FindHorizontalMainVector})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var s31=(function(s4){__extends(s31,s4);function s31(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} s31.prototype.createFlatRoof=function(input){var flats30s=[];var flats30Coords=[];var normal=input.seedPoint.getNormalized();for(var i=0;i0.8){flats30s.push(input.faces.roof.faces[i]);for(var j=0;jfaceLimit){input.flatRoofDetected=!0;console.log("more than ",faceLimit," faces (",input.faces.roof.faces.length,") -> create flat roof");return} console.log("less than ",faceLimit," faces (",input.faces.roof.faces.length,") -> compute roof");var flats30sCount=0;var roofs30sCount=0;var normal=input.seedPoint.getNormalized();for(var i=0;i0.95){++flats30sCount} if(angle>0.2){++roofs30sCount}} console.log("flats30sCount",flats30sCount,"roofs30sCount",roofs30sCount);if(roofs30sCount>0){console.log("flats30sCount / roofs30sCount",flats30sCount/roofs30sCount)} input.flatRoofDetected=roofs30sCount>0&&flats30sCount/roofs30sCount>0.7};s32.prototype.run=function(input,onFinish){try{if(typeof input.faces.roof!=="undefined"){this.detectFlatRoof(input)} onFinish(input)}catch(e){console.log(e)}};return s32}(GeoFly.s76.s74.Tool.Base));Tool.s32=s32})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Flooding=(function(s4){__extends(Flooding,s4);function Flooding(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} Flooding.prototype.run=function(input,onFinish){var output=input;if(typeof input.volumeGrid!=="undefined"){try{output.volumeGrid.floodFill(Math.round(output.volumeGrid.getDimensions()[0]*0.5),Math.round(output.volumeGrid.getDimensions()[1]*0.5));var seedPoint=output.volumeGrid.getOptimalSeedPoint();console.log("seedPoint",seedPoint);output.volumeGrid.clearSelection();var rasterPlanes=output.volumeGrid.gets63sWiths30s();for(var i=0;i=0;--i){vertices.push(input.building.getFootPrints()[0].getSurface().vertices[i]);vertices.push(new GeoFly.s76.Geometry.Vertex(input.building.getFootPrints()[0].getSurface().vertices[i].coord.add(normal.scale(input.height.max-input.height.min))))} for(var i=0;i=0){input.footprintVectors=input.footprintVectors.reverse()}};s38.prototype.run=function(input,onFinish){try{if(typeof input.volumeGrid!=="undefined"){var rasterPlanes=input.volumeGrid.gets63sWiths30s();if(rasterPlanes.length>0){var accuCanvas=rasterPlanes[0].createCanvas();accuCanvas.clear("#000000");var accus30Canvas=rasterPlanes[0].createCanvas();accus30Canvas.clear("#000000");var accus80Canvas=rasterPlanes[0].createCanvas();accus80Canvas.clear("#000000");for(var i=0;i0){var globalNormal=input.faces.roof.faces[0].vertices[0].coord.getNormalized();var normal=globalNormal.getAxisRotated(new GeoFly.s76.Vector3(0,1,0).getCrossProduct(globalNormal),angleX*Math.PI/180.0).getAxisRotated(globalNormal,angleY*Math.PI/180.0);for(var i=0;i=this.options.normalThreshold){result.faces.push(input.faces.roof.faces[i])}}} return result};GetRoofAngles30s.prototype.run=function(input,onFinish){if(typeof input.faces.roof!=="undefined"){input.roofAngles30s=[];for(var angleX=0;angleX<90;angleX+=this.options.stepX){for(var angleY=0;angleY<360;angleY+=this.options.stepY){if(angleX!==0||angleY==0){input.roofAngles30s.push(this.getAngleValues(input,angleX,angleY))}}}} onFinish(input)};return GetRoofAngles30s}(GeoFly.s76.s74.Tool.Base));Tool.GetRoofAngles30s=GetRoofAngles30s})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var s39=(function(s4){__extends(s39,s4);function s39(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} s39.prototype.processAngleValues=function(input,valueIndex){var values=input.roofAngles30s[valueIndex];values.patches=[];for(var i=0;i1){values.faces=values.patches[0];for(var i=1;i0){console.log("rotate",rotAngle*180/Math.PI);solid.rotate(solid.getWeightedCenter(),normal,rotAngle);rotAngle*=-0.8;if(this.isAnyPointInSolid(solid,input.pointCloud)){--maxIterations}else{maxIterations=0;return!0}} solid.rotate(solid.getWeightedCenter(),normal,-(rotAngle*0.5));return!1};s41.prototype.moveSolid=function(input){var solid=input.building.getSolid();var moveVectors=[];var vertices=input.building.getSolid().getVertices();var center=input.building.getSolid().getWeightedCenter();for(var i=0;i0){console.log("fail: initial point containment!",initialPointContainments);return} var surfaceMovement=10.0;while(maxIterations>0){this.moveSolid(input);var increasesWithIntersection=0;for(var i=0;i0){loader.getLeafTiles(cartesians16s,tileset,tiles,onFinish)}else{onFinish(tiles)}})};s45.prototype.getGeometry=function(options,onFinish){var loader=this;var timeStart=new Date();var tileset=new GeoFly.s76.s18.Tileset();console.log("load tileset for",options.seedPoint);tileset.load(options.tilesetUrl,function(json){var mesh=new GeoFly.OmniViewer.Plugin.s37.Geometry.Mesh();var cartesians16s=[];var sphereVolumes=[];var normal=options.seedPoint.getNormalized();for(var i=-100;i<=100;i+=20){cartesians16s.push(new THREE.Sphere(new THREE.Vector3(options.seedPoint.add(normal.scale(i)).x,options.seedPoint.add(normal.scale(i)).y,options.seedPoint.add(normal.scale(i)).z),options.initialSphereRadius));sphereVolumes.push(new GeoFly.s76.Geometry.s16.Sphere(GeoFly.s76.Vector3.createFromValues(options.seedPoint.add(normal.scale(i)).subtract(options.offsetVector)),options.initialSphereRadius))} var tiles=[];var graph=new GeoFly.s76.Graph.Graph();loader.getLeafTiles(cartesians16s,tileset,tiles,function(allTiles){if(allTiles.length==0){onFinish(mesh,graph);return} var tilesProcessed=0;var faces=[];for(var t=0;t=allTiles.length){for(var i=0;i0){wall.getSurface().vertices[0].coord=wall.getSurface().vertices[0].coord.add(GeoFly.s76.Vector3.median(moveVectors));wall.getSurface().vertices[3].coord=wall.getSurface().vertices[3].coord.add(GeoFly.s76.Vector3.median(moveVectors))} checkCoords=[];for(var i=0;i<=10;++i){checkCoords.push(wall.getSurface().vertices[0].coord.add(sideVec.scale(0.9)).add(upVec.scale(i*0.1)))} moveVectors=[];for(var i=0;i0){wall.getSurface().vertices[1].coord=wall.getSurface().vertices[1].coord.add(GeoFly.s76.Vector3.median(moveVectors));wall.getSurface().vertices[2].coord=wall.getSurface().vertices[2].coord.add(GeoFly.s76.Vector3.median(moveVectors))}};Matchs80sWithMesh.prototype.updates80s=function(input){for(var i=0;ithis.options.normalLimit)&&Math.abs(cluster1.getAveragePosition().subtract(cluster2.getAveragePosition()).getNormalized().getDotProduct(cluster1.getAverageNormal()))=0;--i){for(var j=0;j=0;--i){var seamlineI=input.seamlines.roof[i];var startConnections=[];var endConnections=[];for(var j=0;j20){if(typeof input.planes=="undefined"){input.planes=[]} var plane=this.getPlane(input.faceClusters[clusterName].clusters[i]);input.planes.push(plane);for(var j=0;j=0;--i){windowResults[i].dist=slidingWindow.getDistance(i,this.options.windowSize)} for(var i=input.footprintVectors.length-1;i>=0;--i){if(windowResults[i].dist=0;--i){if(windowResults[i].dist>=maxDist){var maxDistIndex=i;for(var di=-2;di<=2;++di){if(di!==i){if(!windowResults[(i+di+windowResults.length)%windowResults.length].markedToDelete&&windowResults[(i+di+windowResults.length)%windowResults.length].dist>windowResults[maxDistIndex].dist){maxDistIndex=(i+di+windowResults.length)%windowResults.length}}} if(maxDistIndex!==i&&windowResults[i].vector.getDistance(windowResults[maxDistIndex].vector)=0;--i){if(windowResults[i].markedToDelete){input.footprintVectors.splice(i,1)}}};s64.prototype.reduceNearlyPlanar=function(input){var vectorsToRemove=[];for(var i=0;i0.95){vectorsToRemove.push(input.footprintVectors[(i+1)%input.footprintVectors.length])}} for(var i=input.footprintVectors.length-1;i>=0;--i){for(var j=0;j0){this.reduceVectors(input,this.options.maxDist);this.reduceNearlyPlanar(input)}} onFinish(input)}catch(e){console.log(e)}};return s64}(GeoFly.s76.s74.Tool.Base));Tool.s64=s64})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var RemoveDuplicates30s=(function(s4){__extends(RemoveDuplicates30s,s4);function RemoveDuplicates30s(){return s4!==null&&s4.apply(this,arguments)||this} RemoveDuplicates30s.prototype.run=function(input,onFinish){var facesRemoved=0;if(typeof input.faces.all!=="undefined"){try{for(var i=input.faces.all.faces.length-1;i>=0;--i){for(var j=0;j=0;--i){var roofElement=roof.getElements()[i];var coords=[];for(var j=0;j=0;--j){for(var k=j+1;k=0;--i){var roofElement=roof.getElements()[i];var coordsI=[];for(var j=0;ji;--j){if(roof.getElements()[i].getSurface().vertices.length==roof.getElements()[j].getSurface().vertices.length){var coordsJ=[];for(var k=0;k=0;--i){input.seamlines.roof[i].reduceToOneEdge()}};RemoveInvalids68s.prototype.removeLengthZero=function(input){for(var i=input.seamlines.roof.length-1;i>=0;--i){if(input.seamlines.roof[i].getEdges()[0].getPoints()[0].getCoord().equals(input.seamlines.roof[i].getEdges()[0].getPoints()[1].getCoord())){input.seamlines.roof.splice(i,1)}}};RemoveInvalids68s.prototype.removeDuplicates=function(input){for(var i=input.seamlines.roof.length-1;i>=0;--i){for(var j=0;j0&&faces[0].vertices.length>0){return faces[0].vertices[0].coord.getNormalized()} return GeoFly.s76.Vector3.createFromValues({x:1,y:0,z:0})};s66.prototype.isGround=function(face,faceNormal,modelNormal,minHeight){var squaredHeight=Infinity;for(var i=0;i=this.options.angleLimit)};s66.prototype.run=function(input,onFinish){if(typeof input.faces.all!=="undefined"&&typeof input.height!=="undefined"){var faces=[];var normal=this.getNormal(input.faces.all.faces);for(var i=0;i=0;--i){var clusterPosition=input.faceClusters.all.clusters[i].getAveragePosition();var maxAngle=((clusterPosition.getLength()-minHeight)/(maxHeight-minHeight))*2.0+0.5;if(input.faceClusters.all.clusters[i].getAverageNormal().getDotProduct(clusterPosition.getNormalized())>=Math.max(-1,maxAngle)){input.faceClusters.all.clusters.splice(i,1)}} this.updates30s(input.faces.all.faces,input.faceClusters.all.clusters)} onFinish(input)};return s65}(Tool.ClusterModifier));Tool.s65=s65})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var RemoveSmallClusters=(function(s4){__extends(RemoveSmallClusters,s4);function RemoveSmallClusters(options){var s6=s4.call(this)||this;s6.options=null;s6.options=options;return s6} RemoveSmallClusters.prototype.run=function(input,onFinish){for(var clusterName in input.faceClusters){if(typeof input.faceClusters[clusterName]!=="undefined"){for(var i=input.faceClusters[clusterName].clusters.length-1;i>=0;--i){if(input.faceClusters[clusterName].clusters[i].getClusters30s().length=0;--i){var connectedStartEdgesCount=0;var connectedEndEdgesCount=0;if(seamlines[i].getEdges()[0].getConnectedObjects().length>1){for(var j=0;j1){var startFound=!1;var endFound=!1;if(seamlines[i].getEdges()[0].getPoints()[0].getCoord().equals(seamlines[j].getEdges()[0].getPoints()[0].getCoord())||seamlines[i].getEdges()[0].getPoints()[0].getCoord().equals(seamlines[j].getEdges()[0].getPoints()[1].getCoord())){++connectedStartEdgesCount;startFound=!0} if(seamlines[i].getEdges()[0].getPoints()[1].getCoord().equals(seamlines[j].getEdges()[0].getPoints()[0].getCoord())||seamlines[i].getEdges()[0].getPoints()[1].getCoord().equals(seamlines[j].getEdges()[0].getPoints()[1].getCoord())){++connectedEndEdgesCount;endFound=!0}}}}} if(connectedStartEdgesCount==0&&connectedEndEdgesCount==0){seamlines.splice(i,1)}}};RemoveUnconnecteds68s.prototype.run=function(input,onFinish){if(input.flatRoofDetected!==!0){if(typeof this.options.classNames=="undefined"){for(var className in input.seamlines){if(typeof input.seamlines[className]!=="undefined"){this.checks68s(input.seamlines[className])}}}else{for(var i=0;i1){cluster.setClusters30s([]);for(var i=0;i0&&faces[0].vertices.length>0){return faces[0].vertices[0].coord.getNormalized()} return GeoFly.s76.Vector3.createFromValues({x:1,y:0,z:0})};s80Filter.prototype.run=function(input,onFinish){var output={faces:{all:{faces:[],graph:null}}};var normal=this.getNormal(input.faces.all.faces);for(var i=0;i0){if(Math.abs(newSeedPoint.x-this.rasterPlanes[0].getWidth()*0.5)>this.rasterPlanes[0].getWidth()*0.1){newSeedPoint.x=this.rasterPlanes[0].getWidth()*0.5} if(Math.abs(newSeedPoint.y-this.rasterPlanes[0].getHeight()*0.5)>this.rasterPlanes[0].getHeight()*0.1){newSeedPoint.y=this.rasterPlanes[0].getHeight()*0.5}} return newSeedPoint};VolumeGrid.prototype.gets63sWiths30s=function(){var result=[];for(var i=0;i0){result.push(this.rasterPlanes[i])}} return result};VolumeGrid.prototype.getSelecteds30s=function(faces,planes){var result=[];var firstValidPlaneIndex=null;var lastValidPlaneIndex=null;for(var j=0;j=0;--j){if(planes[j].getSelectedPixelsCount()<=planes[j].getWidth()*planes[j].getHeight()*0.5){lastValidPlaneIndex=j;break}} if(firstValidPlaneIndex!==null&&lastValidPlaneIndex!==null){for(var i=0;i=0){vertexSideIndicator+=3}else{vertexSideIndicator+=2} if(dotProductMax<=0){--vertexSideIndicator}} if(vertexSideIndicator!=faces[i].vertices.length&&vertexSideIndicator!=faces[i].vertices.length*3){this.maps30(faces[i],this.canvas.faceIntersections);++this.meta.intersecteds30sCount;if(Math.abs(faces[i].getNormal().getDotProduct(planeNormal))<0.6){this.maps30(faces[i],this.canvas.walls30Intersections);++this.meta.intersecteds80s30sCount}}}};s63.prototype.getApproxSeedPoint=function(r,g,b){var imageData=this.canvas.selection.getImageData();var x=0;var y=0;var dataLength=imageData.data.length;for(var i=0;i=0?1:-1);inRange+=(Math.abs(dot)<=range?1:0)} if(inRange==0&&Math.abs(dotSign)==face.vertices.length){return!1}} if(matchLowerInfinity&&!matchUpperInfinity){if(planeNormal.getDotProduct(face.vertices[0].coord.subtract(this.offset))>range&&planeNormal.getDotProduct(face.vertices[1].coord.subtract(this.offset))>range&&planeNormal.getDotProduct(face.vertices[2].coord.subtract(this.offset))>range){return!1}} if(matchUpperInfinity&&!matchLowerInfinity){if(planeNormal.getDotProduct(face.vertices[0].coord.subtract(this.offset))<-range&&planeNormal.getDotProduct(face.vertices[1].coord.subtract(this.offset))<-range&&planeNormal.getDotProduct(face.vertices[2].coord.subtract(this.offset))<-range){return!1}} var v1=new GeoFly.s76.s77(this.baseVectors[0].getDotProduct(face.vertices[0].coord.subtract(this.offset)),this.baseVectors[1].getDotProduct(face.vertices[0].coord.subtract(this.offset)));var v2=new GeoFly.s76.s77(this.baseVectors[0].getDotProduct(face.vertices[1].coord.subtract(this.offset)),this.baseVectors[1].getDotProduct(face.vertices[1].coord.subtract(this.offset)));var v3=new GeoFly.s76.s77(this.baseVectors[0].getDotProduct(face.vertices[2].coord.subtract(this.offset)),this.baseVectors[1].getDotProduct(face.vertices[2].coord.subtract(this.offset)));var scaleX=1/this.baseVectors[0].getLength()/this.rasterSize;var scaleY=1/this.baseVectors[1].getLength()/this.rasterSize;v1.x*=scaleX;v2.x*=scaleX;v3.x*=scaleX;v1.y*=scaleY;v2.y*=scaleY;v3.y*=scaleY;var vec12=v1.subtract(v2);var vec23=v2.subtract(v3);var vec13=v1.subtract(v3);var v12Len=vec12.getLength();var v23Len=vec23.getLength();var v13Len=vec13.getLength();for(var s=0;s<=Math.ceil(v12Len);++s){var pickCoord=v1.add(vec12.scale(s/v12Len));if(this.canvas.selection.pixelIsSelected(Math.round(pickCoord.x),Math.round(pickCoord.y))){return!0}} for(var s=0;s<=Math.ceil(v23Len);++s){var pickCoord=v2.add(vec23.scale(s/v23Len));if(this.canvas.selection.pixelIsSelected(Math.round(pickCoord.x),Math.round(pickCoord.y))){return!0}} for(var s=0;s<=Math.ceil(v13Len);++s){var pickCoord=v1.add(vec13.scale(s/v13Len));if(this.canvas.selection.pixelIsSelected(Math.round(pickCoord.x),Math.round(pickCoord.y))){return!0}} return!1};return s63}());Strategy.s63=s63})(Strategy=Tool.Strategy||(Tool.Strategy={}))})(Tool=Extractor.Tool||(Extractor.Tool={}))})(Extractor=s37.Extractor||(s37.Extractor={}))})(s37=Plugin.s37||(Plugin.s37={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin){var s37;(function(s37){var Extractor;(function(Extractor){var Tool;(function(Tool){var Strategy;(function(Strategy){var s60=(function(){function s60(){this.centerSource=null;this.line=[]} s60.prototype.projectPixel=function(x,y,angleRad,pixelValue){var refVector=new GeoFly.s76.s77(Math.cos(angleRad),-Math.sin(angleRad));var pixelVector=new GeoFly.s76.s77(x-this.centerSource.x,y-this.centerSource.y);var linePos=Math.round(refVector.getDotProduct(pixelVector))+this.line.length*0.5;if(linePos>=0&&linePos0){for(var i=0;i=0;--i){if(this.clusters[i].getClusters30s().length==1){var clusters30=this.clusters[i].getClusters30s()[0];var edgeClusters=this.getEdgeClusters(clusters30.face);this.assigns30ToCluster(clusters30,edgeClusters);this.clusters.splice(i,1)}}};s30s20.prototype.splitClusterIntoPatches=function(cluster){var timeToolStart=new Date().getTime();var graph=new GeoFly.s76.Graph.Graph();var nodes=[];for(var i=0;i0){var rootNode=null;for(var i=0;i=0.9){cluster.merge(edgeClusters[i]);this.clusters.splice(this.clusters.indexOf(edgeClusters[i]),1)}}};s30s20.prototype.mergeSmallPatchesToLargeClusters=function(){this.clusters.sort(function(a,b){return b.getClusters30s().length-a.getClusters30s().length});for(var i=Math.floor(this.clusters.length*0.2)-1;i>=0;--i){this.mergeSmallPatchesToLargeCluster(this.clusters[i])}};s30s20.prototype.run=function(faces){var normals20=new s20.Normals20();console.log("faces count",faces.length);var timeToolStart=new Date().getTime();var normalClusters=normals20.run(faces);console.log("normals20 duration:",(new Date().getTime()-timeToolStart),"ms");timeToolStart=new Date().getTime();this.clusters=this.loadFromNormalClusters(normalClusters);console.log("loadFromNormalClusters duration:",(new Date().getTime()-timeToolStart),"ms");timeToolStart=new Date().getTime();this.splitClustersIntoPatches();console.log("splitClustersIntoPatches duration:",(new Date().getTime()-timeToolStart),"ms");timeToolStart=new Date().getTime();this.fixSingles30s();console.log("fixSingles30s duration:",(new Date().getTime()-timeToolStart),"ms");timeToolStart=new Date().getTime();this.mergeSmallPatchesToLargeClusters();console.log("mergeSmallPatchesToLargeClusters duration:",(new Date().getTime()-timeToolStart),"ms");faces.length=0;timeToolStart=new Date().getTime();for(var i=0;ilastNeighboursCount){break} normal.clusterId=clusterId;lastNeighboursCount=normal.neighboursCount;cluster.addClusterNormal(normal)}else{if(lastNeighboursCount>2*(20000/this.clusterNormals.length)||normal.neighboursCount>lastNeighboursCount){cluster.addClusterNormal(normal)}}} return cluster};Normals20.prototype.matchNormal=function(clusterNormal,clusters){var selectedClusters=[];for(var i=0;i1){var bestMatchingCluster=null;selectedClusters.sort(function(a,b){return a.getOrigin().normal.getSquaredDistance(clusterNormal.normal)-b.getOrigin().normal.getSquaredDistance(clusterNormal.normal)});clusterNormal.clusterId=selectedClusters[0].getClusterId();for(var i=1;iselectedNormal.neighboursCount){selectedNormal=clusterNormals[i]}}}} return this.matchCluster(selectedNormal,clusterId)};Normals20.prototype.optimizeClusters=function(clusters){for(var i=0;idy){err+=dy;x0+=sx} if(e20){row[x]=Math.min(row[x],inMap[y-1][x]+1)} if(x>0){row[x]=Math.min(row[x],row[x-1]+1)}}} inMap.push(row)} for(var y=height-1;y>=0;--y){for(var x=width-1;x>=0;--x){if(y+1=0;--i){for(var j=0;j=0;--i){for(var j=0;j=0;--i){if(this.getConnectedEdgesCount(seamlines,seamlines[i].getEdges()[0].getPoints()[0].getCoord())!==2){endPoints.push(seamlines[i].getEdges()[0].getPoints()[0].getCoord())} if(this.getConnectedEdgesCount(seamlines,seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[1].getCoord())!==2){endPoints.push(seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[1].getCoord())}} for(var i=seamlines.length-1;i>=0;--i){for(var j=0;j=0;--k){seamlines[i].getEdges().unshift(seamlines[j].getEdges()[k])} seamlines.splice(j,1);break}}} if(!GeoFly.s76.Vector3.isInList(seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[1].getCoord(),endPoints)){if(seamlines[i].getEdges()[seamlines[i].getEdges().length-1].getPoints()[1].getCoord().equals(seamlines[j].getEdges()[0].getPoints()[0].getCoord())){console.log("merge 3");for(var k=0;k=0;--k){seamlines[j].getEdges()[k].swapPoints();seamlines[i].getEdges().push(seamlines[j].getEdges()[k])} seamlines.splice(j,1);break}}}}}}};Detector.prototype.extracts68s=function(edges){var seamlines=[];for(var i=0;i0){var initialObjects=seamlines[i].getEdges()[0].getConnectedObjects();for(var j=1;j=1&&coord.x=1&&coord.y0){var progress=(this.loadedCount*1.0)/(this.loadingCount*1.0);if(progress>this.maxProgress||progress==0){this.maxProgress=progress;this.options.onLoadProgress(progress)}}};Plugin.prototype.increase=function(){if(this.loadingCount==0){if(typeof this.options.onLoadStart!=="undefined"&&this.options.onLoadStart!==null){this.options.onLoadStart()}} ++this.loadingCount;this.fireProgress()};Plugin.prototype.decrease=function(){++this.loadedCount;if(this.loadingCount==this.loadedCount){if(typeof this.options.onLoadFinish!=="undefined"&&this.options.onLoadFinish!==null){this.options.onLoadFinish()} this.loadedCount=0;this.loadingCount=0;this.maxProgress=0} this.fireProgress()};Plugin.prototype.onLoadStart=function(){this.increase()};Plugin.prototype.onLoadEnd=function(){this.decrease()};Plugin.prototype.onLoadError=function(){this.decrease()};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));OpenLayers.Plugin=Plugin})(OpenLayers=LayerLoadingStatus.OpenLayers||(LayerLoadingStatus.OpenLayers={}))})(LayerLoadingStatus=Plugin_1.LayerLoadingStatus||(Plugin_1.LayerLoadingStatus={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var LayerLoadingStatus;(function(LayerLoadingStatus){var Oblique;(function(Oblique){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.getConnectors=function(){var connectors=[];for(var i=0;i=2){this.options.divContainer.appendChild(this.itemAllModels.div)}}};Plugin.prototype.start=function(options){s4.prototype.start.call(this,options);this.updateDiv()};Plugin.prototype.stop=function(){if(typeof this.options.divContainer!=="undefined"){this.options.divContainer.innerHTML=""} s4.prototype.stop.call(this)};Plugin.prototype.createItem=function(building,name,selectItem){if(selectItem===void 0){selectItem=!1} var plugin=this;var div=document.createElement("div");div.className="plugin_building_manager_item";div.innerHTML=name;div.onclick=function(){plugin.getSubViewer().getViewer().startPlugin("s17",{building:building,editorContainerDiv:plugin.options.editorContainerDiv})};div.onmouseover=function(){building.highlight(!0)};div.onmouseleave=function(){building.highlight(!1)};var buttonExportKml=document.createElement("button");buttonExportKml.className="download_kml";buttonExportKml.innerHTML="KML";buttonExportKml.onclick=function(){plugin.getSubViewer().getViewer().startPlugin("s27",{fileName:"building.kml",buildings:[building]})};var buttonExportCityGml=document.createElement("button");buttonExportCityGml.className="download_citygml";buttonExportCityGml.innerHTML="GML";buttonExportCityGml.onclick=function(){plugin.getSubViewer().getViewer().startPlugin("ExportCityGml",{fileName:"building.gml",buildings:[building],mapTextures:!0})};var buttonDelete=document.createElement("button");buttonDelete.className="delete_building";buttonDelete.innerHTML="✖";buttonDelete.onclick=function(){plugin.removeBuilding(building)};div.appendChild(buttonExportKml);div.appendChild(buttonExportCityGml);div.appendChild(buttonDelete);var item={building:building,name:name,div:div,buttonExportKml:buttonExportKml,buttonExportCityGml:buttonExportCityGml};if(selectItem){div.click()} return item};Plugin.prototype.addBuilding=function(building,name){if(typeof this.options.buildings=="undefined"){this.options.buildings=[]} this.options.buildings.push(this.createItem(building,name,!0));this.updateDiv()};Plugin.prototype.getNextBuildingNumber=function(){if(typeof this.options.nextBuildingNumber=="undefined"){this.options.nextBuildingNumber=1} return this.options.nextBuildingNumber++};Plugin.prototype.getSyncData=function(){this.options={buildings:this.options.buildings,divContainer:this.options.divContainer,nextBuildingNumber:this.options.nextBuildingNumber,editorContainerDiv:this.options.editorContainerDiv};return s4.prototype.getSyncData.call(this)};return Plugin}(GeoFly.OmniViewer.Plugin.OpenLayers3));BuildingManager.Plugin=Plugin})(BuildingManager=Plugin_1.BuildingManager||(Plugin_1.BuildingManager={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var OmniViewer;(function(OmniViewer){var Plugin;(function(Plugin_1){var BuildingManager;(function(BuildingManager){var s18;(function(s18){var Plugin=(function(s4){__extends(Plugin,s4);function Plugin(){return s4!==null&&s4.apply(this,arguments)||this} Plugin.prototype.getSubViewer=function(){return this.subViewer};Plugin.prototype.start=function(options){s4.prototype.start.call(this,options)};Plugin.prototype.stop=function(){if(typeof this.options.buildings!=="undefined"){for(var i=0;i#Style_FootPrint_Color'+'';for(var i=0;iabsolute'+'1'+''+''+''+coords+''+''+''+''} kml+='';kml+='';return kml};Plugin.prototype.gets80sKml=function(building){var kml='';kml+=''+'#Style_s80_Color'+'';for(var i=0;iabsolute'+'1'+''+''+''+coords+''+''+''+''} kml+='';kml+='';return kml};Plugin.prototype.getRoofsKml=function(building){var kml='';kml+=''+'#Style_Roof_Color'+'';for(var i=0;iabsolute'+'1'+''+''+''+coords+''+''+''+''}} kml+='';kml+='';return kml};Plugin.prototype.getKml=function(buildings){var kml=''+''+''+'building.kml'+''+''+'';for(var i=0;i';return kml};Plugin.prototype.exportKml=function(buildings){var kml=this.getKml(buildings);this.download((typeof this.options.fileName=="undefined"?'building.kml':this.options.fileName),kml);this.subViewer.getViewer().stopPlugin(this.name)};return Plugin}(GeoFly.OmniViewer.Plugin.s18));s18.Plugin=Plugin})(s18=s27.s18||(s27.s18={}))})(s27=Plugin_1.s27||(Plugin_1.s27={}))})(Plugin=OmniViewer.Plugin||(OmniViewer.Plugin={}))})(OmniViewer=GeoFly.OmniViewer||(GeoFly.OmniViewer={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Config;(function(Config){var Default=(function(){function Default(){} return Default}());Config.Default=Default})(Config=ObViewSly.Config||(ObViewSly.Config={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var s10=(function(){function s10(ui){this.name="s10";this.ui=null;this.ui=ui} return s10}());Module.s10=s10})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var GeoCoder=(function(s4){__extends(GeoCoder,s4);function GeoCoder(){return s4!==null&&s4.apply(this,arguments)||this} GeoCoder.prototype.init=function(){};GeoCoder.prototype.beforeOpen=function(){};GeoCoder.prototype.afterOpen=function(){$("#inputGeoCoder").focus()};GeoCoder.prototype.close=function(){};GeoCoder.prototype.availableForSubViewer=function(subViewer){return!0};GeoCoder.prototype.onSubViewerChange=function(subViewer){};return GeoCoder}(GeoFly.ObViewSly.Module.s10));Module.GeoCoder=GeoCoder})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var Measure=(function(s4){__extends(Measure,s4);function Measure(){return s4!==null&&s4.apply(this,arguments)||this} Measure.prototype.init=function(){var mod=this;$("#measureRadioButtons input").checkboxradio({});$("input:radio[name=measureType]").click(function(){mod.updateMeasureType($(this).attr("id"))});$(this.ui.getOptions().omniViewer).on("afterSubViewerChange",{module:mod},mod.updateButtons)};Measure.prototype.disableInteraction=function(){$('#measureRadioButtonsNavigate').prop('checked',!0).click().checkboxradio('refresh');$("#measureRadioButtons input").checkboxradio("refresh")};Measure.prototype.updateMeasureType=function(measureType){this.ui.getOptions().omniViewer.stopPlugin("Measure");this.ui.getOptions().omniViewer.stopPlugin("MeasureArea");this.ui.getOptions().omniViewer.stopPlugin("MeasureHeight");switch(measureType){case "measureRadioButtonsLine":{this.ui.getOptions().omniViewer.startPlugin("Measure");break} case "measureRadioButtonsArea":{this.ui.getOptions().omniViewer.startPlugin("MeasureArea");break} case "measureRadioButtonsHeight":{this.ui.getOptions().omniViewer.startPlugin("MeasureHeight");break}}};Measure.prototype.updateButtons=function(event){if(event.data.module.ui.getOptions().omniViewer.getActiveSubviewer()instanceof GeoFly.OmniViewer.SubViewer.Oblique){document.getElementById("labelMeasureRadioButtonsHeight").style.display=""}else{document.getElementById("labelMeasureRadioButtonsHeight").style.display="none";if(event.data.module.ui.getOptions().omniViewer.getPlugin("MeasureHeight")!==null&&event.data.module.ui.getOptions().omniViewer.getPlugin("MeasureHeight").getRunning()){event.data.module.disableInteraction()}}};Measure.prototype.beforeOpen=function(){this.disableInteraction();this.ui.translate()};Measure.prototype.afterOpen=function(){};Measure.prototype.close=function(){this.disableInteraction()};Measure.prototype.availableForSubViewer=function(subViewer){return(subViewer instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer)};Measure.prototype.onSubViewerChange=function(subViewer){};return Measure}(GeoFly.ObViewSly.Module.s10));Module.Measure=Measure})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var Annotations=(function(s4){__extends(Annotations,s4);function Annotations(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.initialFillColor="rgba(255,0,0,0.4)";s6.initialStrokeColor="#000";s6.initialStrokeWidth=3;return s6} Annotations.prototype.init=function(){var mod=this;$("#annotationRadioButtons input").checkboxradio({icons:!1});$("input:radio[name=annotationType]").click(function(){mod.updateGeometryType($(this).attr("id"))});$("#inputAnnotationPointStrokeWidth").on("input",function(){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.image.stroke.width=this.value;mod.updatePointStyle(style)});$("#inputAnnotationLineStrokeWidth").on("input",function(){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.stroke.width=this.value;mod.updateLineStyle(style)});$("#inputAnnotationPolygonStrokeWidth").on("input",function(){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.stroke.width=this.value;mod.updatePolygonStyle(style)})};Annotations.prototype.beforeOpen=function(){this.enableNavigation()};Annotations.prototype.afterOpen=function(){};Annotations.prototype.close=function(){this.enableNavigation()};Annotations.prototype.availableForSubViewer=function(subViewer){return(subViewer instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer)};Annotations.prototype.onSubViewerChange=function(subViewer){};Annotations.prototype.setInitialStyle=function(){var style={fill:{color:this.initialFillColor},stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth,lineDash:[]},image:{fill:{color:this.initialFillColor},stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth},radius:5},text:{text:"",baseLine:"bottom",textAlign:"left",stroke:{color:this.initialStrokeColor,width:this.initialStrokeWidth},fill:{color:this.initialFillColor},rotation:0,placement:"line",maxAngle:!1,overflow:!0}};this.ui.getOptions().omniViewer.getPlugin("Annotations").setStyle(style)};Annotations.prototype.updatePointStyle=function(style){var radius=style.image.radius;this.ui.getOptions().omniViewer.getPlugin("Annotations").setStyle(style);document.getElementById("inputAnnotationPointStylePreview").style.width=(radius*2-style.image.stroke.width)+"px";document.getElementById("inputAnnotationPointStylePreview").style.height=(radius*2-style.image.stroke.width)+"px";document.getElementById("inputAnnotationPointStylePreview").style.borderRadius="100px";document.getElementById("inputAnnotationPointStylePreview").style.backgroundColor=style.image.fill.color;document.getElementById("inputAnnotationPointStylePreview").style.border=style.image.stroke.width+"px solid "+style.image.stroke.color;document.getElementById("labelAnnotationPointStrokeWidth").innerHTML=style.image.stroke.width.toString()};Annotations.prototype.updateLineStyle=function(style){this.ui.getOptions().omniViewer.getPlugin("Annotations").setStyle(style);document.getElementById("inputAnnotationLineStylePreview").style.width="40px";document.getElementById("inputAnnotationLineStylePreview").style.height=(1-style.stroke.width)+"px";document.getElementById("inputAnnotationLineStylePreview").style.borderTop=style.stroke.width+"px solid "+style.stroke.color;document.getElementById("labelAnnotationLineStrokeWidth").innerHTML=style.stroke.width.toString()};Annotations.prototype.updatePolygonStyle=function(style){this.ui.getOptions().omniViewer.getPlugin("Annotations").setStyle(style);document.getElementById("inputAnnotationPolygonStylePreview").style.width=(40-style.stroke.width)+"px";document.getElementById("inputAnnotationPolygonStylePreview").style.height=(10-style.stroke.width)+"px";document.getElementById("inputAnnotationPolygonStylePreview").style.backgroundColor=style.fill.color;document.getElementById("inputAnnotationPolygonStylePreview").style.border=style.stroke.width+"px solid "+style.stroke.color;document.getElementById("labelAnnotationPolygonStrokeWidth").innerHTML=style.stroke.width.toString()};Annotations.prototype.enableNavigation=function(){$('#annotationRadioButtonsNavigate').prop('checked',!0).click().checkboxradio('refresh');$("#annotationRadioButtons input").checkboxradio("refresh")};Annotations.prototype.updateGeometryType=function(geometryType){var mod=this;document.getElementById("annotationTypePointParams").style.display="none";document.getElementById("annotationTypeLineParams").style.display="none";document.getElementById("annotationTypePolygonParams").style.display="none";if(!this.ui.getOptions().omniViewer.getPlugin("Annotations").getRunning()){this.ui.getOptions().omniViewer.startPlugin("Annotations");this.setInitialStyle()} var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();switch(geometryType){case "annotationRadioButtonsNavigate":{this.ui.getOptions().omniViewer.getPlugin("Annotations").disableInteraction();break} case "annotationRadioButtonsMove":{this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.move);break} case "annotationRadioButtonsEdit":{this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.edit);break} case "annotationRadioButtonsRemove":{this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.remove);break} case "annotationRadioButtonsPoint":{document.getElementById("annotationTypePointParams").style.display="";$("#inputAnnotationPointStrokeColor").spectrum({color:style.image.stroke.color,showAlpha:!0,showButtons:!1,move:function(color){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.image.stroke.color=color.toRgbString();mod.updatePointStyle(style)}});$("#inputAnnotationPointFillColor").spectrum({color:style.image.fill.color,showAlpha:!0,showButtons:!1,move:function(color){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.image.fill.color=color.toRgbString();mod.updatePointStyle(style)}});document.getElementById("inputAnnotationPointStrokeWidth").value=style.image.stroke.width.toString();this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.create);this.ui.getOptions().omniViewer.getPlugin("Annotations").setGeometryType(GeoFly.OmniViewer.Plugin.Annotations.GeometryType.point);this.updatePointStyle(style);break} case "annotationRadioButtonsEllipse":{this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.create);this.ui.getOptions().omniViewer.getPlugin("Annotations").setGeometryType(GeoFly.OmniViewer.Plugin.Annotations.GeometryType.ellipse);break} case "annotationRadioButtonsLine":{document.getElementById("annotationTypeLineParams").style.display="";$("#inputAnnotationLineStrokeColor").spectrum({color:style.stroke.color,showAlpha:!0,showButtons:!1,move:function(color){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.stroke.color=color.toRgbString();mod.updateLineStyle(style)}});document.getElementById("inputAnnotationLineStrokeWidth").value=style.stroke.width.toString();this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.create);this.ui.getOptions().omniViewer.getPlugin("Annotations").setGeometryType(GeoFly.OmniViewer.Plugin.Annotations.GeometryType.line);this.updateLineStyle(style);break} case "annotationRadioButtonsPolygon":{document.getElementById("annotationTypePolygonParams").style.display="";$("#inputAnnotationPolygonStrokeColor").spectrum({color:style.stroke.color,showAlpha:!0,showButtons:!1,move:function(color){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.stroke.color=color.toRgbString();mod.updatePolygonStyle(style)}});$("#inputAnnotationPolygonFillColor").spectrum({color:style.fill.color,showAlpha:!0,showButtons:!1,move:function(color){var style=mod.ui.getOptions().omniViewer.getPlugin("Annotations").getStyle();style.fill.color=color.toRgbString();mod.updatePolygonStyle(style)}});document.getElementById("inputAnnotationPolygonStrokeWidth").value=style.stroke.width.toString();this.ui.getOptions().omniViewer.getPlugin("Annotations").enableInteraction(GeoFly.OmniViewer.Plugin.Annotations.InteractionType.create);this.ui.getOptions().omniViewer.getPlugin("Annotations").setGeometryType(GeoFly.OmniViewer.Plugin.Annotations.GeometryType.polygon);this.updatePolygonStyle(style);break}}};return Annotations}(GeoFly.ObViewSly.Module.s10));Module.Annotations=Annotations})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var GraphHopper=(function(s4){__extends(GraphHopper,s4);function GraphHopper(){return s4!==null&&s4.apply(this,arguments)||this} GraphHopper.prototype.updateLayout=function(){if(document.getElementById("divGraphhopperTurnbyturn")!==null){document.getElementById("divGraphhopperTurnbyturn").style.maxHeight=($(window).height()-370-28-$("#pluginContainerDivGraphHopper ul").height()-document.getElementById("GraphHopperToggleHeightProfile").clientHeight-document.getElementById("GraphHopperToggleAvoidAreas").clientHeight)+"px"}};GraphHopper.prototype.init=function(){var mod=this;$("#moduleAccordion").resize(function(){mod.updateLayout()});$("#pluginContainerDivGraphHopper").resize(function(){mod.updateLayout()})};GraphHopper.prototype.beforeOpen=function(){$("#GraphHopper_input_0").focus()};GraphHopper.prototype.afterOpen=function(){};GraphHopper.prototype.close=function(){this.enableNavigation()};GraphHopper.prototype.availableForSubViewer=function(subViewer){return!0};GraphHopper.prototype.onSubViewerChange=function(subViewer){};GraphHopper.prototype.enableNavigation=function(){$('#radioButtonNavigateAvoidArea').prop('checked',!0).click().checkboxradio('refresh');$("#GraphHopperToggleAvoidAreas input").checkboxradio("refresh")};return GraphHopper}(GeoFly.ObViewSly.Module.s10));Module.GraphHopper=GraphHopper})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var Export=(function(s4){__extends(Export,s4);function Export(){return s4!==null&&s4.apply(this,arguments)||this} Export.prototype.init=function(){var mod=this;document.getElementById("buttonPluginExportPng").onclick=function(){mod.ui.getOptions().omniViewer.startPlugin("ExportPng")};document.getElementById("buttonPluginExportPdf").onclick=function(){mod.ui.getOptions().omniViewer.startPlugin("ExportPdf")};document.getElementById("buttonPluginExportPrint").onclick=function(){mod.ui.getOptions().omniViewer.startPlugin("ExportPrint")};document.getElementById("buttonPluginExportKml").onclick=function(){mod.ui.getOptions().omniViewer.startPlugin("ExportKml")}};Export.prototype.beforeOpen=function(){};Export.prototype.afterOpen=function(){};Export.prototype.close=function(){};Export.prototype.availableForSubViewer=function(subViewer){return(subViewer instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer)};Export.prototype.onSubViewerChange=function(subViewer){};return Export}(GeoFly.ObViewSly.Module.s10));Module.Export=Export})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var ExportHQ=(function(s4){__extends(ExportHQ,s4);function ExportHQ(){return s4!==null&&s4.apply(this,arguments)||this} ExportHQ.prototype.init=function(){var mod=this;document.getElementById("buttonPluginExportPngHQ").onclick=function(){var options=mod.ui.getOptions().gui.omniViewer.plugins.ExportPngHQ.options;mod.ui.getOptions().omniViewer.startPlugin("ExportPngHQ",options)};document.getElementById("buttonPluginExportPdfHQ").onclick=function(){var options=mod.ui.getOptions().gui.omniViewer.plugins.ExportPdfHQ.options;mod.ui.getOptions().omniViewer.startPlugin("ExportPdfHQ",options)};document.getElementById("buttonPluginExportPrintHQ").onclick=function(){var options=mod.ui.getOptions().gui.omniViewer.plugins.ExportPrintHQ.options;mod.ui.getOptions().omniViewer.startPlugin("ExportPrintHQ",options)}};ExportHQ.prototype.beforeOpen=function(){};ExportHQ.prototype.afterOpen=function(){};ExportHQ.prototype.close=function(){};ExportHQ.prototype.availableForSubViewer=function(subViewer){return(subViewer instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer)};ExportHQ.prototype.onSubViewerChange=function(subViewer){};return ExportHQ}(GeoFly.ObViewSly.Module.s10));Module.ExportHQ=ExportHQ})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var Share=(function(s4){__extends(Share,s4);function Share(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.currentUrl="";s6.opened=!1;return s6} Share.prototype.init=function(){};Share.prototype.beforeOpen=function(){this.opened=!0;this.updateLink()};Share.prototype.afterOpen=function(){};Share.prototype.close=function(){this.opened=!1};Share.prototype.availableForSubViewer=function(subViewer){return!0};Share.prototype.onSubViewerChange=function(subViewer){var mod=this;if(subViewer instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer){var olSubViewer=subViewer;olSubViewer.getMap().on("moveend",function(){mod.updateLink()})} if(subViewer instanceof GeoFly.OmniViewer.SubViewer.s18){var cesiumSubViewer=subViewer;cesiumSubViewer.getCesiumViewer().camera.moveEnd.addEventListener(function(){mod.updateLink()})}};Share.prototype.updateLink=function(){if(this.opened){var params=[];var viewport=this.ui.getOptions().omniViewer.getActiveSubviewer().gets81();params.push("lon="+viewport.centerLon.toFixed(5));params.push("lat="+viewport.centerLat.toFixed(5));if(this.ui.getOptions().omniViewer.getActiveSubviewer()instanceof GeoFly.OmniViewer.SubViewer.Ol3SubViewer){params.push(("zoom="+this.ui.getOptions().omniViewer.getActiveSubviewer().getMap().getView().getZoom()))} if(this.ui.getOptions().omniViewer.getActiveSubviewer()instanceof GeoFly.OmniViewer.SubViewer.Oblique){params.push(("dir="+this.ui.getOptions().omniViewer.getActiveSubviewer().getViewDirection()))} if(this.ui.getOptions().omniViewer.getActiveSubviewer().getName()!=="ol"){params.push("view="+this.ui.getOptions().omniViewer.getActiveSubviewer().getName())};var baseLayerIndex=(this.ui.getOptions().omniViewer.getPlugin("LayerSwitch")).getBaseLayerIndex();params.push("bl="+baseLayerIndex);var overlayFlags=(this.ui.getOptions().omniViewer.getPlugin("LayerSwitch")).getOverlayFlags();params.push("ol="+overlayFlags);var link="http://obviewsly.de/"+(params.length>0?"?"+params.join("&"):"");if(link!==this.currentUrl){this.currentUrl=link;$("#shareButtons").jsSocials({shares:["email","twitter","facebook","pinterest"],url:link,text:"GeoFly ObViewSly"})}}};return Share}(GeoFly.ObViewSly.Module.s10));Module.Share=Share})(Module=ObViewSly.Module||(ObViewSly.Module={}))})(ObViewSly=GeoFly.ObViewSly||(GeoFly.ObViewSly={}))})(GeoFly||(GeoFly={}));var __extends=(this&&this.__extends)||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p];function __(){this.constructor=d} d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __())};var GeoFly;(function(GeoFly){var ObViewSly;(function(ObViewSly){var Module;(function(Module){var GeometryExtraction=(function(s4){__extends(GeometryExtraction,s4);function GeometryExtraction(){var s6=s4!==null&&s4.apply(this,arguments)||this;s6.currentConnectors=[];return s6} GeometryExtraction.prototype.init=function(){this.ui.getOptions().omniViewer.startPlugin("BuildingManager",{divContainer:document.getElementById("buildingManager"),buildings:[],editorContainerDiv:document.getElementById("buildingModellerEditor")})};GeometryExtraction.prototype.beforeOpen=function(){};GeometryExtraction.prototype.afterOpen=function(){var mod=this;document.getElementById("buttonGeometryExtractionGotoArea").onclick=function(){mod.ui.getOptions().omniViewer.getActiveSubviewer().getCesiumViewer().camera.flyTo({destination:new Cesium.Cartesian3(4181910.376473778,856377.2342496116,4724075.66446237)})};document.getElementById("buttonGeometryExtractionStartPlugin").onclick=function(){mod.ui.getOptions().omniViewer.startPlugin("s37",{editorContainerDiv:document.getElementById("buildingModellerEditor")})};var cbShow3DTiles=document.getElementById("cbGeometryExtractionShow3DTiles");cbShow3DTiles.onclick=function(){if(cbShow3DTiles.checked){mod.ui.getOptions().omniViewer.getPlugin("LayerSwitch").enableAutoVisibility();console.log(mod.currentConnectors);for(var i=0;iDEMO AREAS:

";this.mainDiv.appendChild(contentDiv);this.select=document.createElement("select");var optionTitle=document.createElement("option");optionTitle.text="";optionTitle.disabled=!0;optionTitle.selected=!0;this.select.options.add(optionTitle);for(var i=0;i0)&&(uiAcc.newHeader[0].id=="accordion"+moduleName)){if(typeof ui.options.modules[moduleName].module!=="undefined"){ui.options.modules[moduleName].module.beforeOpen()}}else{if(typeof ui.options.modules[moduleName].module!=="undefined"){ui.options.modules[moduleName].module.close()}}}}},activate:function(event,uiAcc){for(var moduleName in ui.options.modules){if(typeof ui.options.modules[moduleName]!=="undefined"){if((uiAcc.newHeader.length>0)&&(uiAcc.newHeader[0].id=="accordion"+moduleName)){ui.options.modules[moduleName].module.afterOpen()}}}}});this.options.moduleAccordion.style.display=""};Ui.prototype.initPluginMouseEventCoordinates=function(){this.options.plugins.MouseEvent.selectCoordinates.options.length=0;proj4.defs("EPSG:25831","+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs");proj4.defs("EPSG:25832","+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs");proj4.defs("EPSG:25833","+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs");for(var i=0;i0){return parseInt(ua.substring(msie+5,ua.indexOf('.',msie)),10)} var trident=ua.indexOf('Trident/');if(trident>0){var rv=ua.indexOf('rv:');return parseInt(ua.substring(rv+3,ua.indexOf('.',rv)),10)} var edge=ua.indexOf('Edge/');if(edge>0){return parseInt(ua.substring(edge+5,ua.indexOf('.',edge)),10)} return!1} var viewer;var styleFunction=function(feature){return{'Polygon':new ol.style.Style({stroke:new ol.style.Stroke({color:'rgb(248, 179, 52)',lineDash:[4],width:2}),fill:new ol.style.Fill({color:'rgba(248, 179, 52, 0.3)'})})}[feature.getGeometry().getType()]};function init(){viewer=new GeoFly.OmniViewer.Viewer(document.getElementById("viewer"),{dataConnectApiUrl:"proxy/dcApi.php",terrainProviderUrl:"proxy/terrain.php"});initUi()}