You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
4.6 KiB
JavaScript
2 lines
4.6 KiB
JavaScript
2 weeks ago
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[694],{15369:function(e,t,r){var i=r(41376),n=r(54354),o=r(6566),a=r(19010),u=r(49060),s=r(62514),c=r(90776),l=r(32275),f=r(86923);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=d(e);if(t){var n=d(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return v(this,r)}}function v(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(h,e);var t,r,i,n=m(h);function h(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h);var r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(i=r.interpolate),(t=n.call(this,{attributions:r.attributions,interpolate:i,projection:r.projection,resolutions:r.resolutions})).crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:null,t.hidpi_=void 0===r.hidpi||r.hidpi,t.url_=r.url,t.imageLoadFunction_=void 0!==r.imageLoadFunction?r.imageLoadFunction:a.r6,t.params_=r.params||{},t.image_=null,t.imageSize_=[0,0],t.renderedRevision_=0,t.ratio_=void 0!==r.ratio?r.ratio:1.5,t}return t=h,(r=[{key:"getParams",value:function(){return this.params_}},{key:"getImageInternal",value:function(e,t,r,i){if(void 0===this.url_)return null;t=this.findNearestResolution(t),r=this.hidpi_?r:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==t&&n.getPixelRatio()==r&&(0,f.r4)(n.getExtent(),e))return n;var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};(0,l.f0)(a,this.params_);var s=((e=e.slice())[0]+e[2])/2,c=(e[1]+e[3])/2;if(1!=this.ratio_){var h=this.ratio_*(0,f.dz)(e)/2,p=this.ratio_*(0,f.Cr)(e)/2;e[0]=s-h,e[1]=c-p,e[2]=s+h,e[3]=c+p}var g=t/r,m=Math.ceil((0,f.dz)(e)/g),v=Math.ceil((0,f.Cr)(e)/g);e[0]=s-g*m/2,e[2]=s+g*m/2,e[1]=c-g*v/2,e[3]=c+g*v/2,this.imageSize_[0]=m,this.imageSize_[1]=v;var d=this.getRequestUrl_(e,this.imageSize_,r,i,a);return this.image_=new u.Z(e,t,r,d,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(o.Z.CHANGE,this.handleImageChange.bind(this)),this.image_}},{key:"getImageLoadFunction",value:function(){return this.imageLoadFunction_}},{key:"getRequestUrl_",value:function(e,t,r,i,n){var o=i.getCode().split(/:(?=\d+$)/).pop();n.SIZE=t[0]+","+t[1],n.BBOX=e.join(","),n.BBOXSR=o,n.IMAGESR=o,n.DPI=Math.round(90*r);var a=this.url_,u=a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return u==a&&(0,c.h)(!1,50),(0,s.B)(u,n)}},{key:"getUrl",value:function(){return this.url_}},{key:"setImageLoadFunction",value:function(e){this.image_=null,this.imageLoadFunction_=e,this.changed()}},{key:"setUrl",value:function(e){e!=th
|
||
|
//# sourceMappingURL=arcgis-image.js.map
|