|
|
var olcs_unused_var;(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>xe});ol.geom.Point;const i=ol.proj,n={};function s(e,t,i){return e.on(t,i)}n.obj=function(e){return e},n.supportsImageRenderingPixelatedResult_=void 0,n.imageRenderingValueResult_=void 0,n.supportsImageRenderingPixelated=function(){if(void 0===n.supportsImageRenderingPixelatedResult_){const e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges; image-rendering: pixelated;");const t=e.style.imageRendering;n.supportsImageRenderingPixelatedResult_=!!t,n.supportsImageRenderingPixelatedResult_&&(n.imageRenderingValueResult_=t)}return n.supportsImageRenderingPixelatedResult_},n.imageRenderingValue=function(){return n.supportsImageRenderingPixelated(),n.imageRenderingValueResult_||""},n.getSourceProjection=function(e){return e.get("olcs.projection")||e.getProjection()};let o=0;function r(e){return e.olcs_uid||(e.olcs_uid=++o)}function a(e){const t=Cesium.GroundPolylinePrimitive;return t&&t.isSupported(e)}const l=n,c=ol.easing,u=ol.layer.Tile;var h=e.n(u);const m=ol.layer.Image;var d=e.n(m);const g=ol.source.ImageStatic;var C=e.n(g);const p=ol.source.ImageWMS;var y=e.n(p);const f=ol.source.TileImage;var _=e.n(f);const v=ol.source.TileWMS;var w=e.n(v);const S=ol.source.VectorTile;var L=e.n(S);const P=ol.source.Image,T=ol.source,b=function(){const e=new T.Tile({projection:"EPSG:3857",wrapX:!0}).getTileCoordForTileUrlFunction([6,-31,22]);return e&&33===e[1]&&22===e[2]}();class R{constructor(e,t,i){this.source_=t,this.projection_=null,this.fallbackProj_=i||null,this.ready_=!1,this.tilingScheme_=null,this.rectangle_=null,this.map_=e,this.shouldRequestNextLevel=!1;const n=this.source_.get("olcs.proxy");n&&("function"==typeof n?this.proxy_={getURL:n}:"string"==typeof n&&(this.proxy_=new Cesium.DefaultProxy(n))),this.errorEvent_=new Cesium.Event,this.emptyCanvas_=document.createElement("canvas"),this.emptyCanvas_.width=1,this.emptyCanvas_.height=1,this.source_.on("change",(e=>{this.handleSourceChanged_()})),this.handleSourceChanged_()}handleSourceChanged_(e){if(!this.ready_&&"ready"==this.source_.getState()){this.projection_=l.getSourceProjection(this.source_)||this.fallbackProj_;const e={numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1};if(null!==this.source_.tileGrid&&this.source_.tileGrid.forEachTileCoord(this.projection_.getExtent(),0,(([t,i,n])=>{e.numberOfLevelZeroTilesX=i+1,e.numberOfLevelZeroTilesY=n+1})),this.projection_==(0,i.get)("EPSG:4326"))this.shouldRequestNextLevel=1===e.numberOfLevelZeroTilesX&&1===e.numberOfLevelZeroTilesY,this.tilingScheme_=new Cesium.GeographicTilingScheme(e);else{if(this.projection_!=(0,i.get)("EPSG:3857"))return;this.shouldRequestNextLevel=!1,this.tilingScheme_=new Cesium.WebMercatorTilingScheme(e)}this.rectangle_=this.tilingScheme_.rectangle,this.ready_=!0}}getTileCredits(e,t,i){const n=this.source_.getAttributions();if(!n)return[];const s=this.map_.getView().calculateExtent(this.map_.getSize()),o=this.map_.getView().getCenter();return Z(n,this.shouldRequestNextLevel?i+1:i,o,s)}requestImage(e,t,i){const n=this.source_.getTileUrlFunction();if(n&&this.projection_){const s=this.shouldRequestNextLevel?i+1:i;let o=t;b||(o=-t-1);let r=n.call(this.source_,[s,e,o],1,this.projection_);return this.proxy_&&(r=this.proxy_.getURL(r)),r?Cesium.ImageryProvider.loadImage(this,r):this.emptyCanvas_}return this.emptyCanvas_}}Object.defineProperties(R.prototype,{ready:{get:function(){return this.ready_}},rectangle:{get:function(){return this.rectangle_}},tileWidth:{get:function(){const e=this.source_.getTileGrid();return e?Array.isArray(e.getTileSize(0))?e.getTileSize(0)[0]:e.getTileSize(0):256}},tileHeight:{get:functio
|