????

Your IP : 3.15.145.122


Current Path : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/
Upload File :
Current File : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/101-es5.js

(function () {
  var absMids = {
    "esri/views/2d/layers/KMLLayerView2D": "./node_modules/arcgis-js-api/views/2d/layers/KMLLayerView2D.js"
  };
  var globalObj = this || window;
  var jsonpArray = globalObj["webpackJsonp"] = globalObj["webpackJsonp"] || [];

  if (jsonpArray.registerAbsMids) {
    jsonpArray.registerAbsMids(absMids);
  } else {
    var absMidsWaiting = jsonpArray.absMidsWaiting = jsonpArray.absMidsWaiting || [];
    absMidsWaiting.push(absMids);
  }
})(), (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[101], {
  /***/
  "./node_modules/arcgis-js-api/views/2d/layers/KMLLayerView2D.js":
  /*!**********************************************************************!*\
    !*** ./node_modules/arcgis-js-api/views/2d/layers/KMLLayerView2D.js ***!
    \**********************************************************************/

  /*! no static exports found */

  /***/
  function node_modulesArcgisJsApiViews2dLayersKMLLayerView2DJs(module, exports, __webpack_require__) {
    var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; // COPYRIGHT © 2019 Esri
    //
    // All rights reserved under the copyright laws of the United States
    // and applicable international laws, treaties, and conventions.
    //
    // This material is licensed for use under the Esri Master License
    // Agreement (MLA), and is bound by the terms of that agreement.
    // You may redistribute and use this code without modification,
    // provided you adhere to the terms of the MLA and include this
    // copyright notice.
    //
    // See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
    //
    // For additional information, contact:
    // Environmental Systems Research Institute, Inc.
    // Attn: Contracts and Legal Services Department
    // 380 New York Street
    // Redlands, California, USA 92373
    // USA
    //
    // email: contracts@esri.com
    //
    // See http://js.arcgis.com/4.14/esri/copyright.txt for details.


    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__.dj.c(module.i), exports, __webpack_require__(
    /*! ../../../core/tsSupport/declareExtendsHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/declareExtendsHelper.js"), __webpack_require__(
    /*! ../../../core/tsSupport/decorateHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/decorateHelper.js"), __webpack_require__(
    /*! ../../../core/tsSupport/generatorHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/generatorHelper.js"), __webpack_require__(
    /*! ../../../core/tsSupport/awaiterHelper */
    "./node_modules/arcgis-js-api/core/tsSupport/awaiterHelper.js"), __webpack_require__(
    /*! ../../../Graphic */
    "./node_modules/arcgis-js-api/Graphic.js"), __webpack_require__(
    /*! ../../../request */
    "./node_modules/arcgis-js-api/request.js"), __webpack_require__(
    /*! ../../../core/Collection */
    "./node_modules/arcgis-js-api/core/Collection.js"), __webpack_require__(
    /*! ../../../core/Handles */
    "./node_modules/arcgis-js-api/core/Handles.js"), __webpack_require__(
    /*! ../../../core/promiseUtils */
    "./node_modules/arcgis-js-api/core/promiseUtils.js"), __webpack_require__(
    /*! ../../../core/scheduling */
    "./node_modules/arcgis-js-api/core/scheduling.js"), __webpack_require__(
    /*! ../../../core/watchUtils */
    "./node_modules/arcgis-js-api/core/watchUtils.js"), __webpack_require__(
    /*! ../../../core/accessorSupport/decorators */
    "./node_modules/arcgis-js-api/core/accessorSupport/decorators.js"), __webpack_require__(
    /*! ../../../geometry/Extent */
    "./node_modules/arcgis-js-api/geometry/Extent.js"), __webpack_require__(
    /*! ../../../geometry/support/webMercatorUtils */
    "./node_modules/arcgis-js-api/geometry/support/webMercatorUtils.js"), __webpack_require__(
    /*! ../../../layers/support/kmlUtils */
    "./node_modules/arcgis-js-api/layers/support/kmlUtils.js"), __webpack_require__(
    /*! ../engine */
    "./node_modules/arcgis-js-api/views/2d/engine.js"), __webpack_require__(
    /*! ./LayerView2D */
    "./node_modules/arcgis-js-api/views/2d/layers/LayerView2D.js"), __webpack_require__(
    /*! ./graphics/GraphicsView2D */
    "./node_modules/arcgis-js-api/views/2d/layers/graphics/GraphicsView2D.js"), __webpack_require__(
    /*! ../../layers/LayerView */
    "./node_modules/arcgis-js-api/views/layers/LayerView.js")], __WEBPACK_AMD_DEFINE_RESULT__ = function (e, i, t, n, s, o, r, l, a, p, h, c, u, y, d, _, f, g, w, m, v) {
      var V = a.ofType(r);
      return function (e) {
        function i() {
          var i = null !== e && e.apply(this, arguments) || this;
          return i._handles = new p(), i._bitmapIndex = new Map(), i._mapImageContainer = new g.BitmapContainer(i.clips), i._featuresMap = new Map(), i.allVisiblePoints = new V(), i.allVisiblePolylines = new V(), i.allVisiblePolygons = new V(), i.allVisibleMapImages = new a(), i.container = new g.Container(), i;
        }

        return t(i, e), i.prototype.hitTest = function (e, i) {
          var t = this;
          if (this.suspended || !this._pointsView && !this._polylinesView && !this._polygonsView) return h.resolve(null);
          var n = [this._pointsView.hitTest(e, i), this._polylinesView.hitTest(e, i), this._polygonsView.hitTest(e, i)];
          return h.all(n).then(function (e) {
            return e.filter(function (e) {
              return e && (e.layer = t.layer, e.sourceLayer = t.layer), !!e;
            })[0] || null;
          });
        }, i.prototype.update = function (e) {
          this._polygonsView && this._polygonsView.update(e), this._polylinesView && this._polylinesView.update(e), this._pointsView && this._pointsView.update(e);
        }, i.prototype.attach = function () {
          var e = this;
          this._handles.add([this.allVisibleMapImages.on("change", function (i) {
            i.added.forEach(function (i) {
              return e._addMapImage(i);
            }), i.removed.forEach(function (i) {
              return e._removeMapImage(i);
            });
          }), this.clips.on("change", function () {
            e._polygonsView.container.setClips(e.clips), e._polylinesView.container.setClips(e.clips), e._pointsView.container.setClips(e.clips), e._mapImageContainer.setClips(e.clips);
          })]), this.container.addChild(this._mapImageContainer), this._polygonsView = new m["default"]({
            view: this.view,
            graphics: this.allVisiblePolygons
          }), this.container.addChild(this._polygonsView.container), this._polylinesView = new m["default"]({
            view: this.view,
            graphics: this.allVisiblePolylines
          }), this.container.addChild(this._polylinesView.container), this._pointsView = new m["default"]({
            view: this.view,
            graphics: this.allVisiblePoints
          }), this.container.addChild(this._pointsView.container), this.watch("layer.visibleSublayers", function () {
            return e._refreshCollections();
          }), this._fetchingPromise = this._fetchService().then(function () {
            e._fetchingPromise = null, e.notifyChange("updating");
          }), this._polygonsView.container.setClips(this.clips), this._polylinesView.container.setClips(this.clips), this._pointsView.container.setClips(this.clips), this._mapImageContainer.setClips(this.clips);
        }, i.prototype.detach = function () {
          this._handles.removeAll(), this._mapImageContainer.removeAllChildren(), this.container.removeAllChildren(), this._bitmapIndex.clear(), this._polygonsView && (this._polygonsView.destroy(), this._polygonsView = null), this._polylinesView && (this._polylinesView.destroy(), this._polylinesView = null), this._pointsView && (this._pointsView.destroy(), this._pointsView = null);
        }, i.prototype.moveStart = function () {
          this.requestUpdate();
        }, i.prototype.viewChange = function () {
          this.requestUpdate();
        }, i.prototype.moveEnd = function () {
          this.requestUpdate();
        }, i.prototype.isUpdating = function () {
          return null != this._fetchingPromise || this._pointsView.updating || this._polygonsView.updating || this._polylinesView.updating;
        }, i.prototype._addMapImage = function (e) {
          var i = this;
          this.view.spatialReference.isWGS84 && l(e.href, {
            responseType: "image"
          }).then(function (t) {
            var n = t.data,
                s = d.fromJSON(e.extent);
            _.canProject(s, i.view.spatialReference) && (s = _.project(s, i.view.spatialReference));
            var o = new g.Bitmap(n);
            o.x = s.xmin, o.y = s.ymax, o.resolution = s.width / n.naturalWidth, o.rotation = e.rotation, i._mapImageContainer.addChild(o), i._bitmapIndex.set(e, o);
          });
        }, i.prototype._fetchService = function () {
          var e = this;
          return this._handles.remove("refresh-collections"), this._getParsedKML().then(function (i) {
            return e._fetchSublayerService(e.layer, i);
          });
        }, i.prototype._fetchSublayerService = function (e, i) {
          var t = this,
              n = e.sublayers;
          if (!n || 0 === n.length) return h.resolve();
          var s = [];
          return n.forEach(function (e) {
            var n = u.whenTrueOnce(e, "visible").then(function () {
              return e.load();
            }).then(function () {
              return t._getGraphicsForSublayer(e, i);
            }).then(function (i) {
              return h.create(function (n) {
                if (e.networkLink) return void n();
                t._featuresMap.set(e, i), t._handles.add(c.schedule(function () {
                  t._refreshCollections(), n();
                }), "refresh-collections");
              });
            }).then(function () {
              return t._fetchSublayerService(e, e.sourceJSON || i);
            });
            e.visible && s.push(n);
          }), h.all(s).then(function () {});
        }, i.prototype._getParsedKML = function () {
          return f.fetchService(this.layer.url, this.view.spatialReference, this.layer.refreshInterval).then(function (e) {
            return f.parseKML(e.data);
          });
        }, i.prototype._getGraphicsForSublayer = function (e, i) {
          return o(this, void 0, void 0, function () {
            var t, n, o, r, l, a;
            return s(this, function (s) {
              switch (s.label) {
                case 0:
                  return t = null, (n = i.sublayers.some(function (i) {
                    return t = i, i.id === e.id;
                  })) ? (o = {}, r = t.points, r ? [4, f.getGraphics(t.points)] : [3, 2]) : [2, null];

                case 1:
                  r = s.sent(), s.label = 2;

                case 2:
                  return o.points = r, l = t.polylines, l ? [4, f.getGraphics(t.polylines)] : [3, 4];

                case 3:
                  l = s.sent(), s.label = 4;

                case 4:
                  return o.polylines = l, a = t.polygons, a ? [4, f.getGraphics(t.polygons)] : [3, 6];

                case 5:
                  a = s.sent(), s.label = 6;

                case 6:
                  return [2, (o.polygons = a, o.mapImages = t.mapImages, o)];
              }
            });
          });
        }, i.prototype._refreshCollections = function () {
          var e = this,
              i = this.get("layer.visibleSublayers");
          this.allVisiblePoints.removeAll(), this.allVisiblePolylines.removeAll(), this.allVisiblePolygons.removeAll(), this.allVisibleMapImages.removeAll(), i && i.length && i.forEach(function (i) {
            var t = e._featuresMap.get(i);

            t && (e.allVisiblePoints.addMany(t.points), e.allVisiblePolylines.addMany(t.polylines), e.allVisiblePolygons.addMany(t.polygons), e.allVisibleMapImages.addMany(t.mapImages));
          });
        }, i.prototype._removeMapImage = function (e) {
          var i = this._bitmapIndex.get(e);

          i && (this._mapImageContainer.removeChild(i), this._bitmapIndex["delete"](e));
        }, n([y.property()], i.prototype, "_pointsView", void 0), n([y.property()], i.prototype, "_polylinesView", void 0), n([y.property()], i.prototype, "_polygonsView", void 0), n([y.property()], i.prototype, "_fetchingPromise", void 0), n([y.property({
          dependsOn: ["_fetchingPromise", "_pointsView.updating", "_polygonsView.updating", "_polylinesView.updating"]
        })], i.prototype, "updating", void 0), i = n([y.subclass("esri.views.2d.layers.KMLLayerView2D")], i);
      }(y.declared(w.LayerView2D(v)));
    }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    /***/
  }
}]);
//# sourceMappingURL=101-es5.js.map