{"size": 2791, "ext": "js", "max_stars_repo_path": "src/base/arcgis_js_v4.6/esri/views/2d/layers/WMSLayerView2D.js", "max_stars_repo_name": "lidonghai1/vue-arcgis-element-ui", "max_stars_repo_stars_event_min_datetime": "2019-06-14T09:54:36.000Z", "max_stars_repo_stars_event_max_datetime": "2019-06-14T09:54:36.000Z", "max_issues_repo_path": "src/base/arcgis_js_v4.6/esri/views/2d/layers/WMSLayerView2D.js", "max_issues_repo_name": "lidonghai1/vue-arcgis-element-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/base/arcgis_js_v4.6/esri/views/2d/layers/WMSLayerView2D.js", "max_forks_repo_name": "lidonghai1/vue-arcgis-element-ui", "max_forks_repo_forks_event_min_datetime": "2019-06-14T09:54:40.000Z", "max_forks_repo_forks_event_max_datetime": "2020-04-13T14:47:30.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 310.1111111111, "max_line_length": 552, "alphanum_fraction": 0.76209244}
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/HandleRegistry ../../../geometry/Extent ../../../layers/support/ExportWMSImageParameters ./LayerView2D ./support/ExportStrategy ../engine/BitmapSource ../engine/Canvas2DContainer ../../layers/RefreshableLayerView dojo/_base/lang".split(" "),function(B,C,p,q,g,r,t,u,v,w,x,y,z,A){return function(c){function b(){var a=null!==c&&c.apply(this,arguments)||
this;a._handles=new r;a.container=new y;return a}p(b,c);b.prototype.hitTest=function(a,b){return null};b.prototype.getPopupData=function(a){var b=this;a=a.center;if(!this.layer.popupEnabled)return null;var l=a.x,e=a.y,d=null,k=0,c=0;this.container.children.some(function(a){var m=a.width,g=a.height,h=a.resolution,f=a.coords;a=f[0];var f=f[1],n=a+h*m,h=f-h*g;return l>=a&&l<=n&&e<=f&&e>=h?(d=new t({xmin:a,ymin:h,xmax:n,ymax:f,spatialReference:b.view.spatialReference}),k=m,c=g,!0):!1});return d&&k&&c?
(a=d.width/k,this.layer.fetchFeatureInfo(d,k,c,Math.round((l-d.xmin)/a),Math.round((d.ymax-e)/a)).then(function(a){return[a]})):null};b.prototype.update=function(a){this.strategy.update(a);this.notifyChange("updating")};b.prototype.attach=function(){var a=this,b=this.layer,c=b.imageMaxHeight,b=b.imageMaxWidth;this.strategy=new w({container:this.container,fetchImage:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:c,imageMaxWidth:b,imageRotationSupported:!1,imageNormalizationSupported:!1,
hidpi:!1});this._exportWMSImageParameters=new u({layer:this.layer});this._handles.add(this._exportWMSImageParameters.watch("version",function(b){a._exportImageVersion!==b&&(a._exportImageVersion=b,a._exportWMSImageParameters.layers?a.requestUpdate():a.container.removeAllChildren())}))};b.prototype.detach=function(){this.container.removeAllChildren();this.strategy.destroy();this._handles.removeAll();this._exportWMSImageParameters.layer=null;this._exportWMSImageParameters.destroy();this._exportWMSImageParameters=
null};b.prototype.moveStart=function(){};b.prototype.viewChange=function(){};b.prototype.moveEnd=function(){this.requestUpdate()};b.prototype.doRefresh=function(){this.requestUpdate()};b.prototype.isUpdating=function(){return this.attached&&(this.strategy.updating||this.updateRequested)};b.prototype.fetchImage=function(a,b,c,e){var d=this;e=A.mixin({timestamp:this.refreshTimestamp},e);return this.layer.fetchImage(a,b,c,e).then(function(a){d.notifyChange("updating");return new x(a)})};return b=q([g.subclass("esri.views.2d.layers.WMSLayerView2D")],
b)}(g.declared(v,z))});