';
// s(e, t, this)
// }, h.create = function(t) {
// var e = new h(t);
// return e.show(t.container), e
// };
// var d = new i,
// p = [1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500, 1e3, 2e3, 3e3, 5e3, 1e4, 2e4, 3e4, 5e4, 1e5, 2e5, 3e5, 5e5, 1e6, 2e6, 3e6, 5e6, 1e7, 2e7, 3e7, 5e7];
// return h
// }), i("ViewModels/UserInterfaceControl", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/DeveloperError", "KnockoutES5"], function(t, e, i, n) {
// "use strict";
// var r = function(e) {
// if (!t(e)) throw new i("terria is required");
// this._terria = e, this.name = "Unnamed Control", this.text = void 0, this.svgIcon = void 0, this.svgHeight = void 0, this.svgWidth = void 0, this.cssClass = void 0, this.isActive = !1, n.track(this, ["name", "svgIcon", "svgHeight", "svgWidth", "cssClass", "isActive"])
// };
// return e(r.prototype, {
// terria: {
// get: function() {
// return this._terria
// }
// },
// hasText: {
// get: function() {
// return t(this.text) && "string" == typeof this.text
// }
// }
// }), r.prototype.activate = function() {
// throw new i("activate must be implemented in the derived class.")
// }, r
// }), i("ViewModels/NavigationControl", ["ViewModels/UserInterfaceControl"], function(t) {
// "use strict";
// var e = function(e) {
// t.apply(this, arguments)
// };
// return e.prototype = Object.create(t.prototype), e
// }), i("SvgPaths/svgReset", [], function() {
// "use strict";
// return "M 7.5,0 C 3.375,0 0,3.375 0,7.5 0,11.625 3.375,15 7.5,15 c 3.46875,0 6.375,-2.4375 7.21875,-5.625 l -1.96875,0 C 12,11.53125 9.9375,13.125 7.5,13.125 4.40625,13.125 1.875,10.59375 1.875,7.5 1.875,4.40625 4.40625,1.875 7.5,1.875 c 1.59375,0 2.90625,0.65625 3.9375,1.6875 l -3,3 6.5625,0 L 15,0 12.75,2.25 C 11.4375,0.84375 9.5625,0 7.5,0 z"
// }), i("ViewModels/ResetViewNavigationControl", ["Cesium/Core/defined", "Cesium/Scene/Camera", "Cesium/Core/Rectangle", "Cesium/Core/Cartographic", "ViewModels/NavigationControl", "SvgPaths/svgReset"], function(t, e, i, n, r, o) {
// "use strict";
// var a = function(t) {
// r.apply(this, arguments), this.name = "Reset View", this.svgIcon = o, this.svgHeight = 15, this.svgWidth = 15, this.cssClass = "navigation-control-icon-reset"
// };
// return a.prototype = Object.create(r.prototype), a.prototype.resetView = function() {
// var r = this.terria.scene,
// o = r.screenSpaceCameraController;
// if (o.enableInputs) {
// this.isActive = !0;
// var a = r.camera;
// if (t(this.terria.trackedEntity)) {
// var s = this.terria.trackedEntity;
// this.terria.trackedEntity = void 0, this.terria.trackedEntity = s
// } else if (this.terria.options.defaultResetView) {
// if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof n) a.flyTo({
// destination: r.globe.ellipsoid.cartographicToCartesian(this.terria.options.defaultResetView)
// });
// else if (this.terria.options.defaultResetView && this.terria.options.defaultResetView instanceof i) try {
// i.validate(this.terria.options.defaultResetView), a.flyTo({
// destination: this.terria.options.defaultResetView
// })
// } catch (l) {
// console.log("Cesium-navigation/ResetViewNavigationControl: options.defaultResetView Cesium rectangle is invalid!")
// }
// } else "function" == typeof a.flyHome ? a.flyHome(1) : a.flyTo({
// destination: e.DEFAULT_VIEW_RECTANGLE,
// duration: 1
// });
// this.isActive = !1
// }
// }, a.prototype.activate = function() {
// this.resetView()
// }, a
// }), i("Core/Utils", ["Cesium/Core/defined", "Cesium/Core/Ray", "Cesium/Core/Cartesian3", "Cesium/Core/Cartographic", "Cesium/Core/ReferenceFrame", "Cesium/Scene/SceneMode"], function(t, e, i, n, r, o) {
// "use strict";
// var a = {},
// s = new n,
// l = new e;
// return a.getCameraFocus = function(e, n, r) {
// var a = e.scene,
// u = a.camera;
// if (a.mode != o.MORPHING && (t(r) || (r = new i), t(e.trackedEntity) ? r = e.trackedEntity.position.getValue(e.clock.currentTime, r) : (l.origin = u.positionWC, l.direction = u.directionWC, r = a.globe.pick(l, a, r)), t(r))) return a.mode == o.SCENE2D || a.mode == o.COLUMBUS_VIEW ? (r = u.worldToCameraCoordinatesPoint(r, r), n && (r = a.globe.ellipsoid.cartographicToCartesian(a.mapProjection.unproject(r, s), r))) : n || (r = u.worldToCameraCoordinatesPoint(r, r)), r
// }, a
// }), i("ViewModels/ZoomNavigationControl", ["Cesium/Core/defined", "Cesium/Core/Ray", "Cesium/Core/IntersectionTests", "Cesium/Core/Cartesian3", "Cesium/Scene/SceneMode", "ViewModels/NavigationControl", "Core/Utils"], function(t, e, i, n, r, o, a) {
// "use strict";
// var s = function(t, e) {
// o.apply(this, arguments), this.name = "Zoom " + (e ? "In" : "Out"), this.text = e ? "+" : "-", this.cssClass = "navigation-control-icon-zoom-" + (e ? "in" : "out"), this.relativeAmount = 2, e && (this.relativeAmount = 1 / this.relativeAmount)
// };
// s.prototype.relativeAmount = 1, s.prototype = Object.create(o.prototype), s.prototype.activate = function() {
// this.zoom(this.relativeAmount)
// };
// var l = new n;
// return s.prototype.zoom = function(o) {
// if (this.isActive = !0, t(this.terria)) {
// var s = this.terria.scene,
// u = s.screenSpaceCameraController;
// if (!u.enableInputs || !u.enableZoom) return;
// var c, h = s.camera;
// switch (s.mode) {
// case r.MORPHING:
// break;
// case r.SCENE2D:
// h.zoomIn(h.positionCartographic.height * (1 - this.relativeAmount));
// break;
// default:
// var d;
// if (d = t(this.terria.trackedEntity) ? new n : a.getCameraFocus(this.terria, !1), t(d)) c = {
// direction: h.direction,
// up: h.up
// };
// else {
// var p = new e(h.worldToCameraCoordinatesPoint(s.globe.ellipsoid.cartographicToCartesian(h.positionCartographic)), h.directionWC);
// d = i.grazingAltitudeLocation(p, s.globe.ellipsoid), c = {
// heading: h.heading,
// pitch: h.pitch,
// roll: h.roll
// }
// }
// var f = n.subtract(h.position, d, l),
// m = n.multiplyByScalar(f, o, f),
// g = n.add(d, m, d);
// t(this.terria.trackedEntity) || s.mode == r.COLUMBUS_VIEW ? h.position = g : h.flyTo({
// destination: g,
// orientation: c,
// duration: .5,
// convert: !1
// })
// }
// }
// this.isActive = !1
// }, s
// }), i("SvgPaths/svgCompassOuterRing", [], function() {
// "use strict";
// return "m 66.5625,0 0,15.15625 3.71875,0 0,-10.40625 5.5,10.40625 4.375,0 0,-15.15625 -3.71875,0 0,10.40625 L 70.9375,0 66.5625,0 z M 72.5,20.21875 c -28.867432,0 -52.28125,23.407738 -52.28125,52.28125 0,28.87351 23.413818,52.3125 52.28125,52.3125 28.86743,0 52.28125,-23.43899 52.28125,-52.3125 0,-28.873512 -23.41382,-52.28125 -52.28125,-52.28125 z m 0,1.75 c 13.842515,0 26.368948,5.558092 35.5,14.5625 l -11.03125,11 0.625,0.625 11.03125,-11 c 8.9199,9.108762 14.4375,21.579143 14.4375,35.34375 0,13.764606 -5.5176,26.22729 -14.4375,35.34375 l -11.03125,-11 -0.625,0.625 11.03125,11 c -9.130866,9.01087 -21.658601,14.59375 -35.5,14.59375 -13.801622,0 -26.321058,-5.53481 -35.4375,-14.5 l 11.125,-11.09375 c 6.277989,6.12179 14.857796,9.90625 24.3125,9.90625 19.241896,0 34.875,-15.629154 34.875,-34.875 0,-19.245847 -15.633104,-34.84375 -34.875,-34.84375 -9.454704,0 -18.034511,3.760884 -24.3125,9.875 L 37.0625,36.4375 C 46.179178,27.478444 58.696991,21.96875 72.5,21.96875 z m -0.875,0.84375 0,13.9375 1.75,0 0,-13.9375 -1.75,0 z M 36.46875,37.0625 47.5625,48.15625 C 41.429794,54.436565 37.65625,63.027539 37.65625,72.5 c 0,9.472461 3.773544,18.055746 9.90625,24.34375 L 36.46875,107.9375 c -8.96721,-9.1247 -14.5,-21.624886 -14.5,-35.4375 0,-13.812615 5.53279,-26.320526 14.5,-35.4375 z M 72.5,39.40625 c 18.297686,0 33.125,14.791695 33.125,33.09375 0,18.302054 -14.827314,33.125 -33.125,33.125 -18.297687,0 -33.09375,-14.822946 -33.09375,-33.125 0,-18.302056 14.796063,-33.09375 33.09375,-33.09375 z M 22.84375,71.625 l 0,1.75 13.96875,0 0,-1.75 -13.96875,0 z m 85.5625,0 0,1.75 14,0 0,-1.75 -14,0 z M 71.75,108.25 l 0,13.9375 1.71875,0 0,-13.9375 -1.71875,0 z"
// }), i("SvgPaths/svgCompassGyro", [], function() {
// "use strict";
// return "m 72.71875,54.375 c -0.476702,0 -0.908208,0.245402 -1.21875,0.5625 -0.310542,0.317098 -0.551189,0.701933 -0.78125,1.1875 -0.172018,0.363062 -0.319101,0.791709 -0.46875,1.25 -6.91615,1.075544 -12.313231,6.656514 -13,13.625 -0.327516,0.117495 -0.661877,0.244642 -0.9375,0.375 -0.485434,0.22959 -0.901634,0.471239 -1.21875,0.78125 -0.317116,0.310011 -0.5625,0.742111 -0.5625,1.21875 l 0.03125,0 c 0,0.476639 0.245384,0.877489 0.5625,1.1875 0.317116,0.310011 0.702066,0.58291 1.1875,0.8125 0.35554,0.168155 0.771616,0.32165 1.21875,0.46875 1.370803,6.10004 6.420817,10.834127 12.71875,11.8125 0.146999,0.447079 0.30025,0.863113 0.46875,1.21875 0.230061,0.485567 0.470708,0.870402 0.78125,1.1875 0.310542,0.317098 0.742048,0.5625 1.21875,0.5625 0.476702,0 0.876958,-0.245402 1.1875,-0.5625 0.310542,-0.317098 0.582439,-0.701933 0.8125,-1.1875 0.172018,-0.363062 0.319101,-0.791709 0.46875,-1.25 6.249045,-1.017063 11.256351,-5.7184 12.625,-11.78125 0.447134,-0.1471 0.86321,-0.300595 1.21875,-0.46875 0.485434,-0.22959 0.901633,-0.502489 1.21875,-0.8125 0.317117,-0.310011 0.5625,-0.710861 0.5625,-1.1875 l -0.03125,0 c 0,-0.476639 -0.245383,-0.908739 -0.5625,-1.21875 C 89.901633,71.846239 89.516684,71.60459 89.03125,71.375 88.755626,71.244642 88.456123,71.117495 88.125,71 87.439949,64.078341 82.072807,58.503735 75.21875,57.375 c -0.15044,-0.461669 -0.326927,-0.884711 -0.5,-1.25 -0.230061,-0.485567 -0.501958,-0.870402 -0.8125,-1.1875 -0.310542,-0.317098 -0.710798,-0.5625 -1.1875,-0.5625 z m -0.0625,1.40625 c 0.03595,-0.01283 0.05968,0 0.0625,0 0.0056,0 0.04321,-0.02233 0.1875,0.125 0.144288,0.147334 0.34336,0.447188 0.53125,0.84375 0.06385,0.134761 0.123901,0.309578 0.1875,0.46875 -0.320353,-0.01957 -0.643524,-0.0625 -0.96875,-0.0625 -0.289073,0 -0.558569,0.04702 -0.84375,0.0625 C 71.8761,57.059578 71.936151,56.884761 72,56.75 c 0.18789,-0.396562 0.355712,-0.696416 0.5,-0.84375 0.07214,-0.07367 0.120304,-0.112167 0.15625,-0.125 z m 0,2.40625 c 0.448007,0 0.906196,0.05436 1.34375,0.09375 0.177011,0.592256 0.347655,1.271044 0.5,2.03125 0.475097,2.370753 0.807525,5.463852 0.9375,8.9375 -0.906869,-0.02852 -1.834463,-0.0625 -2.78125,-0.0625 -0.92298,0 -1.802327,0.03537 -2.6875,0.0625 0.138529,-3.473648 0.493653,-6.566747 0.96875,-8.9375 0.154684,-0.771878 0.320019,-1.463985 0.5,-2.0625 0.405568,-0.03377 0.804291,-0.0625 1.21875,-0.0625 z m -2.71875,0.28125 c -0.129732,0.498888 -0.259782,0.987558 -0.375,1.5625 -0.498513,2.487595 -0.838088,5.693299 -0.96875,9.25 -3.21363,0.15162 -6.119596,0.480068 -8.40625,0.9375 -0.682394,0.136509 -1.275579,0.279657 -1.84375,0.4375 0.799068,-6.135482 5.504716,-11.036454 11.59375,-12.1875 z M 75.5,58.5 c 6.043169,1.18408 10.705093,6.052712 11.5,12.15625 -0.569435,-0.155806 -1.200273,-0.302525 -1.875,-0.4375 -2.262525,-0.452605 -5.108535,-0.783809 -8.28125,-0.9375 -0.130662,-3.556701 -0.470237,-6.762405 -0.96875,-9.25 C 75.761959,59.467174 75.626981,58.990925 75.5,58.5 z m -2.84375,12.09375 c 0.959338,0 1.895843,0.03282 2.8125,0.0625 C 75.48165,71.267751 75.5,71.871028 75.5,72.5 c 0,1.228616 -0.01449,2.438313 -0.0625,3.59375 -0.897358,0.0284 -1.811972,0.0625 -2.75,0.0625 -0.927373,0 -1.831062,-0.03473 -2.71875,-0.0625 -0.05109,-1.155437 -0.0625,-2.365134 -0.0625,-3.59375 0,-0.628972 0.01741,-1.232249 0.03125,-1.84375 0.895269,-0.02827 1.783025,-0.0625 2.71875,-0.0625 z M 68.5625,70.6875 c -0.01243,0.60601 -0.03125,1.189946 -0.03125,1.8125 0,1.22431 0.01541,2.407837 0.0625,3.5625 -3.125243,-0.150329 -5.92077,-0.471558 -8.09375,-0.90625 -0.784983,-0.157031 -1.511491,-0.316471 -2.125,-0.5 -0.107878,-0.704096 -0.1875,-1.422089 -0.1875,-2.15625 0,-0.115714 0.02849,-0.228688 0.03125,-0.34375 0.643106,-0.20284 1.389577,-0.390377 2.25,-0.5625 2.166953,-0.433487 4.97905,-0.75541 8.09375,-0.90625 z m 8.3125,0.03125 c 3.075121,0.15271 5.824455,0.446046 7.96875,0.875 0.857478,0.171534 1.630962,0.360416 2.28125,0.5625 0.0027,0.114659 0,0.228443 0,0.34375 0,0.735827 -0.07914,1.450633 -0.1875,2.15625 -0.598568,0.180148 -1.29077,0.34562 -2.0625,0.5 -2.158064,0.431708 -4.932088,0.754666 -8.03125,0.90625 0.04709,-1.154663 0.0625,-2.33819 0.0625,-3.5625 0,-0.611824 -0.01924,-1.185379 -0.03125,-1.78125 z M 57.15625,72.5625 c 0.0023,0.572772 0.06082,1.131112 0.125,1.6875 -0.125327,-0.05123 -0.266577,-0.10497 -0.375,-0.15625 -0.396499,-0.187528 -0.665288,-0.387337 -0.8125,-0.53125 -0.147212,-0.143913 -0.15625,-0.182756 -0.15625,-0.1875 0,-0.0047 -0.02221,-0.07484 0.125,-0.21875 0.147212,-0.143913 0.447251,-0.312472 0.84375,-0.5 0.07123,-0.03369 0.171867,-0.06006 0.25,-0.09375 z m 31.03125,0 c 0.08201,0.03503 0.175941,0.05872 0.25,0.09375 0.396499,0.187528 0.665288,0.356087 0.8125,0.5 0.14725,0.14391 0.15625,0.21405 0.15625,0.21875 0,0.0047 -0.009,0.04359 -0.15625,0.1875 -0.147212,0.143913 -0.416001,0.343722 -0.8125,0.53125 -0.09755,0.04613 -0.233314,0.07889 -0.34375,0.125 0.06214,-0.546289 0.09144,-1.094215 0.09375,-1.65625 z m -29.5,3.625 c 0.479308,0.123125 0.983064,0.234089 1.53125,0.34375 2.301781,0.460458 5.229421,0.787224 8.46875,0.9375 0.167006,2.84339 0.46081,5.433176 0.875,7.5 0.115218,0.574942 0.245268,1.063612 0.375,1.5625 -5.463677,-1.028179 -9.833074,-5.091831 -11.25,-10.34375 z m 27.96875,0 C 85.247546,81.408945 80.919274,85.442932 75.5,86.5 c 0.126981,-0.490925 0.261959,-0.967174 0.375,-1.53125 0.41419,-2.066824 0.707994,-4.65661 0.875,-7.5 3.204493,-0.15162 6.088346,-0.480068 8.375,-0.9375 0.548186,-0.109661 1.051942,-0.220625 1.53125,-0.34375 z M 70.0625,77.53125 c 0.865391,0.02589 1.723666,0.03125 2.625,0.03125 0.912062,0 1.782843,-0.0048 2.65625,-0.03125 -0.165173,2.736408 -0.453252,5.207651 -0.84375,7.15625 -0.152345,0.760206 -0.322989,1.438994 -0.5,2.03125 -0.437447,0.03919 -0.895856,0.0625 -1.34375,0.0625 -0.414943,0 -0.812719,-0.02881 -1.21875,-0.0625 -0.177011,-0.592256 -0.347655,-1.271044 -0.5,-2.03125 -0.390498,-1.948599 -0.700644,-4.419842 -0.875,-7.15625 z m 1.75,10.28125 c 0.284911,0.01545 0.554954,0.03125 0.84375,0.03125 0.325029,0 0.648588,-0.01171 0.96875,-0.03125 -0.05999,0.148763 -0.127309,0.31046 -0.1875,0.4375 -0.18789,0.396562 -0.386962,0.696416 -0.53125,0.84375 -0.144288,0.147334 -0.181857,0.125 -0.1875,0.125 -0.0056,0 -0.07446,0.02233 -0.21875,-0.125 C 72.355712,88.946416 72.18789,88.646562 72,88.25 71.939809,88.12296 71.872486,87.961263 71.8125,87.8125 z"
// }), i("SvgPaths/svgCompassRotationMarker", [], function() {
// "use strict";
// return "M 72.46875,22.03125 C 59.505873,22.050338 46.521615,27.004287 36.6875,36.875 L 47.84375,47.96875 C 61.521556,34.240041 83.442603,34.227389 97.125,47.90625 l 11.125,-11.125 C 98.401629,26.935424 85.431627,22.012162 72.46875,22.03125 z"
// }), i("ViewModels/NavigationViewModel", ["Cesium/Core/defined", "Cesium/Core/Math", "Cesium/Core/getTimestamp", "Cesium/Core/EventHelper", "Cesium/Core/Transforms", "Cesium/Scene/SceneMode", "Cesium/Core/Cartesian2", "Cesium/Core/Cartesian3", "Cesium/Core/Matrix4", "Cesium/Core/BoundingSphere", "Cesium/Core/HeadingPitchRange", "KnockoutES5", "Core/loadView", "ViewModels/ResetViewNavigationControl", "ViewModels/ZoomNavigationControl", "SvgPaths/svgCompassOuterRing", "SvgPaths/svgCompassGyro", "SvgPaths/svgCompassRotationMarker", "Core/Utils"], function(t, e, i, n, r, o, a, s, l, u, c, h, d, p, f, m, g, v, _) {
// "use strict";
// function y(n, u, c) {
// function h(t, i) {
// var r = Math.atan2(-t.y, t.x);
// n.orbitCursorAngle = e.zeroToTwoPi(r - e.PI_OVER_TWO);
// var o = a.magnitude(t),
// s = i / 2,
// l = Math.min(o / s, 1),
// u = .5 * l * l + .5;
// n.orbitCursorOpacity = u
// }
// var d = n.terria.scene,
// p = d.screenSpaceCameraController;
// if (d.mode != o.MORPHING && p.enableInputs) {
// switch (d.mode) {
// case o.COLUMBUS_VIEW:
// if (p.enableLook) break;
// if (!p.enableTranslate || !p.enableTilt) return;
// break;
// case o.SCENE3D:
// if (p.enableLook) break;
// if (!p.enableTilt || !p.enableRotate) return;
// break;
// case o.SCENE2D:
// if (!p.enableTranslate) return
// }
// document.removeEventListener("mousemove", n.orbitMouseMoveFunction, !1), document.removeEventListener("mouseup", n.orbitMouseUpFunction, !1), t(n.orbitTickFunction) && n.terria.clock.onTick.removeEventListener(n.orbitTickFunction), n.orbitMouseMoveFunction = void 0, n.orbitMouseUpFunction = void 0, n.orbitTickFunction = void 0, n.isOrbiting = !0, n.orbitLastTimestamp = i();
// var f = d.camera;
// if (t(n.terria.trackedEntity)) n.orbitFrame = void 0, n.orbitIsLook = !1;
// else {
// var m = _.getCameraFocus(n.terria, !0, k);
// t(m) ? (n.orbitFrame = r.eastNorthUpToFixedFrame(m, d.globe.ellipsoid, E), n.orbitIsLook = !1) : (n.orbitFrame = r.eastNorthUpToFixedFrame(f.positionWC, d.globe.ellipsoid, E), n.orbitIsLook = !0)
// }
// n.orbitTickFunction = function(r) {
// var a, u = i(),
// c = u - n.orbitLastTimestamp,
// h = 2.5 * (n.orbitCursorOpacity - .5) / 1e3,
// p = c * h,
// m = n.orbitCursorAngle + e.PI_OVER_TWO,
// g = Math.cos(m) * p,
// v = Math.sin(m) * p;
// t(n.orbitFrame) && (a = l.clone(f.transform, x), f.lookAtTransform(n.orbitFrame)), d.mode == o.SCENE2D ? f.move(new s(g, v, 0), Math.max(d.canvas.clientWidth, d.canvas.clientHeight) / 100 * f.positionCartographic.height * p) : n.orbitIsLook ? (f.look(s.UNIT_Z, -g), f.look(f.right, -v)) : (f.rotateLeft(g), f.rotateUp(v)), t(n.orbitFrame) && f.lookAtTransform(a), n.orbitLastTimestamp = u
// }, n.orbitMouseMoveFunction = function(t) {
// var e = u.getBoundingClientRect(),
// i = new a((e.right - e.left) / 2, (e.bottom - e.top) / 2),
// n = new a(t.clientX - e.left, t.clientY - e.top),
// r = a.subtract(n, i, C);
// h(r, e.width)
// }, n.orbitMouseUpFunction = function(e) {
// n.isOrbiting = !1, document.removeEventListener("mousemove", n.orbitMouseMoveFunction, !1), document.removeEventListener("mouseup", n.orbitMouseUpFunction, !1), t(n.orbitTickFunction) && n.terria.clock.onTick.removeEventListener(n.orbitTickFunction), n.orbitMouseMoveFunction = void 0, n.orbitMouseUpFunction = void 0, n.orbitTickFunction = void 0
// }, document.addEventListener("mousemove", n.orbitMouseMoveFunction, !1), document.addEventListener("mouseup", n.orbitMouseUpFunction, !1), n.terria.clock.onTick.addEventListener(n.orbitTickFunction), h(c, u.getBoundingClientRect().width)
// }
// }
// function b(i, n, s) {
// var u = i.terria.scene,
// c = u.camera,
// h = u.screenSpaceCameraController;
// if (u.mode != o.MORPHING && u.mode != o.SCENE2D && h.enableInputs && (h.enableLook || u.mode != o.COLUMBUS_VIEW && (u.mode != o.SCENE3D || h.enableRotate))) {
// if (document.removeEventListener("mousemove", i.rotateMouseMoveFunction, !1), document.removeEventListener("mouseup", i.rotateMouseUpFunction, !1), i.rotateMouseMoveFunction = void 0, i.rotateMouseUpFunction = void 0, i.isRotating = !0, i.rotateInitialCursorAngle = Math.atan2(-s.y, s.x), t(i.terria.trackedEntity)) i.rotateFrame = void 0, i.rotateIsLook = !1;
// else {
// var d = _.getCameraFocus(i.terria, !0, k);
// t(d) && (u.mode != o.COLUMBUS_VIEW || h.enableLook || h.enableTranslate) ? (i.rotateFrame = r.eastNorthUpToFixedFrame(d, u.globe.ellipsoid, E), i.rotateIsLook = !1) : (i.rotateFrame = r.eastNorthUpToFixedFrame(c.positionWC, u.globe.ellipsoid, E), i.rotateIsLook = !0)
// }
// var p;
// t(i.rotateFrame) && (p = l.clone(c.transform, x), c.lookAtTransform(i.rotateFrame)), i.rotateInitialCameraAngle = -c.heading, t(i.rotateFrame) && c.lookAtTransform(p), i.rotateMouseMoveFunction = function(r) {
// var o, s = n.getBoundingClientRect(),
// u = new a((s.right - s.left) / 2, (s.bottom - s.top) / 2),
// c = new a(r.clientX - s.left, r.clientY - s.top),
// h = a.subtract(c, u, C),
// d = Math.atan2(-h.y, h.x),
// p = d - i.rotateInitialCursorAngle,
// f = e.zeroToTwoPi(i.rotateInitialCameraAngle - p),
// m = i.terria.scene.camera;
// t(i.rotateFrame) && (o = l.clone(m.transform, x), m.lookAtTransform(i.rotateFrame));
// var g = -m.heading;
// m.rotateRight(f - g), t(i.rotateFrame) && m.lookAtTransform(o)
// }, i.rotateMouseUpFunction = function(t) {
// i.isRotating = !1, document.removeEventListener("mousemove", i.rotateMouseMoveFunction, !1), document.removeEventListener("mouseup", i.rotateMouseUpFunction, !1), i.rotateMouseMoveFunction = void 0, i.rotateMouseUpFunction = void 0
// }, document.addEventListener("mousemove", i.rotateMouseMoveFunction, !1), document.addEventListener("mouseup", i.rotateMouseUpFunction, !1)
// }
// }
// var w = function(e) {
// function i() {
// t(r.terria) ? (r._unsubcribeFromPostRender && (r._unsubcribeFromPostRender(), r._unsubcribeFromPostRender = void 0), r.showCompass = !0, r._unsubcribeFromPostRender = r.terria.scene.postRender.addEventListener(function() {
// r.heading = r.terria.scene.camera.heading
// })) : (r._unsubcribeFromPostRender && (r._unsubcribeFromPostRender(), r._unsubcribeFromPostRender = void 0), r.showCompass = !1)
// }
// this.terria = e.terria, this.eventHelper = new n, this.controls = e.controls, t(this.controls) || (this.controls = [new f(this.terria, (!0)), new p(this.terria), new f(this.terria, (!1))]), this.svgCompassOuterRing = m, this.svgCompassGyro = g, this.svgCompassRotationMarker = v, this.showCompass = t(this.terria), this.heading = this.showCompass ? this.terria.scene.camera.heading : 0, this.isOrbiting = !1, this.orbitCursorAngle = 0, this.orbitCursorOpacity = 0, this.orbitLastTimestamp = 0, this.orbitFrame = void 0, this.orbitIsLook = !1, this.orbitMouseMoveFunction = void 0, this.orbitMouseUpFunction = void 0, this.isRotating = !1, this.rotateInitialCursorAngle = void 0, this.rotateFrame = void 0, this.rotateIsLook = !1, this.rotateMouseMoveFunction = void 0, this.rotateMouseUpFunction = void 0, this._unsubcribeFromPostRender = void 0, h.track(this, ["controls", "showCompass", "heading", "isOrbiting", "orbitCursorAngle", "isRotating"]);
// var r = this;
// this.eventHelper.add(this.terria.afterWidgetChanged, i, this), i()
// };
// w.prototype.destroy = function() {
// this.eventHelper.removeAll()
// }, w.prototype.show = function(t) {
// var e = '
' + "
";
// d(e, t, this)
// }, w.prototype.add = function(t) {
// this.controls.push(t)
// }, w.prototype.remove = function(t) {
// this.controls.remove(t)
// }, w.prototype.isLastControl = function(t) {
// return t === this.controls[this.controls.length - 1]
// };
// var C = new a;
// w.prototype.handleMouseDown = function(t, e) {
// var i = this.terria.scene;
// if (i.mode == o.MORPHING) return !0;
// var n = e.currentTarget,
// r = e.currentTarget.getBoundingClientRect(),
// s = r.width / 2,
// l = new a((r.right - r.left) / 2, (r.bottom - r.top) / 2),
// u = new a(e.clientX - r.left, e.clientY - r.top),
// c = a.subtract(u, l, C),
// h = a.magnitude(c),
// d = h / s,
// p = 145,
// f = 50;
// if (d < f / p) y(this, n, c);
// else {
// if (!(d < 1)) return !0;
// b(this, n, c)
// }
// };
// var x = new l,
// E = new l,
// k = new s;
// return w.prototype.handleDoubleClick = function(i, n) {
// var r = i.terria.scene,
// a = r.camera,
// l = r.screenSpaceCameraController;
// if (r.mode == o.MORPHING || !l.enableInputs) return !0;
// if (r.mode != o.COLUMBUS_VIEW || l.enableTranslate) {
// if (r.mode == o.SCENE3D || r.mode == o.COLUMBUS_VIEW) {
// if (!l.enableLook) return;
// if (r.mode == o.SCENE3D && !l.enableRotate) return
// }
// var h = _.getCameraFocus(i.terria, !0, k);
// if (!t(h)) return void this.controls[1].resetView();
// var d = r.globe.ellipsoid.cartographicToCartesian(a.positionCartographic, new s),
// p = r.globe.ellipsoid.geodeticSurfaceNormal(h),
// f = new u(h, 0);
// a.flyToBoundingSphere(f, {
// offset: new c(0, e.PI_OVER_TWO - s.angleBetween(p, a.directionWC), s.distance(d, h)),
// duration: 1.5
// })
// }
// }, w.create = function(t) {
// var e = new w(t);
// return e.show(t.container), e
// }, w
// }), i("CesiumNavigation", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/Event", "KnockoutES5", "Core/registerKnockoutBindings", "ViewModels/DistanceLegendViewModel", "ViewModels/NavigationViewModel"], function(t, e, i, n, r, o, a) {
// "use strict";
// function s(e, n) {
// if (!t(e)) throw new DeveloperError("CesiumWidget or Viewer is required.");
// var s = t(e.cesiumWidget) ? e.cesiumWidget : e,
// l = document.createElement("div");
// l.className = "cesium-widget-cesiumNavigationContainer", s.container.appendChild(l), this.terria = e, this.terria.options = n, this.terria.afterWidgetChanged = new i, this.terria.beforeWidgetChanged = new i, this.container = l, this.navigationDiv = document.createElement("div"), this.navigationDiv.setAttribute("id", "navigationDiv"), this.distanceLegendDiv = document.createElement("div"), this.navigationDiv.setAttribute("id", "distanceLegendDiv"), l.appendChild(this.navigationDiv), l.appendChild(this.distanceLegendDiv), r(), this.distanceLegendViewModel = o.create({
// container: this.distanceLegendDiv,
// terria: this.terria,
// mapElement: l
// }), this.navigationViewModel = a.create({
// container: this.navigationDiv,
// terria: this.terria
// })
// }
// var l = function(t) {
// s.apply(this, arguments), this._onDestroyListeners = []
// };
// return l.prototype.distanceLegendViewModel = void 0, l.prototype.navigationViewModel = void 0, l.prototype.navigationDiv = void 0, l.prototype.distanceLegendDiv = void 0, l.prototype.terria = void 0, l.prototype.container = void 0, l.prototype._onDestroyListeners = void 0, l.prototype.destroy = function() {
// t(this.navigationViewModel) && this.navigationViewModel.destroy(), t(this.distanceLegendViewModel) && this.distanceLegendViewModel.destroy(), t(this.navigationDiv) && this.navigationDiv.parentNode.removeChild(this.navigationDiv), delete this.navigationDiv, t(this.distanceLegendDiv) && this.distanceLegendDiv.parentNode.removeChild(this.distanceLegendDiv), delete this.distanceLegendDiv, t(this.container) && this.container.parentNode.removeChild(this.container), delete this.container;
// for (var e = 0; e < this._onDestroyListeners.length; e++) this._onDestroyListeners[e]()
// }, l.prototype.addOnDestroyListener = function(t) {
// "function" == typeof t && this._onDestroyListeners.push(t)
// }, l
// }), i("dummy/require-less/less/dummy", [], function() {}), i("viewerCesiumNavigationMixin", ["Cesium/Core/defined", "Cesium/Core/defineProperties", "Cesium/Core/DeveloperError", "CesiumNavigation", "dummy/require-less/less/dummy"], function(t, e, i, n) {
// "use strict";
// function r(n, r) {
// if (!t(n)) throw new i("viewer is required.");
// var a = o(n, r);
// a.addOnDestroyListener(function(t) {
// return function() {
// delete t.cesiumNavigation
// }
// }(n)), e(n, {
// cesiumNavigation: {
// configurable: !0,
// get: function() {
// return n.cesiumWidget.cesiumNavigation
// }
// }
// })
// }
// r.mixinWidget = function(t, e) {
// return o.apply(void 0, arguments)
// };
// var o = function(i, r) {
// var o = new n(i, r),
// a = t(i.cesiumWidget) ? i.cesiumWidget : i;
// return e(a, {
// cesiumNavigation: {
// configurable: !0,
// get: function() {
// return o
// }
// }
// }), o.addOnDestroyListener(function(t) {
// return function() {
// delete t.cesiumNavigation
// }
// }(a)), o
// };
// return r
// }), function(t) {
// var e = document,
// i = "appendChild",
// n = "styleSheet",
// r = e.createElement("style");
// r.type = "text/css", e.getElementsByTagName("head")[0][i](r), r[n] ? r[n].cssText = t : r[i](e.createTextNode(t))
// }(".full-window{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}.markdown a:hover,.markdown u,a:hover{text-decoration:underline}.modal,.modal-background{top:0;left:0;bottom:0;right:0}.modal-background{pointer-events:auto;background-color:rgba(0,0,0,.5);z-index:1000;position:fixed}.modal{position:absolute;margin:auto;background-color:#2f353c;max-height:100%;max-width:100%;font-family:'Roboto',sans-serif;color:#fff}.modal-header{background-color:rgba(0,0,0,.2);border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown fieldset,.markdown input,.markdown select,.markdown textarea{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown dl,.markdown ol,.markdown p,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown s{text-decoration:line-through}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown code,.markdown pre,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown code,.markdown pre{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:rgba(0,0,0,.125)}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating,.floating-horizontal,.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8)}.floating-horizontal{padding-left:5px;padding-right:5px}.floating-vertical{padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:rgba(47,53,60,.8);padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);box-sizing:content-box}.distance-legend-label{display:inline-block;font-size:13px;font-weight:lighter;line-height:30px;color:#ffffff;text-shadow: 5px 2px 6px #000;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #fff;border-right:1px solid #fff;border-bottom:1px solid #fff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width:700px),screen and (max-height:420px){.distance-legend{display:none}}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:0}.navigation-control-icon-zoom-in{padding-bottom:4px}.navigation-control-icon-zoom-in,.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:rgba(255,255,255,.8);padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass,.compass-outer-ring{position:absolute;width:95px;height:95px}.compass{pointer-events:auto;right:0;overflow:hidden;top:100px}.compass-outer-ring{top:0;fill:rgba(255,255,255,.5)}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active,.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:rgba(47,53,60,.8);border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}@media screen and (max-width:700px),screen and (max-height:420px){.compass,.navigation-controls{display:none}}@media print{.compass,.navigation-controls{display:none}}"), i("Cesium/Core/defined", function() {
// return Cesium.defined
// }), i("Cesium/Core/defineProperties", function() {
// return Cesium.defineProperties
// }), i("Cesium/Core/defaultValue", function() {
// return Cesium.defaultValue
// }), i("Cesium/Core/Event", function() {
// return Cesium.Event
// }), i("Cesium/Widgets/getElement", function() {
// return Cesium.getElement
// }), i("Cesium/Widgets/SvgPathBindingHandler", function() {
// return Cesium.SvgPathBindingHandler
// }), i("Cesium/Core/Ray", function() {
// return Cesium.Ray
// }), i("Cesium/Core/Cartesian3", function() {
// return Cesium.Cartesian3
// }), i("Cesium/Core/Cartographic", function() {
// return Cesium.Cartographic
// }), i("Cesium/Core/ReferenceFrame", function() {
// return Cesium.ReferenceFrame
// }), i("Cesium/Scene/SceneMode", function() {
// return Cesium.SceneMode
// }), i("Cesium/Core/DeveloperError", function() {
// return Cesium.DeveloperError
// }), i("Cesium/Core/EllipsoidGeodesic", function() {
// return Cesium.EllipsoidGeodesic
// }), i("Cesium/Core/Cartesian2", function() {
// return Cesium.Cartesian2
// }), i("Cesium/Core/getTimestamp", function() {
// return Cesium.getTimestamp
// }), i("Cesium/Core/EventHelper", function() {
// return Cesium.EventHelper
// }), i("Cesium/Core/Math", function() {
// return Cesium.Math
// }), i("Cesium/Core/Transforms", function() {
// return Cesium.Transforms
// }), i("Cesium/Core/Matrix4", function() {
// return Cesium.Matrix4
// }), i("Cesium/Core/BoundingSphere", function() {
// return Cesium.BoundingSphere
// }), i("Cesium/Core/HeadingPitchRange", function() {
// return Cesium.HeadingPitchRange
// }), i("Cesium/Scene/Camera", function() {
// return Cesium.Camera
// }), i("Cesium/Core/Rectangle", function() {
// return Cesium.Rectangle
// }), i("Cesium/Core/IntersectionTests", function() {
// return Cesium.IntersectionTests
// }), e("viewerCesiumNavigationMixin")
// }), function(t, e) {
// "function" == typeof define && define.amd ? define([], e) : "object" == typeof module && module.exports ? module.exports = e() : t.pointconvert = e();
// }(this, function() {
// var t = 52.35987755982988,
// e = 3.141592653589793,
// i = 6378245,
// n = .006693421622965943,
// r = function(t) {
// var e = Number(t[0]),
// i = Number(t[1]),
// n = 52.35987755982988,
// r = e - .0065,
// o = i - .006,
// a = Math.sqrt(r * r + o * o) - 2e-5 * Math.sin(o * n),
// s = Math.atan2(o, r) - 3e-6 * Math.cos(r * n),
// l = a * Math.cos(s),
// u = a * Math.sin(s);
// return l = Number(l.toFixed(6)), u = Number(u.toFixed(6)), [l, u]
// },
// o = function(e) {
// var i = Number(e[0]),
// n = Number(e[1]),
// r = Math.sqrt(i * i + n * n) + 2e-5 * Math.sin(n * t),
// o = Math.atan2(n, i) + 3e-6 * Math.cos(i * t),
// a = r * Math.cos(o) + .0065,
// s = r * Math.sin(o) + .006;
// return a = Number(a.toFixed(6)), s = Number(s.toFixed(6)), [a, s]
// },
// a = function(t) {
// var r = Number(t[0]),
// o = Number(t[1]);
// if (d(r, o)) return [r, o];
// var a = c(r - 105, o - 35),
// s = h(r - 105, o - 35),
// l = o / 180 * e,
// u = Math.sin(l);
// u = 1 - n * u * u;
// var p = Math.sqrt(u);
// a = 180 * a / (i * (1 - n) / (u * p) * e), s = 180 * s / (i / p * Math.cos(l) * e);
// var f = o + a,
// m = r + s;
// return m = Number(m.toFixed(6)), f = Number(f.toFixed(6)), [m, f]
// },
// s = function(t) {
// var r = Number(t[0]),
// o = Number(t[1]);
// if (d(r, o)) return [r, o];
// var a = c(r - 105, o - 35),
// s = h(r - 105, o - 35),
// l = o / 180 * e,
// u = Math.sin(l);
// u = 1 - n * u * u;
// var p = Math.sqrt(u);
// a = 180 * a / (i * (1 - n) / (u * p) * e), s = 180 * s / (i / p * Math.cos(l) * e), mglat = o + a, mglng = r + s;
// var f = 2 * r - mglng,
// m = 2 * o - mglat;
// return f = Number(f.toFixed(6)), m = Number(m.toFixed(6)), [f, m]
// },
// l = function(t) {
// return s(r(t))
// },
// u = function(t) {
// return o(a(t))
// },
// c = function(t, i) {
// var n = -100 + 2 * t + 3 * i + .2 * i * i + .1 * t * i + .2 * Math.sqrt(Math.abs(t));
// return n += 2 * (20 * Math.sin(6 * t * e) + 20 * Math.sin(2 * t * e)) / 3, n += 2 * (20 * Math.sin(i * e) + 40 * Math.sin(i / 3 * e)) / 3, n += 2 * (160 * Math.sin(i / 12 * e) + 320 * Math.sin(i * e / 30)) / 3
// },
// h = function(t, i) {
// var n = 300 + t + 2 * i + .1 * t * t + .1 * t * i + .1 * Math.sqrt(Math.abs(t));
// return n += 2 * (20 * Math.sin(6 * t * e) + 20 * Math.sin(2 * t * e)) / 3, n += 2 * (20 * Math.sin(t * e) + 40 * Math.sin(t / 3 * e)) / 3, n += 2 * (150 * Math.sin(t / 12 * e) + 300 * Math.sin(t / 30 * e)) / 3
// },
// d = function(t, e) {
// return t < 72.004 || t > 137.8347 || e < .8293 || e > 55.8271 || !1
// },
// p = function(t) {
// var i = Number(t[0]),
// n = Number(t[1]),
// r = 20037508.34 * i / 180,
// o = Math.log(Math.tan((90 + n) * e / 360)) / (e / 180);
// return o = 20037508.34 * o / 180, r = Number(r.toFixed(2)), o = Number(o.toFixed(2)), [r, o]
// },
// f = function(t) {
// var i = Number(t[0]),
// n = Number(t[1]),
// r = i / 20037508.34 * 180,
// o = n / 20037508.34 * 180;
// return o = 180 / e * (2 * Math.atan(Math.exp(o * e / 180)) - e / 2), r = Number(r.toFixed(6)), o = Number(o.toFixed(6)), [r, o]
// };
// return {
// jwd2mct: p,
// mct2jwd: f,
// bd2gcj: r,
// gcj2bd: o,
// bd2wgs: l,
// wgs2bd: u,
// wgs2gcj: a,
// gcj2wgs: s
// }
// }), function(t, e) {
// "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.L = {})
// }(this, function(t) {
// "use strict";
// function e(t) {
// var e, i, n, r;
// for (i = 1, n = arguments.length; i < n; i++) {
// r = arguments[i];
// for (e in r) t[e] = r[e]
// }
// return t
// }
// function i(t, e) {
// var i = Array.prototype.slice;
// if (t.bind) return t.bind.apply(t, i.call(arguments, 1));
// var n = i.call(arguments, 2);
// return function() {
// return t.apply(e, n.length ? n.concat(i.call(arguments)) : arguments)
// }
// }
// function n(t) {
// return t._leaflet_id = t._leaflet_id || ++Wt, t._leaflet_id
// }
// function r(t, e, i) {
// var n, r, o, a;
// return a = function() {
// n = !1, r && (o.apply(i, r), r = !1)
// }, o = function() {
// n ? r = arguments : (t.apply(i, arguments), setTimeout(a, e), n = !0)
// }
// }
// function o(t, e, i) {
// var n = e[1],
// r = e[0],
// o = n - r;
// return t === n && i ? t : ((t - r) % o + o) % o + r
// }
// function a() {
// return !1
// }
// function s(t, e) {
// var i = Math.pow(10, e || 5);
// return Math.round(t * i) / i
// }
// function l(t) {
// return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "")
// }
// function u(t) {
// return l(t).split(/\s+/)
// }
// function c(t, e) {
// t.hasOwnProperty("options") || (t.options = t.options ? Vt(t.options) : {});
// for (var i in e) t.options[i] = e[i];
// return t.options
// }
// function h(t, e, i) {
// var n = [];
// for (var r in t) n.push(encodeURIComponent(i ? r.toUpperCase() : r) + "=" + encodeURIComponent(t[r]));
// return (e && e.indexOf("?") !== -1 ? "&" : "?") + n.join("&")
// }
// function d(t, e) {
// if (null != t && null != e) return t.replace(Zt, function(t, i) {
// var n = e[i];
// if (void 0 === n) throw new Error("No value provided for variable " + t);
// return "function" == typeof n && (n = n(e)), n
// })
// }
// function p(t, e) {
// for (var i = 0; i < t.length; i++) if (t[i] === e) return i;
// return -1
// }
// function f(t) {
// return window["webkit" + t] || window["moz" + t] || window["ms" + t]
// }
// function m(t) {
// var e = +new Date,
// i = Math.max(0, 16 - (e - Jt));
// return Jt = e + i, window.setTimeout(t, i)
// }
// function g(t, e, n) {
// return n && Kt === m ? void t.call(e) : Kt.call(window, i(t, e))
// }
// function v(t) {
// t && Yt.call(window, t)
// }
// function _() {}
// function y(t) {
// if (L && L.Mixin) {
// t = Gt(t) ? t : [t];
// for (var e = 0; e < t.length; e++) t[e] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", (new Error).stack)
// }
// }
// function b(t, e, i) {
// this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e
// }
// function w(t, e, i) {
// return t instanceof b ? t : Gt(t) ? new b(t[0], t[1]) : void 0 === t || null === t ? t : "object" == typeof t && "x" in t && "y" in t ? new b(t.x, t.y) : new b(t, e, i)
// }
// function C(t, e) {
// if (t) for (var i = e ? [t, e] : t, n = 0, r = i.length; n < r; n++) this.extend(i[n])
// }
// function x(t, e) {
// return !t || t instanceof C ? t : new C(t, e)
// }
// function E(t, e) {
// if (t) for (var i = e ? [t, e] : t, n = 0, r = i.length; n < r; n++) this.extend(i[n])
// }
// function k(t, e) {
// return t instanceof E ? t : new E(t, e)
// }
// function P(t, e, i) {
// if (isNaN(t) || isNaN(e)) throw new Error("Invalid LatLng object: (" + t + ", " + e + ")");
// this.lat = +t, this.lng = +e, void 0 !== i && (this.alt = +i)
// }
// function D(t, e, i) {
// return t instanceof P ? t : Gt(t) && "object" != typeof t[0] ? 3 === t.length ? new P(t[0], t[1], t[2]) : 2 === t.length ? new P(t[0], t[1]) : null : void 0 === t || null === t ? t : "object" == typeof t && "lat" in t ? new P(t.lat, "lng" in t ? t.lng : t.lon, t.alt) : void 0 === e ? null : new P(t, e, i)
// }
// function T(t, e, i, n) {
// return Gt(t) ? (this._a = t[0], this._b = t[1], this._c = t[2], void(this._d = t[3])) : (this._a = t, this._b = e, this._c = i, void(this._d = n))
// }
// function S(t, e, i, n) {
// return new T(t, e, i, n)
// }
// function M(t) {
// return document.createElementNS("http://www.w3.org/2000/svg", t)
// }
// function A(t) {
// return navigator.userAgent.toLowerCase().indexOf(t) >= 0
// }
// function O(t, e, i, n) {
// return "touchstart" === e ? I(t, i, n) : "touchmove" === e ? U(t, i, n) : "touchend" === e && H(t, i, n), this
// }
// function N(t, e, i) {
// var n = t["_leaflet_" + e + i];
// return "touchstart" === e ? t.removeEventListener(He, n, !1) : "touchmove" === e ? t.removeEventListener(qe, n, !1) : "touchend" === e && (t.removeEventListener(je, n, !1), t.removeEventListener(Ve, n, !1)), this
// }
// function I(t, e, n) {
// var r = i(function(t) {
// if ("mouse" !== t.pointerType && t.pointerType !== t.MSPOINTER_TYPE_MOUSE && t.pointerType !== t.MSPOINTER_TYPE_MOUSE) {
// if (!(We.indexOf(t.target.tagName) < 0)) return;
// Y(t)
// }
// B(t, e)
// });
// t["_leaflet_touchstart" + n] = r, t.addEventListener(He, r, !1), Ge || (document.documentElement.addEventListener(He, R, !0), document.documentElement.addEventListener(qe, F, !0), document.documentElement.addEventListener(je, z, !0), document.documentElement.addEventListener(Ve, z, !0), Ge = !0)
// }
// function R(t) {
// Ze[t.pointerId] = t, $e++
// }
// function F(t) {
// Ze[t.pointerId] && (Ze[t.pointerId] = t)
// }
// function z(t) {
// delete Ze[t.pointerId], $e--
// }
// function B(t, e) {
// t.touches = [];
// for (var i in Ze) t.touches.push(Ze[i]);
// t.changedTouches = [t], e(t)
// }
// function U(t, e, i) {
// var n = function(t) {
// (t.pointerType !== t.MSPOINTER_TYPE_MOUSE && "mouse" !== t.pointerType || 0 !== t.buttons) && B(t, e)
// };
// t["_leaflet_touchmove" + i] = n, t.addEventListener(qe, n, !1)
// }
// function H(t, e, i) {
// var n = function(t) {
// B(t, e)
// };
// t["_leaflet_touchend" + i] = n, t.addEventListener(je, n, !1), t.addEventListener(Ve, n, !1)
// }
// function q(t, e, i) {
// function n(t) {
// var e;
// if (Ae) {
// if (!pe || "mouse" === t.pointerType) return;
// e = $e
// } else e = t.touches.length;
// if (!(e > 1)) {
// var i = Date.now(),
// n = i - (o || i);
// a = t.touches ? t.touches[0] : t, s = n > 0 && n <= l, o = i
// }
// }
// function r(t) {
// if (s && !a.cancelBubble) {
// if (Ae) {
// if (!pe || "mouse" === t.pointerType) return;
// var i, n, r = {};
// for (n in a) i = a[n], r[n] = i && i.bind ? i.bind(a) : i;
// a = r
// }
// a.type = "dblclick", e(a), o = null
// }
// }
// var o, a, s = !1,
// l = 250;
// return t[Ye + Je + i] = n, t[Ye + Ke + i] = r, t[Ye + "dblclick" + i] = e, t.addEventListener(Je, n, !1), t.addEventListener(Ke, r, !1), t.addEventListener("dblclick", e, !1), this
// }
// function j(t, e) {
// var i = t[Ye + Je + e],
// n = t[Ye + Ke + e],
// r = t[Ye + "dblclick" + e];
// return t.removeEventListener(Je, i, !1), t.removeEventListener(Ke, n, !1), pe || t.removeEventListener("dblclick", r, !1), this
// }
// function V(t, e, i, n) {
// if ("object" == typeof e) for (var r in e) Z(t, r, e[r], i);
// else {
// e = u(e);
// for (var o = 0, a = e.length; o < a; o++) Z(t, e[o], i, n)
// }
// return this
// }
// function W(t, e, i, n) {
// if ("object" == typeof e) for (var r in e) G(t, r, e[r], i);
// else if (e) {
// e = u(e);
// for (var o = 0, a = e.length; o < a; o++) G(t, e[o], i, n)
// } else {
// for (var s in t[Xe]) G(t, s, t[Xe][s]);
// delete t[Xe]
// }
// return this
// }
// function Z(t, e, i, r) {
// var o = e + n(i) + (r ? "_" + n(r) : "");
// if (t[Xe] && t[Xe][o]) return this;
// var a = function(e) {
// return i.call(r || t, e || window.event)
// },
// s = a;
// Ae && 0 === e.indexOf("touch") ? O(t, e, a, o) : !Oe || "dblclick" !== e || !q || Ae && _e ? "addEventListener" in t ? "mousewheel" === e ? t.addEventListener("onwheel" in t ? "wheel" : "mousewheel", a, !1) : "mouseenter" === e || "mouseleave" === e ? (a = function(e) {
// e = e || window.event, nt(t, e) && s(e)
// }, t.addEventListener("mouseenter" === e ? "mouseover" : "mouseout", a, !1)) : ("click" === e && me && (a = function(t) {
// rt(t, s)
// }), t.addEventListener(e, a, !1)) : "attachEvent" in t && t.attachEvent("on" + e, a) : q(t, a, o), t[Xe] = t[Xe] || {}, t[Xe][o] = a
// }
// function G(t, e, i, r) {
// var o = e + n(i) + (r ? "_" + n(r) : ""),
// a = t[Xe] && t[Xe][o];
// return a ? (Ae && 0 === e.indexOf("touch") ? N(t, e, o) : Oe && "dblclick" === e && j ? j(t, o) : "removeEventListener" in t ? "mousewheel" === e ? t.removeEventListener("onwheel" in t ? "wheel" : "mousewheel", a, !1) : t.removeEventListener("mouseenter" === e ? "mouseover" : "mouseleave" === e ? "mouseout" : e, a, !1) : "detachEvent" in t && t.detachEvent("on" + e, a), void(t[Xe][o] = null)) : this
// }
// function $(t) {
// return t.stopPropagation ? t.stopPropagation() : t.originalEvent ? t.originalEvent._stopped = !0 : t.cancelBubble = !0, it(t), this
// }
// function J(t) {
// return Z(t, "mousewheel", $), this
// }
// function K(t) {
// return V(t, "mousedown touchstart dblclick", $), Z(t, "click", et), this
// }
// function Y(t) {
// return t.preventDefault ? t.preventDefault() : t.returnValue = !1, this
// }
// function X(t) {
// return Y(t), $(t), this
// }
// function Q(t, e) {
// if (!e) return new b(t.clientX, t.clientY);
// var i = e.getBoundingClientRect();
// return new b(t.clientX - i.left - e.clientLeft, t.clientY - i.top - e.clientTop)
// }
// function tt(t) {
// return pe ? t.wheelDeltaY / 2 : t.deltaY && 0 === t.deltaMode ? -t.deltaY / Qe : t.deltaY && 1 === t.deltaMode ? 20 * -t.deltaY : t.deltaY && 2 === t.deltaMode ? 60 * -t.deltaY : t.deltaX || t.deltaZ ? 0 : t.wheelDelta ? (t.wheelDeltaY || t.wheelDelta) / 2 : t.detail && Math.abs(t.detail) < 32765 ? 20 * -t.detail : t.detail ? t.detail / -32765 * 60 : 0
// }
// function et(t) {
// ti[t.type] = !0
// }
// function it(t) {
// var e = ti[t.type];
// return ti[t.type] = !1, e
// }
// function nt(t, e) {
// var i = e.relatedTarget;
// if (!i) return !0;
// try {
// for (; i && i !== t;) i = i.parentNode
// } catch (n) {
// return !1
// }
// return i !== t
// }
// function rt(t, e) {
// var i = t.timeStamp || t.originalEvent && t.originalEvent.timeStamp,
// n = re && i - re;
// return n && n > 100 && n < 500 || t.target._simulatedClick && !t._simulated ? void X(t) : (re = i, void e(t))
// }
// function ot(t) {
// return "string" == typeof t ? document.getElementById(t) : t
// }
// function at(t, e) {
// var i = t.style[e] || t.currentStyle && t.currentStyle[e];
// if ((!i || "auto" === i) && document.defaultView) {
// var n = document.defaultView.getComputedStyle(t, null);
// i = n ? n[e] : null
// }
// return "auto" === i ? null : i
// }
// function st(t, e, i) {
// var n = document.createElement(t);
// return n.className = e || "", i && i.appendChild(n), n
// }
// function lt(t) {
// var e = t.parentNode;
// e && e.removeChild(t)
// }
// function ut(t) {
// for (; t.firstChild;) t.removeChild(t.firstChild)
// }
// function ct(t) {
// var e = t.parentNode;
// e.lastChild !== t && e.appendChild(t)
// }
// function ht(t) {
// var e = t.parentNode;
// e.firstChild !== t && e.insertBefore(t, e.firstChild)
// }
// function dt(t, e) {
// if (void 0 !== t.classList) return t.classList.contains(e);
// var i = gt(t);
// return i.length > 0 && new RegExp("(^|\\s)" + e + "(\\s|$)").test(i)
// }
// function pt(t, e) {
// if (void 0 !== t.classList) for (var i = u(e), n = 0, r = i.length; n < r; n++) t.classList.add(i[n]);
// else if (!dt(t, e)) {
// var o = gt(t);
// mt(t, (o ? o + " " : "") + e)
// }
// }
// function ft(t, e) {
// void 0 !== t.classList ? t.classList.remove(e) : mt(t, l((" " + gt(t) + " ").replace(" " + e + " ", " ")))
// }
// function mt(t, e) {
// void 0 === t.className.baseVal ? t.className = e : t.className.baseVal = e
// }
// function gt(t) {
// return void 0 === t.className.baseVal ? t.className : t.className.baseVal
// }
// function vt(t, e) {
// "opacity" in t.style ? t.style.opacity = e : "filter" in t.style && _t(t, e)
// }
// function _t(t, e) {
// var i = !1,
// n = "DXImageTransform.Microsoft.Alpha";
// try {
// i = t.filters.item(n)
// } catch (r) {
// if (1 === e) return
// }
// e = Math.round(100 * e), i ? (i.Enabled = 100 !== e, i.Opacity = e) : t.style.filter += " progid:" + n + "(opacity=" + e + ")"
// }
// function yt(t) {
// for (var e = document.documentElement.style, i = 0; i < t.length; i++) if (t[i] in e) return t[i];
// return !1
// }
// function bt(t, e, i) {
// var n = e || new b(0, 0);
// t.style[ii] = (Ee ? "translate(" + n.x + "px," + n.y + "px)" : "translate3d(" + n.x + "px," + n.y + "px,0)") + (i ? " scale(" + i + ")" : "")
// }
// function wt(t, e) {
// t._leaflet_pos = e, Pe ? bt(t, e) : (t.style.left = e.x + "px", t.style.top = e.y + "px")
// }
// function Ct(t) {
// return t._leaflet_pos || new b(0, 0)
// }
// function xt() {
// V(window, "dragstart", Y)
// }
// function Et() {
// W(window, "dragstart", Y)
// }
// function kt(t) {
// for (; t.tabIndex === -1;) t = t.parentNode;
// t.style && (Lt(), ai = t, si = t.style.outline, t.style.outline = "none", V(window, "keydown", Lt))
// }
// function Lt() {
// ai && (ai.style.outline = si, ai = void 0, si = void 0, W(window, "keydown", Lt))
// }
// function Pt(t, e) {
// if (!e || !t.length) return t.slice();
// var i = e * e;
// return t = At(t, i), t = St(t, i)
// }
// function Dt(t, e, i) {
// return Math.sqrt(Ft(t, e, i, !0))
// }
// function Tt(t, e, i) {
// return Ft(t, e, i)
// }
// function St(t, e) {
// var i = t.length,
// n = typeof Uint8Array != void 0 + "" ? Uint8Array : Array,
// r = new n(i);
// r[0] = r[i - 1] = 1, Mt(t, r, e, 0, i - 1);
// var o, a = [];
// for (o = 0; o < i; o++) r[o] && a.push(t[o]);
// return a
// }
// function Mt(t, e, i, n, r) {
// var o, a, s, l = 0;
// for (a = n + 1; a <= r - 1; a++) s = Ft(t[a], t[n], t[r], !0), s > l && (o = a, l = s);
// l > i && (e[o] = 1, Mt(t, e, i, n, o), Mt(t, e, i, o, r))
// }
// function At(t, e) {
// for (var i = [t[0]], n = 1, r = 0, o = t.length; n < o; n++) Rt(t[n], t[r]) > e && (i.push(t[n]), r = n);
// return r < o - 1 && i.push(t[o - 1]), i
// }
// function Ot(t, e, i, n, r) {
// var o, a, s, l = n ? li : It(t, i),
// u = It(e, i);
// for (li = u;;) {
// if (!(l | u)) return [t, e];
// if (l & u) return !1;
// o = l || u, a = Nt(t, e, o, i, r), s = It(a, i), o === l ? (t = a, l = s) : (e = a, u = s)
// }
// }
// function Nt(t, e, i, n, r) {
// var o, a, s = e.x - t.x,
// l = e.y - t.y,
// u = n.min,
// c = n.max;
// return 8 & i ? (o = t.x + s * (c.y - t.y) / l, a = c.y) : 4 & i ? (o = t.x + s * (u.y - t.y) / l, a = u.y) : 2 & i ? (o = c.x, a = t.y + l * (c.x - t.x) / s) : 1 & i && (o = u.x, a = t.y + l * (u.x - t.x) / s), new b(o, a, r)
// }
// function It(t, e) {
// var i = 0;
// return t.x < e.min.x ? i |= 1 : t.x > e.max.x && (i |= 2), t.y < e.min.y ? i |= 4 : t.y > e.max.y && (i |= 8), i
// }
// function Rt(t, e) {
// var i = e.x - t.x,
// n = e.y - t.y;
// return i * i + n * n
// }
// function Ft(t, e, i, n) {
// var r, o = e.x,
// a = e.y,
// s = i.x - o,
// l = i.y - a,
// u = s * s + l * l;
// return u > 0 && (r = ((t.x - o) * s + (t.y - a) * l) / u, r > 1 ? (o = i.x, a = i.y) : r > 0 && (o += s * r, a += l * r)), s = t.x - o, l = t.y - a, n ? s * s + l * l : new b(o, a)
// }
// function zt(t) {
// return !Gt(t[0]) || "object" != typeof t[0][0] && "undefined" != typeof t[0][0]
// }
// function Bt(t) {
// return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), zt(t)
// }
// function Ut(t, e, i) {
// var n, r, o, a, s, l, u, c, h, d = [1, 4, 2, 8];
// for (r = 0, u = t.length; r < u; r++) t[r]._code = It(t[r], e);
// for (a = 0; a < 4; a++) {
// for (c = d[a], n = [], r = 0, u = t.length, o = u - 1; r < u; o = r++) s = t[r], l = t[o], s._code & c ? l._code & c || (h = Nt(l, s, c, e, i), h._code = It(h, e), n.push(h)) : (l._code & c && (h = Nt(l, s, c, e, i), h._code = It(h, e), n.push(h)), n.push(s));
// t = n
// }
// return t
// }
// function Ht() {
// return window.L = gi, this
// }
// var qt = "1.2.0+HEAD.1ac320b",
// jt = Object.freeze;
// Object.freeze = function(t) {
// return t
// };
// var Vt = Object.create ||
// function() {
// function t() {}
// return function(e) {
// return t.prototype = e, new t
// }
// }(), Wt = 0, Zt = /\{ *([\w_\-]+) *\}/g, Gt = Array.isArray ||
// function(t) {
// return "[object Array]" === Object.prototype.toString.call(t)
// }, $t = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=", Jt = 0, Kt = window.requestAnimationFrame || f("RequestAnimationFrame") || m, Yt = window.cancelAnimationFrame || f("CancelAnimationFrame") || f("CancelRequestAnimationFrame") ||
// function(t) {
// window.clearTimeout(t)
// }, Xt = (Object.freeze || Object)({
// freeze: jt,
// extend: e,
// create: Vt,
// bind: i,
// lastId: Wt,
// stamp: n,
// throttle: r,
// wrapNum: o,
// falseFn: a,
// formatNum: s,
// trim: l,
// splitWords: u,
// setOptions: c,
// getParamString: h,
// template: d,
// isArray: Gt,
// indexOf: p,
// emptyImageUrl: $t,
// requestFn: Kt,
// cancelFn: Yt,
// requestAnimFrame: g,
// cancelAnimFrame: v
// });
// _.extend = function(t) {
// var i = function() {
// this.initialize && this.initialize.apply(this, arguments), this.callInitHooks()
// },
// n = i.__super__ = this.prototype,
// r = Vt(n);
// r.constructor = i, i.prototype = r;
// for (var o in this) this.hasOwnProperty(o) && "prototype" !== o && "__super__" !== o && (i[o] = this[o]);
// return t.statics && (e(i, t.statics), delete t.statics), t.includes && (y(t.includes), e.apply(null, [r].concat(t.includes)), delete t.includes), r.options && (t.options = e(Vt(r.options), t.options)), e(r, t), r._initHooks = [], r.callInitHooks = function() {
// if (!this._initHooksCalled) {
// n.callInitHooks && n.callInitHooks.call(this), this._initHooksCalled = !0;
// for (var t = 0, e = r._initHooks.length; t < e; t++) r._initHooks[t].call(this)
// }
// }, i
// }, _.include = function(t) {
// return e(this.prototype, t), this
// }, _.mergeOptions = function(t) {
// return e(this.prototype.options, t), this
// }, _.addInitHook = function(t) {
// var e = Array.prototype.slice.call(arguments, 1),
// i = "function" == typeof t ? t : function() {
// this[t].apply(this, e)
// };
// return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this
// };
// var Qt = {
// on: function(t, e, i) {
// if ("object" == typeof t) for (var n in t) this._on(n, t[n], e);
// else {
// t = u(t);
// for (var r = 0, o = t.length; r < o; r++) this._on(t[r], e, i)
// }
// return this
// },
// off: function(t, e, i) {
// if (t) if ("object" == typeof t) for (var n in t) this._off(n, t[n], e);
// else {
// t = u(t);
// for (var r = 0, o = t.length; r < o; r++) this._off(t[r], e, i)
// } else delete this._events;
// return this
// },
// _on: function(t, e, i) {
// this._events = this._events || {};
// var n = this._events[t];
// n || (n = [], this._events[t] = n), i === this && (i = void 0);
// for (var r = {
// fn: e,
// ctx: i
// }, o = n, a = 0, s = o.length; a < s; a++) if (o[a].fn === e && o[a].ctx === i) return;
// o.push(r)
// },
// _off: function(t, e, i) {
// var n, r, o;
// if (this._events && (n = this._events[t])) {
// if (!e) {
// for (r = 0, o = n.length; r < o; r++) n[r].fn = a;
// return void delete this._events[t]
// }
// if (i === this && (i = void 0), n) for (r = 0, o = n.length; r < o; r++) {
// var s = n[r];
// if (s.ctx === i && s.fn === e) return s.fn = a, this._firingCount && (this._events[t] = n = n.slice()), void n.splice(r, 1)
// }
// }
// },
// fire: function(t, i, n) {
// if (!this.listens(t, n)) return this;
// var r = e({}, i, {
// type: t,
// target: this
// });
// if (this._events) {
// var o = this._events[t];
// if (o) {
// this._firingCount = this._firingCount + 1 || 1;
// for (var a = 0, s = o.length; a < s; a++) {
// var l = o[a];
// l.fn.call(l.ctx || this, r)
// }
// this._firingCount--
// }
// }
// return n && this._propagateEvent(r), this
// },
// listens: function(t, e) {
// var i = this._events && this._events[t];
// if (i && i.length) return !0;
// if (e) for (var n in this._eventParents) if (this._eventParents[n].listens(t, e)) return !0;
// return !1
// },
// once: function(t, e, n) {
// if ("object" == typeof t) {
// for (var r in t) this.once(r, t[r], e);
// return this
// }
// var o = i(function() {
// this.off(t, e, n).off(t, o, n)
// }, this);
// return this.on(t, e, n).on(t, o, n)
// },
// addEventParent: function(t) {
// return this._eventParents = this._eventParents || {}, this._eventParents[n(t)] = t, this
// },
// removeEventParent: function(t) {
// return this._eventParents && delete this._eventParents[n(t)], this
// },
// _propagateEvent: function(t) {
// for (var i in this._eventParents) this._eventParents[i].fire(t.type, e({
// layer: t.target
// }, t), !0)
// }
// };
// Qt.addEventListener = Qt.on, Qt.removeEventListener = Qt.clearAllEventListeners = Qt.off, Qt.addOneTimeEventListener = Qt.once, Qt.fireEvent = Qt.fire, Qt.hasEventListeners = Qt.listens;
// var te = _.extend(Qt);
// b.prototype = {
// clone: function() {
// return new b(this.x, this.y)
// },
// add: function(t) {
// return this.clone()._add(w(t))
// },
// _add: function(t) {
// return this.x += t.x, this.y += t.y, this
// },
// subtract: function(t) {
// return this.clone()._subtract(w(t))
// },
// _subtract: function(t) {
// return this.x -= t.x, this.y -= t.y, this
// },
// divideBy: function(t) {
// return this.clone()._divideBy(t)
// },
// _divideBy: function(t) {
// return this.x /= t, this.y /= t, this
// },
// multiplyBy: function(t) {
// return this.clone()._multiplyBy(t)
// },
// _multiplyBy: function(t) {
// return this.x *= t, this.y *= t, this
// },
// scaleBy: function(t) {
// return new b(this.x * t.x, this.y * t.y)
// },
// unscaleBy: function(t) {
// return new b(this.x / t.x, this.y / t.y)
// },
// round: function() {
// return this.clone()._round()
// },
// _round: function() {
// return this.x = Math.round(this.x), this.y = Math.round(this.y), this
// },
// floor: function() {
// return this.clone()._floor()
// },
// _floor: function() {
// return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this
// },
// ceil: function() {
// return this.clone()._ceil()
// },
// _ceil: function() {
// return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this
// },
// distanceTo: function(t) {
// t = w(t);
// var e = t.x - this.x,
// i = t.y - this.y;
// return Math.sqrt(e * e + i * i)
// },
// equals: function(t) {
// return t = w(t), t.x === this.x && t.y === this.y
// },
// contains: function(t) {
// return t = w(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y)
// },
// toString: function() {
// return "Point(" + s(this.x) + ", " + s(this.y) + ")"
// }
// }, C.prototype = {
// extend: function(t) {
// return t = w(t), this.min || this.max ? (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(t.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(t.y, this.max.y)) : (this.min = t.clone(), this.max = t.clone()), this
// },
// getCenter: function(t) {
// return new b((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, t)
// },
// getBottomLeft: function() {
// return new b(this.min.x, this.max.y)
// },
// getTopRight: function() {
// return new b(this.max.x, this.min.y)
// },
// getTopLeft: function() {
// return this.min
// },
// getBottomRight: function() {
// return this.max
// },
// getSize: function() {
// return this.max.subtract(this.min)
// },
// contains: function(t) {
// var e, i;
// return t = "number" == typeof t[0] || t instanceof b ? w(t) : x(t), t instanceof C ? (e = t.min, i = t.max) : e = i = t, e.x >= this.min.x && i.x <= this.max.x && e.y >= this.min.y && i.y <= this.max.y
// },
// intersects: function(t) {
// t = x(t);
// var e = this.min,
// i = this.max,
// n = t.min,
// r = t.max,
// o = r.x >= e.x && n.x <= i.x,
// a = r.y >= e.y && n.y <= i.y;
// return o && a
// },
// overlaps: function(t) {
// t = x(t);
// var e = this.min,
// i = this.max,
// n = t.min,
// r = t.max,
// o = r.x > e.x && n.x < i.x,
// a = r.y > e.y && n.y < i.y;
// return o && a
// },
// isValid: function() {
// return !(!this.min || !this.max)
// }
// }, E.prototype = {
// extend: function(t) {
// var e, i, n = this._southWest,
// r = this._northEast;
// if (t instanceof P) e = t, i = t;
// else {
// if (!(t instanceof E)) return t ? this.extend(D(t) || k(t)) : this;
// if (e = t._southWest, i = t._northEast, !e || !i) return this
// }
// return n || r ? (n.lat = Math.min(e.lat, n.lat), n.lng = Math.min(e.lng, n.lng), r.lat = Math.max(i.lat, r.lat), r.lng = Math.max(i.lng, r.lng)) : (this._southWest = new P(e.lat, e.lng), this._northEast = new P(i.lat, i.lng)), this
// },
// pad: function(t) {
// var e = this._southWest,
// i = this._northEast,
// n = Math.abs(e.lat - i.lat) * t,
// r = Math.abs(e.lng - i.lng) * t;
// return new E(new P(e.lat - n, e.lng - r), new P(i.lat + n, i.lng + r))
// },
// getCenter: function() {
// return new P((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2)
// },
// getSouthWest: function() {
// return this._southWest
// },
// getNorthEast: function() {
// return this._northEast
// },
// getNorthWest: function() {
// return new P(this.getNorth(), this.getWest())
// },
// getSouthEast: function() {
// return new P(this.getSouth(), this.getEast())
// },
// getWest: function() {
// return this._southWest.lng
// },
// getSouth: function() {
// return this._southWest.lat
// },
// getEast: function() {
// return this._northEast.lng
// },
// getNorth: function() {
// return this._northEast.lat
// },
// contains: function(t) {
// t = "number" == typeof t[0] || t instanceof P || "lat" in t ? D(t) : k(t);
// var e, i, n = this._southWest,
// r = this._northEast;
// return t instanceof E ? (e = t.getSouthWest(), i = t.getNorthEast()) : e = i = t, e.lat >= n.lat && i.lat <= r.lat && e.lng >= n.lng && i.lng <= r.lng
// },
// intersects: function(t) {
// t = k(t);
// var e = this._southWest,
// i = this._northEast,
// n = t.getSouthWest(),
// r = t.getNorthEast(),
// o = r.lat >= e.lat && n.lat <= i.lat,
// a = r.lng >= e.lng && n.lng <= i.lng;
// return o && a
// },
// overlaps: function(t) {
// t = k(t);
// var e = this._southWest,
// i = this._northEast,
// n = t.getSouthWest(),
// r = t.getNorthEast(),
// o = r.lat > e.lat && n.lat < i.lat,
// a = r.lng > e.lng && n.lng < i.lng;
// return o && a
// },
// toBBoxString: function() {
// return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(",")
// },
// equals: function(t, e) {
// return !!t && (t = k(t), this._southWest.equals(t.getSouthWest(), e) && this._northEast.equals(t.getNorthEast(), e))
// },
// isValid: function() {
// return !(!this._southWest || !this._northEast)
// }
// }, P.prototype = {
// equals: function(t, e) {
// if (!t) return !1;
// t = D(t);
// var i = Math.max(Math.abs(this.lat - t.lat), Math.abs(this.lng - t.lng));
// return i <= (void 0 === e ? 1e-9 : e)
// },
// toString: function(t) {
// return "LatLng(" + s(this.lat, t) + ", " + s(this.lng, t) + ")"
// },
// distanceTo: function(t) {
// return ie.distance(this, D(t))
// },
// wrap: function() {
// return ie.wrapLatLng(this)
// },
// toBounds: function(t) {
// var e = 180 * t / 40075017,
// i = e / Math.cos(Math.PI / 180 * this.lat);
// return k([this.lat - e, this.lng - i], [this.lat + e, this.lng + i])
// },
// clone: function() {
// return new P(this.lat, this.lng, this.alt)
// }
// };
// var ee = {
// latLngToPoint: function(t, e) {
// var i = this.projection.project(t),
// n = this.scale(e);
// return this.transformation._transform(i, n)
// },
// pointToLatLng: function(t, e) {
// var i = this.scale(e),
// n = this.transformation.untransform(t, i);
// return this.projection.unproject(n)
// },
// project: function(t) {
// return this.projection.project(t)
// },
// unproject: function(t) {
// return this.projection.unproject(t)
// },
// scale: function(t) {
// return 256 * Math.pow(2, t)
// },
// zoom: function(t) {
// return Math.log(t / 256) / Math.LN2
// },
// getProjectedBounds: function(t) {
// if (this.infinite) return null;
// var e = this.projection.bounds,
// i = this.scale(t),
// n = this.transformation.transform(e.min, i),
// r = this.transformation.transform(e.max, i);
// return new C(n, r)
// },
// infinite: !1,
// wrapLatLng: function(t) {
// var e = this.wrapLng ? o(t.lng, this.wrapLng, !0) : t.lng,
// i = this.wrapLat ? o(t.lat, this.wrapLat, !0) : t.lat,
// n = t.alt;
// return new P(i, e, n)
// },
// wrapLatLngBounds: function(t) {
// var e = t.getCenter(),
// i = this.wrapLatLng(e),
// n = e.lat - i.lat,
// r = e.lng - i.lng;
// if (0 === n && 0 === r) return t;
// var o = t.getSouthWest(),
// a = t.getNorthEast(),
// s = new P(o.lat - n, o.lng - r),
// l = new P(a.lat - n, a.lng - r);
// return new E(s, l)
// }
// },
// ie = e({}, ee, {
// wrapLng: [-180, 180],
// R: 6371e3,
// distance: function(t, e) {
// var i = Math.PI / 180,
// n = t.lat * i,
// r = e.lat * i,
// o = Math.sin(n) * Math.sin(r) + Math.cos(n) * Math.cos(r) * Math.cos((e.lng - t.lng) * i);
// return this.R * Math.acos(Math.min(o, 1))
// }
// }),
// ne = {
// R: 6378137,
// MAX_LATITUDE: 85.0511287798,
// project: function(t) {
// var e = Math.PI / 180,
// i = this.MAX_LATITUDE,
// n = Math.max(Math.min(i, t.lat), -i),
// r = Math.sin(n * e);
// return new b(this.R * t.lng * e, this.R * Math.log((1 + r) / (1 - r)) / 2)
// },
// unproject: function(t) {
// var e = 180 / Math.PI;
// return new P((2 * Math.atan(Math.exp(t.y / this.R)) - Math.PI / 2) * e, t.x * e / this.R)
// },
// bounds: function() {
// var t = 6378137 * Math.PI;
// return new C([-t, -t], [t, t])
// }()
// };
// T.prototype = {
// transform: function(t, e) {
// return this._transform(t.clone(), e)
// },
// _transform: function(t, e) {
// return e = e || 1, t.x = e * (this._a * t.x + this._b), t.y = e * (this._c * t.y + this._d), t
// },
// untransform: function(t, e) {
// return e = e || 1, new b((t.x / e - this._b) / this._a, (t.y / e - this._d) / this._c)
// }
// };
// var re, oe, ae, se, le = e({}, ie, {
// code: "EPSG:3857",
// projection: ne,
// transformation: function() {
// var t = .5 / (Math.PI * ne.R);
// return S(t, .5, -t, .5)
// }()
// }),
// ue = e({}, le, {
// code: "EPSG:900913"
// }),
// ce = document.documentElement.style,
// he = "ActiveXObject" in window,
// de = he && !document.addEventListener,
// pe = "msLaunchUri" in navigator && !("documentMode" in document),
// fe = A("webkit"),
// me = A("android"),
// ge = A("android 2") || A("android 3"),
// ve = !! window.opera,
// _e = A("chrome"),
// ye = A("gecko") && !fe && !ve && !he,
// be = !_e && A("safari"),
// we = A("phantom"),
// Ce = "OTransition" in ce,
// xe = 0 === navigator.platform.indexOf("Win"),
// Ee = he && "transition" in ce,
// ke = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix && !ge,
// Le = "MozPerspective" in ce,
// Pe = !window.L_DISABLE_3D && (Ee || ke || Le) && !Ce && !we,
// De = "undefined" != typeof orientation || A("mobile"),
// Te = De && fe,
// Se = De && ke,
// Me = !window.PointerEvent && window.MSPointerEvent,
// Ae = !(!window.PointerEvent && !Me),
// Oe = !window.L_NO_TOUCH && (Ae || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch),
// Ne = De && ve,
// Ie = De && ye,
// Re = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1,
// Fe = function() {
// return !!document.createElement("canvas").getContext
// }(),
// ze = !(!document.createElementNS || !M("svg").createSVGRect),
// Be = !ze &&
// function() {
// try {
// var t = document.createElement("div");
// t.innerHTML = '';
// var e = t.firstChild;
// return e.style.behavior = "url(#default#VML)", e && "object" == typeof e.adj
// } catch (i) {
// return !1
// }
// }(), Ue = (Object.freeze || Object)({
// ie: he,
// ielt9: de,
// edge: pe,
// webkit: fe,
// android: me,
// android23: ge,
// opera: ve,
// chrome: _e,
// gecko: ye,
// safari: be,
// phantom: we,
// opera12: Ce,
// win: xe,
// ie3d: Ee,
// webkit3d: ke,
// gecko3d: Le,
// any3d: Pe,
// mobile: De,
// mobileWebkit: Te,
// mobileWebkit3d: Se,
// msPointer: Me,
// pointer: Ae,
// touch: Oe,
// mobileOpera: Ne,
// mobileGecko: Ie,
// retina: Re,
// canvas: Fe,
// svg: ze,
// vml: Be
// }), He = Me ? "MSPointerDown" : "pointerdown", qe = Me ? "MSPointerMove" : "pointermove", je = Me ? "MSPointerUp" : "pointerup", Ve = Me ? "MSPointerCancel" : "pointercancel", We = ["INPUT", "SELECT", "OPTION"], Ze = {}, Ge = !1, $e = 0, Je = Me ? "MSPointerDown" : Ae ? "pointerdown" : "touchstart", Ke = Me ? "MSPointerUp" : Ae ? "pointerup" : "touchend", Ye = "_leaflet_", Xe = "_leaflet_events", Qe = xe && _e ? 2 * window.devicePixelRatio : ye ? window.devicePixelRatio : 1, ti = {}, ei = (Object.freeze || Object)({
// on: V,
// off: W,
// stopPropagation: $,
// disableScrollPropagation: J,
// disableClickPropagation: K,
// preventDefault: Y,
// stop: X,
// getMousePosition: Q,
// getWheelDelta: tt,
// fakeStop: et,
// skipped: it,
// isExternalTarget: nt,
// addListener: V,
// removeListener: W
// }), ii = yt(["transform", "WebkitTransform", "OTransform", "MozTransform", "msTransform"]), ni = yt(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), ri = "webkitTransition" === ni || "OTransition" === ni ? ni + "End" : "transitionend";
// if ("onselectstart" in document) oe = function() {
// V(window, "selectstart", Y)
// }, ae = function() {
// W(window, "selectstart", Y)
// };
// else {
// var oi = yt(["userSelect", "WebkitUserSelect", "OUserSelect", "MozUserSelect", "msUserSelect"]);
// oe = function() {
// if (oi) {
// var t = document.documentElement.style;
// se = t[oi], t[oi] = "none"
// }
// }, ae = function() {
// oi && (document.documentElement.style[oi] = se, se = void 0)
// }
// }
// var ai, si, li, ui = (Object.freeze || Object)({
// TRANSFORM: ii,
// TRANSITION: ni,
// TRANSITION_END: ri,
// get: ot,
// getStyle: at,
// create: st,
// remove: lt,
// empty: ut,
// toFront: ct,
// toBack: ht,
// hasClass: dt,
// addClass: pt,
// removeClass: ft,
// setClass: mt,
// getClass: gt,
// setOpacity: vt,
// testProp: yt,
// setTransform: bt,
// setPosition: wt,
// getPosition: Ct,
// disableTextSelection: oe,
// enableTextSelection: ae,
// disableImageDrag: xt,
// enableImageDrag: Et,
// preventOutline: kt,
// restoreOutline: Lt
// }),
// ci = te.extend({
// run: function(t, e, i, n) {
// this.stop(), this._el = t, this._inProgress = !0, this._duration = i || .25, this._easeOutPower = 1 / Math.max(n || .5, .2), this._startPos = Ct(t), this._offset = e.subtract(this._startPos), this._startTime = +new Date, this.fire("start"), this._animate()
// },
// stop: function() {
// this._inProgress && (this._step(!0), this._complete())
// },
// _animate: function() {
// this._animId = g(this._animate, this), this._step()
// },
// _step: function(t) {
// var e = +new Date - this._startTime,
// i = 1e3 * this._duration;
// e < i ? this._runFrame(this._easeOut(e / i), t) : (this._runFrame(1), this._complete())
// },
// _runFrame: function(t, e) {
// var i = this._startPos.add(this._offset.multiplyBy(t));
// e && i._round(), wt(this._el, i), this.fire("step")
// },
// _complete: function() {
// v(this._animId), this._inProgress = !1, this.fire("end")
// },
// _easeOut: function(t) {
// return 1 - Math.pow(1 - t, this._easeOutPower)
// }
// }),
// hi = ((Object.freeze || Object)({
// simplify: Pt,
// pointToSegmentDistance: Dt,
// closestPointOnSegment: Tt,
// clipSegment: Ot,
// _getEdgeIntersection: Nt,
// _getBitCode: It,
// _sqClosestPointOnSegment: Ft,
// isFlat: zt,
// _flat: Bt
// }), (Object.freeze || Object)({
// clipPolygon: Ut
// }), {
// project: function(t) {
// return new b(t.lng, t.lat)
// },
// unproject: function(t) {
// return new P(t.y, t.x)
// },
// bounds: new C([-180, -90], [180, 90])
// }),
// di = {
// R: 6378137,
// R_MINOR: 6356752.314245179,
// bounds: new C([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),
// project: function(t) {
// var e = Math.PI / 180,
// i = this.R,
// n = t.lat * e,
// r = this.R_MINOR / i,
// o = Math.sqrt(1 - r * r),
// a = o * Math.sin(n),
// s = Math.tan(Math.PI / 4 - n / 2) / Math.pow((1 - a) / (1 + a), o / 2);
// return n = -i * Math.log(Math.max(s, 1e-10)), new b(t.lng * e * i, n)
// },
// unproject: function(t) {
// for (var e, i = 180 / Math.PI, n = this.R, r = this.R_MINOR / n, o = Math.sqrt(1 - r * r), a = Math.exp(-t.y / n), s = Math.PI / 2 - 2 * Math.atan(a), l = 0, u = .1; l < 15 && Math.abs(u) > 1e-7; l++) e = o * Math.sin(s), e = Math.pow((1 - e) / (1 + e), o / 2), u = Math.PI / 2 - 2 * Math.atan(a * e) - s, s += u;
// return new P(s * i, t.x * i / n)
// }
// },
// pi = ((Object.freeze || Object)({
// LonLat: hi,
// Mercator: di,
// SphericalMercator: ne
// }), e({}, ie, {
// code: "EPSG:3395",
// projection: di,
// transformation: function() {
// var t = .5 / (Math.PI * di.R);
// return S(t, .5, -t, .5)
// }()
// })),
// fi = e({}, ie, {
// code: "EPSG:4326",
// projection: hi,
// transformation: S(1 / 180, 1, -1 / 180, .5)
// }),
// mi = e({}, ee, {
// projection: hi,
// transformation: S(1, 0, -1, 0),
// scale: function(t) {
// return Math.pow(2, t)
// },
// zoom: function(t) {
// return Math.log(t) / Math.LN2
// },
// distance: function(t, e) {
// var i = e.lng - t.lng,
// n = e.lat - t.lat;
// return Math.sqrt(i * i + n * n)
// },
// infinite: !0
// });
// ee.Earth = ie, ee.EPSG3395 = pi, ee.EPSG3857 = le, ee.EPSG900913 = ue, ee.EPSG4326 = fi, ee.Simple = mi;
// var gi = window.L;
// window.L = t, Object.freeze = jt, t.version = qt, t.noConflict = Ht, t.Browser = Ue, t.Evented = te, t.Util = Xt, t.Class = _, t.extend = e, t.bind = i, t.stamp = n, t.setOptions = c, t.DomEvent = ei, t.DomUtil = ui, t.PosAnimation = ci, t.Point = b, t.point = w, t.Bounds = C, t.bounds = x, t.Transformation = T, t.transformation = S, t.LatLng = P, t.latLng = D, t.LatLngBounds = E, t.latLngBounds = k, t.CRS = ee
// }), function(t, e) {
// "object" == typeof exports && "undefined" != typeof module ? e(exports, require("leaflet")) : "function" == typeof define && define.amd ? define(["exports", "leaflet"], e) : e((t.L = t.L || {}, t.L.esri = t.L.esri || {}), t.L)
// }(this, function(t, e) {
// "use strict";
// function i(t) {
// var e = "";
// t.f = t.f || "json";
// for (var i in t) if (t.hasOwnProperty(i)) {
// var n, r = t[i],
// o = Object.prototype.toString.call(r);
// e.length && (e += "&"), n = "[object Array]" === o ? "[object Object]" === Object.prototype.toString.call(r[0]) ? JSON.stringify(r) : r.join(",") : "[object Object]" === o ? JSON.stringify(r) : "[object Date]" === o ? r.valueOf() : r, e += encodeURIComponent(i) + "=" + encodeURIComponent(n)
// }
// return e
// }
// function n(t, i) {
// var n = new window.XMLHttpRequest;
// return n.onerror = function(r) {
// n.onreadystatechange = e.Util.falseFn, t.call(i, {
// error: {
// code: 500,
// message: "XMLHttpRequest error"
// }
// }, null)
// }, n.onreadystatechange = function() {
// var r, o;
// if (4 === n.readyState) {
// try {
// r = JSON.parse(n.responseText)
// } catch (a) {
// r = null, o = {
// code: 500,
// message: "Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."
// }
// }!o && r.error && (o = r.error, r = null), n.onerror = e.Util.falseFn, t.call(i, o, r)
// }
// }, n.ontimeout = function() {
// this.onerror()
// }, n
// }
// function r(t, e, r, o) {
// var a = n(r, o);
// return a.open("POST", t), "undefined" != typeof o && null !== o && "undefined" != typeof o.options && (a.timeout = o.options.timeout), a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), a.send(i(e)), a
// }
// function o(t, e, r, o) {
// var a = n(r, o);
// return a.open("GET", t + "?" + i(e), !0), "undefined" != typeof o && null !== o && "undefined" != typeof o.options && (a.timeout = o.options.timeout), a.send(null), a
// }
// function a(t, e, r, o) {
// var a = i(e),
// l = n(r, o),
// u = (t + "?" + a).length;
// if (u <= 2e3 && q.cors ? l.open("GET", t + "?" + a) : u > 2e3 && q.cors && (l.open("POST", t), l.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")), "undefined" != typeof o && null !== o && "undefined" != typeof o.options && (l.timeout = o.options.timeout), u <= 2e3 && q.cors) l.send(null);
// else {
// if (!(u > 2e3 && q.cors)) return u <= 2e3 && !q.cors ? s(t, e, r, o) : void S("a request to " + t + " was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html");
// l.send(a)
// }
// return l
// }
// function s(t, n, r, o) {
// window._EsriLeafletCallbacks = window._EsriLeafletCallbacks || {};
// var a = "c" + V;
// n.callback = "window._EsriLeafletCallbacks." + a, window._EsriLeafletCallbacks[a] = function(t) {
// if (window._EsriLeafletCallbacks[a] !== !0) {
// var e, i = Object.prototype.toString.call(t);
// "[object Object]" !== i && "[object Array]" !== i && (e = {
// error: {
// code: 500,
// message: "Expected array or object as JSONP response"
// }
// }, t = null), !e && t.error && (e = t, t = null), r.call(o, e, t), window._EsriLeafletCallbacks[a] = !0
// }
// };
// var s = e.DomUtil.create("script", null, document.body);
// return s.type = "text/javascript", s.src = t + "?" + i(n), s.id = a, V++, {
// id: a,
// url: s.src,
// abort: function() {
// window._EsriLeafletCallbacks._callback[a]({
// code: 0,
// message: "Request aborted."
// })
// }
// }
// }
// function l(t, e) {
// for (var i = 0; i < t.length; i++) if (t[i] !== e[i]) return !1;
// return !0
// }
// function u(t) {
// return l(t[0], t[t.length - 1]) || t.push(t[0]), t
// }
// function c(t) {
// var e, i = 0,
// n = 0,
// r = t.length,
// o = t[n];
// for (n; n < r - 1; n++) e = t[n + 1], i += (e[0] - o[0]) * (e[1] + o[1]), o = e;
// return i >= 0
// }
// function h(t, e, i, n) {
// var r = (n[0] - i[0]) * (t[1] - i[1]) - (n[1] - i[1]) * (t[0] - i[0]),
// o = (e[0] - t[0]) * (t[1] - i[1]) - (e[1] - t[1]) * (t[0] - i[0]),
// a = (n[1] - i[1]) * (e[0] - t[0]) - (n[0] - i[0]) * (e[1] - t[1]);
// if (0 !== a) {
// var s = r / a,
// l = o / a;
// if (s >= 0 && s <= 1 && l >= 0 && l <= 1) return !0
// }
// return !1
// }
// function d(t, e) {
// for (var i = 0; i < t.length - 1; i++) for (var n = 0; n < e.length - 1; n++) if (h(t[i], t[i + 1], e[n], e[n + 1])) return !0;
// return !1
// }
// function p(t, e) {
// for (var i = !1, n = -1, r = t.length, o = r - 1; ++n < r; o = n)(t[n][1] <= e[1] && e[1] < t[o][1] || t[o][1] <= e[1] && e[1] < t[n][1]) && e[0] < (t[o][0] - t[n][0]) * (e[1] - t[n][1]) / (t[o][1] - t[n][1]) + t[n][0] && (i = !i);
// return i
// }
// function f(t, e) {
// var i = d(t, e),
// n = p(t, e[0]);
// return !(i || !n)
// }
// function m(t) {
// for (var e, i, n, r = [], o = [], a = 0; a < t.length; a++) {
// var s = u(t[a].slice(0));
// if (!(s.length < 4)) if (c(s)) {
// var l = [s];
// r.push(l)
// } else o.push(s)
// }
// for (var h = []; o.length;) {
// n = o.pop();
// var p = !1;
// for (e = r.length - 1; e >= 0; e--) if (i = r[e][0], f(i, n)) {
// r[e].push(n), p = !0;
// break
// }
// p || h.push(n)
// }
// for (; h.length;) {
// n = h.pop();
// var m = !1;
// for (e = r.length - 1; e >= 0; e--) if (i = r[e][0], d(i, n)) {
// r[e].push(n), m = !0;
// break
// }
// m || r.push([n.reverse()])
// }
// return 1 === r.length ? {
// type: "Polygon",
// coordinates: r[0]
// } : {
// type: "MultiPolygon",
// coordinates: r
// }
// }
// function g(t) {
// var e = [],
// i = t.slice(0),
// n = u(i.shift().slice(0));
// if (n.length >= 4) {
// c(n) || n.reverse(), e.push(n);
// for (var r = 0; r < i.length; r++) {
// var o = u(i[r].slice(0));
// o.length >= 4 && (c(o) && o.reverse(), e.push(o))
// }
// }
// return e
// }
// function v(t) {
// for (var e = [], i = 0; i < t.length; i++) for (var n = g(t[i]), r = n.length - 1; r >= 0; r--) {
// var o = n[r].slice(0);
// e.push(o)
// }
// return e
// }
// function _(t) {
// var e = {};
// for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
// return e
// }
// function y(t, e) {
// var i = {};
// return "number" == typeof t.x && "number" == typeof t.y && (i.type = "Point", i.coordinates = [t.x, t.y]), t.points && (i.type = "MultiPoint", i.coordinates = t.points.slice(0)), t.paths && (1 === t.paths.length ? (i.type = "LineString", i.coordinates = t.paths[0].slice(0)) : (i.type = "MultiLineString", i.coordinates = t.paths.slice(0))), t.rings && (i = m(t.rings.slice(0))), (t.geometry || t.attributes) && (i.type = "Feature", i.geometry = t.geometry ? y(t.geometry) : null, i.properties = t.attributes ? _(t.attributes) : null, t.attributes && (i.id = t.attributes[e] || t.attributes.OBJECTID || t.attributes.FID)), i
// }
// function b(t, e) {
// e = e || "OBJECTID";
// var i, n = {
// wkid: 4326
// },
// r = {};
// switch (t.type) {
// case "Point":
// r.x = t.coordinates[0], r.y = t.coordinates[1], r.spatialReference = n;
// break;
// case "MultiPoint":
// r.points = t.coordinates.slice(0), r.spatialReference = n;
// break;
// case "LineString":
// r.paths = [t.coordinates.slice(0)], r.spatialReference = n;
// break;
// case "MultiLineString":
// r.paths = t.coordinates.slice(0), r.spatialReference = n;
// break;
// case "Polygon":
// r.rings = g(t.coordinates.slice(0)), r.spatialReference = n;
// break;
// case "MultiPolygon":
// r.rings = v(t.coordinates.slice(0)), r.spatialReference = n;
// break;
// case "Feature":
// t.geometry && (r.geometry = b(t.geometry, e)), r.attributes = t.properties ? _(t.properties) : {}, t.id && (r.attributes[e] = t.id);
// break;
// case "FeatureCollection":
// for (r = [], i = 0; i < t.features.length; i++) r.push(b(t.features[i], e));
// break;
// case "GeometryCollection":
// for (r = [], i = 0; i < t.geometries.length; i++) r.push(b(t.geometries[i], e))
// }
// return r
// }
// function w(t, e) {
// return b(t, e)
// }
// function C(t, e) {
// return y(t, e)
// }
// function x(t) {
// var e = {};
// for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
// return e
// }
// function E(t) {
// if ("NaN" !== t.xmin && "NaN" !== t.ymin && "NaN" !== t.xmax && "NaN" !== t.ymax) {
// var i = e.latLng(t.ymin, t.xmin),
// n = e.latLng(t.ymax, t.xmax);
// return e.latLngBounds(i, n)
// }
// return null
// }
// function k(t) {
// return t = e.latLngBounds(t), {
// xmin: t.getSouthWest().lng,
// ymin: t.getSouthWest().lat,
// xmax: t.getNorthEast().lng,
// ymax: t.getNorthEast().lat,
// spatialReference: {
// wkid: 4326
// }
// }
// }
// function L(t, e) {
// var i, n = t.features || t.results,
// r = n.length;
// if (e) i = e;
// else if (t.objectIdFieldName) i = t.objectIdFieldName;
// else if (t.fields) {
// for (var o = 0; o <= t.fields.length - 1; o++) if ("esriFieldTypeOID" === t.fields[o].type) {
// i = t.fields[o].name;
// break
// }
// } else if (r) for (var a in n[0].attributes) if (a.match(/^(OBJECTID|FID|OID|ID)$/i)) {
// i = a;
// break
// }
// var s = {
// type: "FeatureCollection",
// features: []
// };
// if (r) for (var l = n.length - 1; l >= 0; l--) {
// var u = C(n[l], i);
// s.features.push(u)
// }
// return s
// }
// function P(t) {
// return t = e.Util.trim(t), "/" !== t[t.length - 1] && (t += "/"), t
// }
// function D(t) {
// return /^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i.test(t)
// }
// function T(t) {
// var e;
// switch (t) {
// case "Point":
// e = "esriGeometryPoint";
// break;
// case "MultiPoint":
// e = "esriGeometryMultipoint";
// break;
// case "LineString":
// e = "esriGeometryPolyline";
// break;
// case "MultiLineString":
// e = "esriGeometryPolyline";
// break;
// case "Polygon":
// e = "esriGeometryPolygon";
// break;
// case "MultiPolygon":
// e = "esriGeometryPolygon"
// }
// return e
// }
// function S() {
// console && console.warn && console.warn.apply(console, arguments)
// }
// function M(t) {
// return t.getSize().x - j.attributionWidthOffset + "px"
// }
// function A(t) {
// if (t.attributionControl && !t.attributionControl._esriAttributionAdded) {
// t.attributionControl.setPrefix('Leaflet | Powered by Esri');
// var i = document.createElement("style");
// i.type = "text/css", i.innerHTML = ".esri-truncated-attribution:hover {white-space: normal;}", document.getElementsByTagName("head")[0].appendChild(i), e.DomUtil.addClass(t.attributionControl._container, "esri-truncated-attribution:hover");
// var n = document.createElement("style");
// n.type = "text/css", n.innerHTML = ".esri-truncated-attribution {vertical-align: -3px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;transition: 0s white-space;transition-delay: 1s;max-width: " + M(t) + ";}", document.getElementsByTagName("head")[0].appendChild(n), e.DomUtil.addClass(t.attributionControl._container, "esri-truncated-attribution"), t.on("resize", function(e) {
// t.attributionControl._container.style.maxWidth = M(e.target)
// }), t.attributionControl._esriAttributionAdded = !0
// }
// }
// function O(t, i) {
// s(t, {}, e.Util.bind(function(t, n) {
// if (!t) {
// i._esriAttributions = [];
// for (var r = 0; r < n.contributors.length; r++) for (var o = n.contributors[r], a = 0; a < o.coverageAreas.length; a++) {
// var s = o.coverageAreas[a],
// l = e.latLng(s.bbox[0], s.bbox[1]),
// u = e.latLng(s.bbox[2], s.bbox[3]);
// i._esriAttributions.push({
// attribution: o.attribution,
// score: s.score,
// bounds: e.latLngBounds(l, u),
// minZoom: s.zoomMin,
// maxZoom: s.zoomMax
// })
// }
// i._esriAttributions.sort(function(t, e) {
// return e.score - t.score
// });
// var c = {
// target: i
// };
// N(c)
// }
// }, this))
// }
// function N(t) {
// var i = t.target,
// n = i._esriAttributions;
// if (i && i.attributionControl && n) {
// for (var r = "", o = i.getBounds(), a = e.latLngBounds(o.getSouthWest().wrap(), o.getNorthEast().wrap()), s = i.getZoom(), l = 0; l < n.length; l++) {
// var u = n[l],
// c = u.attribution;
// !r.match(c) && u.bounds.intersects(a) && s >= u.minZoom && s <= u.maxZoom && (r += ", " + c)
// }
// r = r.substr(2);
// var h = i.attributionControl._container.querySelector(".esri-dynamic-attribution");
// h.innerHTML = r, h.style.maxWidth = M(i), i.fire("attributionupdated", {
// attribution: r
// })
// }
// }
// function I(t) {
// return new $(t)
// }
// function R(t) {
// return new J(t)
// }
// function F(t) {
// return new K(t)
// }
// function z(t) {
// return new Y(t)
// }
// var B = ("default" in e ? e["default"] : e, "2.0.8"),
// U = window.XMLHttpRequest && "withCredentials" in new window.XMLHttpRequest,
// H = "" === document.documentElement.style.pointerEvents,
// q = {
// cors: U,
// pointerEvents: H
// },
// j = {
// attributionWidthOffset: 55
// },
// V = 0,
// W = q.cors ? o : s;
// W.CORS = o, W.JSONP = s;
// var Z = {
// request: a,
// get: W,
// post: r
// },
// G = {
// shallowClone: x,
// warn: S,
// cleanUrl: P,
// isArcgisOnline: D,
// geojsonTypeToArcGIS: T,
// responseToFeatureCollection: L,
// geojsonToArcGIS: w,
// arcgisToGeoJSON: C,
// boundsToExtent: k,
// extentToBounds: E,
// calcAttributionWidth: M,
// setEsriAttribution: A,
// _getAttributionData: O,
// _updateMapAttribution: N
// },
// $ = e.Class.extend({
// options: {
// proxy: !1,
// useCors: U
// },
// generateSetter: function(t, i) {
// return e.Util.bind(function(e) {
// return this.params[t] = e, this
// }, i)
// },
// initialize: function(t) {
// if (t.request && t.options ? (this._service = t, e.Util.setOptions(this, t.options)) : (e.Util.setOptions(this, t), this.options.url = P(t.url)), this.params = e.Util.extend({}, this.params || {}), this.setters) for (var i in this.setters) {
// var n = this.setters[i];
// this[i] = this.generateSetter(n, this)
// }
// },
// token: function(t) {
// return this._service ? this._service.authenticate(t) : this.params.token = t, this
// },
// request: function(t, e) {
// return this._service ? this._service.request(this.path, this.params, t, e) : this._request("request", this.path, this.params, t, e)
// },
// _request: function(t, e, i, n, r) {
// var o = this.options.proxy ? this.options.proxy + "?" + this.options.url + e : this.options.url + e;
// return "get" !== t && "request" !== t || this.options.useCors ? Z[t](o, i, n, r) : Z.get.JSONP(o, i, n, r)
// }
// }),
// J = $.extend({
// setters: {
// offset: "resultOffset",
// limit: "resultRecordCount",
// fields: "outFields",
// precision: "geometryPrecision",
// featureIds: "objectIds",
// returnGeometry: "returnGeometry",
// token: "token"
// },
// path: "query",
// params: {
// returnGeometry: !0,
// where: "1=1",
// outSr: 4326,
// outFields: "*"
// },
// within: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelContains", this
// },
// intersects: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelIntersects", this
// },
// contains: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelWithin", this
// },
// crosses: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelCrosses", this
// },
// touches: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelTouches", this
// },
// overlaps: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelOverlaps", this
// },
// bboxIntersects: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelEnvelopeIntersects", this
// },
// indexIntersects: function(t) {
// return this._setGeometry(t), this.params.spatialRel = "esriSpatialRelIndexIntersects", this
// },
// nearby: function(t, i) {
// return t = e.latLng(t), this.params.geometry = [t.lng, t.lat], this.params.geometryType = "esriGeometryPoint", this.params.spatialRel = "esriSpatialRelIntersects", this.params.units = "esriSRUnit_Meter", this.params.distance = i, this.params.inSr = 4326, this
// },
// where: function(t) {
// return this.params.where = t, this
// },
// between: function(t, e) {
// return this.params.time = [t.valueOf(), e.valueOf()], this
// },
// simplify: function(t, e) {
// var i = Math.abs(t.getBounds().getWest() - t.getBounds().getEast());
// return this.params.maxAllowableOffset = i / t.getSize().y * e, this
// },
// orderBy: function(t, e) {
// return e = e || "ASC", this.params.orderByFields = this.params.orderByFields ? this.params.orderByFields + "," : "", this.params.orderByFields += [t, e].join(" "), this
// },
// run: function(t, e) {
// return this._cleanParams(), this.options.isModern || D(this.options.url) ? (this.params.f = "geojson", this.request(function(i, n) {
// this._trapSQLerrors(i), t.call(e, i, n, n)
// }, this)) : this.request(function(i, n) {
// this._trapSQLerrors(i), t.call(e, i, n && L(n), n)
// }, this)
// },
// count: function(t, e) {
// return this._cleanParams(), this.params.returnCountOnly = !0, this.request(function(e, i) {
// t.call(this, e, i && i.count, i)
// }, e)
// },
// ids: function(t, e) {
// return this._cleanParams(), this.params.returnIdsOnly = !0, this.request(function(e, i) {
// t.call(this, e, i && i.objectIds, i)
// }, e)
// },
// bounds: function(t, e) {
// return this._cleanParams(), this.params.returnExtentOnly = !0, this.request(function(i, n) {
// n && n.extent && E(n.extent) ? t.call(e, i, E(n.extent), n) : (i = {
// message: "Invalid Bounds"
// }, t.call(e, i, null, n))
// }, e)
// },
// pixelSize: function(t) {
// var i = e.point(t);
// return this.params.pixelSize = [i.x, i.y], this
// },
// layer: function(t) {
// return this.path = t + "/query", this
// },
// _trapSQLerrors: function(t) {
// t && "400" === t.code && S("one common syntax error in query requests is encasing string values in double quotes instead of single quotes")
// },
// _cleanParams: function() {
// delete this.params.returnIdsOnly, delete this.params.returnExtentOnly, delete this.params.returnCountOnly
// },
// _setGeometry: function(t) {
// return this.params.inSr = 4326, t instanceof e.LatLngBounds ? (this.params.geometry = k(t), void(this.params.geometryType = "esriGeometryEnvelope")) : (t.getLatLng && (t = t.getLatLng()), t instanceof e.LatLng && (t = {
// type: "Point",
// coordinates: [t.lng, t.lat]
// }), t instanceof e.GeoJSON && (t = t.getLayers()[0].feature.geometry, this.params.geometry = w(t), this.params.geometryType = T(t.type)), t.toGeoJSON && (t = t.toGeoJSON()), "Feature" === t.type && (t = t.geometry), "Point" === t.type || "LineString" === t.type || "Polygon" === t.type || "MultiPolygon" === t.type ? (this.params.geometry = w(t), void(this.params.geometryType = T(t.type))) : void S("invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object"))
// }
// }),
// K = $.extend({
// setters: {
// contains: "contains",
// text: "searchText",
// fields: "searchFields",
// spatialReference: "sr",
// sr: "sr",
// layers: "layers",
// returnGeometry: "returnGeometry",
// maxAllowableOffset: "maxAllowableOffset",
// precision: "geometryPrecision",
// dynamicLayers: "dynamicLayers",
// returnZ: "returnZ",
// returnM: "returnM",
// gdbVersion: "gdbVersion",
// token: "token"
// },
// path: "find",
// params: {
// sr: 4326,
// contains: !0,
// returnGeometry: !0,
// returnZ: !0,
// returnM: !1
// },
// layerDefs: function(t, e) {
// return this.params.layerDefs = this.params.layerDefs ? this.params.layerDefs + ";" : "", this.params.layerDefs += [t, e].join(":"), this
// },
// simplify: function(t, e) {
// var i = Math.abs(t.getBounds().getWest() - t.getBounds().getEast());
// return this.params.maxAllowableOffset = i / t.getSize().y * e, this
// },
// run: function(t, e) {
// return this.request(function(i, n) {
// t.call(e, i, n && L(n), n)
// }, e)
// }
// }),
// Y = $.extend({
// path: "identify",
// between: function(t, e) {
// return this.params.time = [t.valueOf(), e.valueOf()], this
// }
// });
// t.VERSION = B, t.Support = q, t.options = j, t.Util = G, t.get = W, t.post = r, t.request = a, t.Task = $, t.task = I, t.Query = J, t.query = R, t.Find = K, t.find = F, t.Identify = Y, t.identify = z
// });
// var mars3d = {
// version: "1.1",
// name: "Cesium三维地图框架",
// author: "木遥(QQ:346819890)"
// },
// scope = "undefined" != typeof window ? window : "undefined" != typeof self ? self : {};
// scope.mars3d = mars3d, function(t, e) {
// "use strict";
// function i(t) {
// return "complete" === t.readyState || "loaded" === t.readyState
// }
// function n(t, i, n) {
// var r = e.createElement("link");
// r.rel = "stylesheet", a(r, n, "css"), r.async = !0, r.href = t, h.appendChild(r)
// }
// function r(t, i, n) {
// var r = e.createElement("script");
// r.charset = "utf-8", a(r, n, "js"), r.async = !i.sync, r.src = t, h.appendChild(r)
// }
// function o(t, e) {
// var i;
// t.sheet && (i = !0), setTimeout(function() {
// i ? e() : o(t, e)
// }, 20)
// }
// function a(t, e, n) {
// function r() {
// t.onload = t.onreadystatechange = null, t = null, e()
// }
// var a = "onload" in t,
// s = "css" === n;
// return !s || !d && a ? void(a ? (t.onload = r, t.onerror = function() {
// t.onerror = null, "css" == n ? console.error("该css文件不存在:" + t.href) : console.error("该js文件不存在:" + t.src), r()
// }) : t.onreadystatechange = function() {
// i(t) && r()
// }) : void setTimeout(function() {
// o(t, e)
// }, 1)
// }
// function s(t, e, i, o) {
// function a() {
// var i = e.indexOf(t);
// i > -1 && e.splice(i, 1), 0 === e.length && o()
// }
// return t ? void(c.test(t) ? n(t, i, a) : r(t, i, a)) : void setTimeout(function() {
// a()
// })
// }
// function l(t, e, i) {
// var n = function() {
// i && i()
// };
// if (t = Array.prototype.slice.call(t || []), 0 === t.length) return void n();
// for (var r = 0, o = t.length; r < o; r++) s(t[r], t, e, n)
// }
// function u(e, n) {
// if (i(e)) n();
// else {
// var r = 1500,
// o = !1;
// t.addEventListener("load", function() {
// o || (n(), o = !0)
// }), setTimeout(function() {
// o || (n(), o = !0)
// }, r)
// }
// }
// var c = new RegExp("\\.css"),
// h = e.head || e.getElementsByTagName("head")[0],
// d = +navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i, "$1") < 536,
// p = {
// async: function(t, i) {
// u(e, function() {
// l(t, {}, i)
// })
// },
// sync: function(t, i) {
// u(e, function() {
// l(t, {
// sync: !0
// }, i)
// })
// }
// };
// return t.Loader = p, p
// }(window, document), mars3d.widget = function() {
// function t(t, e, i) {
// y = t, e = e || {}, x = i || "", C = [], _ = e.defaultOptions || {
// windowOptions: {
// position: "rt",
// maxmin: !1,
// resize: !0
// },
// autoDisable: !0,
// disableOhter: !0
// }, v = e.version, "time" == v && (v = (new Date).getTime());
// var r = e.widgetsAtStart;
// if (r && r.length > 0) for (var o = 0; o < r.length; o++) {
// var a = r[o];
// a.hasOwnProperty("uri") && "" != a.uri ? a.hasOwnProperty("visible") && !a.visible || (a.autoDisable = !1, a.openAtStart = !0, a._nodebug = !0, n(a), C.push(a)) : console.log("widget未配置uri:" + JSON.stringify(a))
// }
// // var s = e["debugger"];
// if (s) {
// var l = '
widget测试栏
';
// $("body").append(l)
// }
// if (r = e.widgets, r && r.length > 0) for (var o = 0; o < r.length; o++) {
// var a = r[o];
// if ("group" == a.type) {
// for (var l = '
', u = 0; u < a.children.length; u++) {
// var h = a.children[u];
// n(h), l += "
', $("#pupup-all-view").append(r);
// var a = n(i, e, t.popup);
// return a ? void 0 : void o(i)
// }
// }
// function n(t, e, i) {
// var n = Cesium.SceneTransforms.wgs84ToWindowCoordinates(s.scene, e);
// if (null == n) return !1;
// var r = $("#" + t),
// o = n.x - r.width() / 2,
// a = n.y - r.height();
// return i && "object" == typeof i && i.anchor && (o += i.anchor[0], a += i.anchor[1]), r.css("transform", "translate3d(" + o + "px," + a + "px, 0)"), !0
// }
// function r() {
// for (var t in l) {
// var e = l[t];
// n(t, e.cartesian, e.popup)
// }
// }
// function o(t) {
// !u && t ? ($("#" + t).remove(), delete l[t]) : ($("#pupup-all-view").empty(), l = {})
// }
// function a(t) {
// u = t
// }
// var s, l = {},
// u = !0;
// return {
// isOnly: a,
// init: t,
// show: i,
// hide: o,
// close: o
// }
// }(), mars3d.tooltip = function() {
// function t(t) {
// r = t;
// var i = '
';
// $("#" + r._container.id).append(i);
// var n = new Cesium.ScreenSpaceEventHandler(r.scene.canvas);
// n.setInputAction(e, Cesium.ScreenSpaceEventType.MOUSE_MOVE)
// }
// function e(t) {
// var e = t.endPosition,
// a = r.scene.pick(e);
// if (a && Cesium.defined(a.id)) {
// var s = a.id;
// if (!s.tooltip) return void n();
// if (s.billboard || s.label || s.point) {
// if (o == s) return;
// o = s
// }
// var l = mars3d.latlng.getCurrentMousePosition(r.scene, e);
// i(s, l, e)
// } else n()
// }
// function i(t, e, i) {
// if (null != t && null != t.tooltip) {
// if (null == i && (i = Cesium.SceneTransforms.wgs84ToWindowCoordinates(r.scene, e)), null == i) return void n();
// var o, a = $("#tooltip-view");
// o = "object" == typeof t.tooltip ? t.tooltip.html : t.tooltip, $("#tooltip-content").html(o), a.show();
// var s = i.x - a.width() / 2,
// l = i.y - a.height(),
// u = t.tooltip;
// u && "object" == typeof u && u.anchor && (s += u.anchor[0], l += u.anchor[1]), a.css("transform", "translate3d(" + s + "px," + l + "px, 0)")
// }
// }
// function n() {
// $("#tooltip-content").empty(), $("#tooltip-view").hide(), o = null
// }
// var r, o;
// return {
// init: t,
// show: i,
// hide: n,
// close: n
// }
// }(), mars3d.geocoder = function() {
// function t(t, i) {
// o = t, l = i.citycode || "", $(".cesium-geocoder-input").attr("placeholder", "输入地名、坐标后按回车键查询"), a = o.geocoder.viewModel, a._searchCommand = Cesium.createCommand(function() {
// n(), a.isSearchInProgress ? e() : r()
// })
// }
// function e() {
// a._isSearchInProgress = !1, Cesium.defined(a._geocodeInProgress) && (a._geocodeInProgress.cancel = !0, a._geocodeInProgress = void 0)
// }
// function i(t) {
// a._scene.camera.flyTo({
// destination: t,
// complete: function() {
// a._complete.raiseEvent()
// },
// duration: a._flightDuration,
// endTransform: Cesium.Matrix4.IDENTITY
// })
// }
// function n() {
// if (Cesium.defined(a.entities)) for (var t = 0; t < a.entities.length; t++) o.entities.remove(a.entities[t]);
// a.entities = []
// }
// function r() {
// var t = a.searchText;
// if (!/^\s*$/.test(t)) {
// var e = t.match(/[^\s,\n]+/g);
// if (2 === e.length || 3 === e.length) {
// var r = +e[0],
// s = +e[1],
// u = 3 === e.length ? +e[2] : 300;
// if (!isNaN(r) && !isNaN(s) && !isNaN(u)) return void i(Cesium.Cartesian3.fromDegrees(r, s, u))
// }
// a._isSearchInProgress = !0;
// var c = "http://restapi.amap.com/v3/place/text?city=" + l + "&citylimit=true&key=57f8ebe12797a73fc5b87f5d4ef859b1&keywords=" + t,
// h = Cesium.loadJson(c),
// d = a._geocodeInProgress = Cesium.when(h, function(e) {
// if (n(), a._searchText = t, !d.cancel) {
// if (a._isSearchInProgress = !1, 0 == e.status) return void alert("请求失败(" + e.infocode + "):" + e.info);
// if (0 === e.pois.length) return void alert("未查询到相关数据!");
// for (var i, r = 0; r < e.pois.length; r++) {
// var s = e.pois[r],
// l = "
名称:" + s.name + "
地址:" + s.address + "
区域:" + s.pname + s.cityname + s.adname + "
类别:" + s.type + "
";
// i = s.location.split(","), i = pointconvert.gcj2wgs(i);
// var u = mars3d.map.point2map({
// x: i[0],
// y: i[1]
// }),
// c = o.entities.add({
// id: r + "." + s.name,
// position: Cesium.Cartesian3.fromDegrees(u.x, u.y),
// point: {
// color: new Cesium.Color.fromCssColorString("#3388ff"),
// pixelSize: 10,
// outlineColor: new Cesium.Color.fromCssColorString("#ffffff"),
// outlineWidth: 2,
// heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND
// },
// label: {
// text: s.name,
// font: "16px Helvetica",
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 2,
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// pixelOffset: new Cesium.Cartesian2(0, (-10)),
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
// },
// data: s,
// tooltip: {
// html: l,
// anchor: [0, -20]
// }
// });
// a.entities.push(c)
// }
// o.flyTo(a.entities, {
// duration: 3
// })
// }
// }, function() {
// return d.cancel ? void n() : (a._isSearchInProgress = !1, void(a.searchText = a._searchText + " (error)"))
// })
// }
// }
// var o, a, s = "cesium地图 查询POI工具栏",
// l = "";
// return {
// name: s,
// init: t
// }
// }(), mars3d.map = function() {
// function t() {
// return b
// }
// function e(t, e, i) {
// w = t, C = e;
// var r = {
// animation: !1,
// timeline: !1,
// fullscreenButton: !0,
// vrButton: !1,
// geocoder: !1,
// sceneModePicker: !1,
// homeButton: !0,
// navigationHelpButton: !0,
// navigationInstructionsInitiallyVisible: !1,
// infoBox: !0,
// selectionIndicator: !1,
// baseLayerPicker: !1
// };
// null == i && (i = {});
// for (var o in r) i.hasOwnProperty(o) || (i[o] = r[o]);
// Cesium.BingMapsApi.defaultKey = "AtkX3zhnRe5fyGuLU30uZw8r3sxdBDnpQly7KfFTCB2rGlDgXBG3yr-qEiQEicEc", C.crs = C.crs || "3857", x = C.crs;
// var a = !1,
// l = C.controls;
// if (l) for (var o = 0; o < l.length; o++) {
// var u = l[o];
// if (!u.hasOwnProperty("visible") || u.visible) switch (u.type) {
// case "geocoder":
// i.geocoder = !0;
// break;
// case "mousezoom":
// a = !0
// }
// }
// C.terrain && C.terrain.visible && (i.terrainProvider = n()), null == i.imageryProvider && (i.imageryProvider = Cesium.createTileMapServiceImageryProvider({
// url: Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII")
// })), b = new Cesium.Viewer(t, i), b.cesiumWidget.creditContainer.style.display = "none";
// var f = C.basemaps;
// if (f && f.length > 0) {
// for (var m = b.imageryLayers, g = m.length, o = 0; o < g; o++) {
// var v = m.get(0);
// m.remove(v, !0)
// }
// for (var o = 0; o < f.length; o++) {
// var u = f[o];
// u.visible && u.crs && (x = u.crs), mars3d.layer.createLayer(u, b, e.serverURL, i.layerToMap)
// }
// }
// b.homeButton && b.homeButton.viewModel.command.beforeExecute.addEventListener(function(t) {
// s(), t.cancel = !0
// }), s(null, {
// duration: 0
// });
// var _;
// b.scene.morphStart.addEventListener(function(t) {
// _ = mars3d.latlng.getCameraView(b)
// }), b.scene.morphComplete.addEventListener(function(t) {
// setTimeout(function() {
// s(_)
// }, 100)
// });
// var f = C.operationallayers;
// if (f && f.length > 0) for (var o = 0; o < f.length; o++) {
// var u = f[o];
// mars3d.layer.createLayer(u, b, e.serverURL, i.layerToMap)
// }
// var l = C.controls;
// if (l) for (var o = 0; o < l.length; o++) {
// var u = l[o];
// if (!u.hasOwnProperty("visible") || u.visible) switch (u.type) {
// case "location":
// c(u);
// break;
// case "navigation":
// d(u);
// break;
// case "geocoder":
// mars3d.geocoder.init(b, u);
// break;
// case "msgbar":
// h(u)
// }
// }
// mars3d.popup.init(b), mars3d.tooltip.init(b);
// var y = b.scene;
// if (y.globe.baseColor = Cesium.Color.SILVER, C.style && (y.globe.depthTestAgainstTerrain = C.style.testTerrain, y.globe.enableLighting = C.style.lighting, y.skyAtmosphere && (y.skyAtmosphere.show = C.style.atmosphere), y.fog && (y.fog.enabled = C.style.fog)), y.screenSpaceCameraController.maximumZoomDistance = C.maxzoom || 2e7, y.screenSpaceCameraController.minimumZoomDistance = C.minzoom || 1, a && p()) {
// $("#" + w).append('
');
// var E = new Cesium.ScreenSpaceEventHandler(y.canvas);
// E.setInputAction(function(t) {
// $(".cesium-mousezoom").addClass("cesium-mousezoom-visible"), setTimeout(function() {
// $(".cesium-mousezoom").removeClass("cesium-mousezoom-visible")
// }, 200)
// }, Cesium.ScreenSpaceEventType.WHEEL), E.setInputAction(function(t) {
// $(".cesium-mousezoom").css({
// top: t.endPosition.y + "px",
// left: t.endPosition.x + "px"
// })
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE)
// }
// if (b.navigationHelpButton) {
// var k = $(".cesium-click-navigation-help .cesium-navigation-help-pan");
// k.html("平移视图"), k.next().html("左键点击+拖动");
// var L = $(".cesium-click-navigation-help .cesium-navigation-help-zoom");
// L.html("缩放视图"), L.next().html("右键点击+拖动,"), L.next().next().html("或鼠标滚轮缩放");
// var P = $(".cesium-click-navigation-help .cesium-navigation-help-rotate");
// P.html("旋转视图"), P.next().html("中键点击+拖动,"), P.next().next().html("或按Ctrl键+左右键点击+拖动");
// var k = $(".cesium-touch-navigation-help .cesium-navigation-help-pan");
// k.html("平移视图"), k.next().html("一个手指拖动");
// var L = $(".cesium-touch-navigation-help .cesium-navigation-help-zoom");
// L.html("缩放视图"), L.next().html("两个手指拖动");
// var P = $(".cesium-touch-navigation-help .cesium-navigation-help-rotate");
// P.html("倾斜角度"), P.next().html("两指拖曳,同方向");
// var D = $(".cesium-touch-navigation-help .cesium-navigation-help-tilt");
// D.html("旋转视图"), D.next().html("两手指拖动,方向相反")
// }
// return b
// }
// function i(t, e) {
// null == e && (e = "name");
// var i = C.basemaps;
// if (i && i.length > 0) for (var n = 0; n < i.length; n++) {
// var r = i[n];
// if (null != r && r[e] == t) return r._layer
// }
// if (i = C.operationallayers, i && i.length > 0) for (var n = 0; n < i.length; n++) {
// var r = i[n];
// if (null != r && r[e] == t) return r._layer
// }
// return null
// }
// function n() {
// if (null == E) {
// var t = C.terrain || {};
// t.hasOwnProperty("requestWaterMask") || (t.requestWaterMask = !0), t.hasOwnProperty("requestVertexNormals") || (t.requestVertexNormals = !0), t.url ? (C.serverURL && (t.url = t.url.replace("$serverURL$", C.serverURL)), t.url = t.url.replace("$hostname$", location.hostname).replace("$host$", location.host)) : t.url = "http://assets.agi.com/stk-terrain/world", E = new Cesium.CesiumTerrainProvider(t)
// }
// return E
// }
// function r() {
// return null != E && b.terrainProvider == E
// }
// function o(t) {
// t ? b.terrainProvider = n() : b.terrainProvider = new Cesium.EllipsoidTerrainProvider({
// ellipsoid: Cesium.Ellipsoid.WGS84
// })
// }
// function a(t) {
// return "number" == typeof t && t.constructor == Number
// }
// function s(t, e, i) {
// if (null == e ? e = {} : a(e) && (e = {
// duration: e
// }), i && (e.complete = i), null == t && (e.isWgs84 = !0, t = C.extent || C.center), t.xmin && t.xmax && t.ymin && t.ymax) {
// var n = t.xmin,
// r = t.xmax,
// o = t.ymin,
// s = t.ymax;
// if (e.isWgs84) {
// var l = mars3d.map.point2map({
// x: n,
// y: o
// });
// n = l.x, o = l.y;
// var u = mars3d.map.point2map({
// x: r,
// y: s
// });
// r = u.x, s = u.y
// }
// var c = Cesium.Rectangle.fromDegrees(n, o, r, s);
// b.camera.flyTo({
// destination: c,
// duration: e.duration,
// complete: e.complete
// })
// } else {
// e.isWgs84 && (t = mars3d.map.point2map(t));
// var h = e.minz || 2500;
// b.camera.positionCartographic.height < h && (h = b.camera.positionCartographic.height), null != t.z && 0 != t.z && (h = t.z), b.camera.flyTo({
// destination: Cesium.Cartesian3.fromDegrees(Number(t.x), Number(t.y), Number(h)),
// orientation: {
// heading: Cesium.Math.toRadians(t.heading || 0),
// pitch: Cesium.Math.toRadians(t.pitch || -90),
// roll: Cesium.Math.toRadians(t.roll || 0)
// },
// duration: e.duration,
// complete: e.complete
// })
// }
// }
// function l() {
// return L
// }
// function u(t, e) {
// var i = e || mars3d.latlng.getCameraView(b);
// L = !0, b.camera.setView({
// destination: Cesium.Cartesian3.fromDegrees(-85.16, 13.71, 23e6)
// }), b.camera.flyTo({
// destination: Cesium.Cartesian3.fromDegrees(Number(i.x), Number(i.y), 23e6),
// duration: 2,
// easingFunction: Cesium.EasingFunction.LINEAR_NONE,
// complete: function() {
// var e = 1.2 * (i.z || 9e4) + 8e3;
// e > 23e6 && (e = 23e6), b.camera.flyTo({
// destination: Cesium.Cartesian3.fromDegrees(Number(i.x), Number(i.y), e),
// complete: function() {
// s(i, {
// duration: 2,
// complete: function() {
// L = !1, t && t()
// }
// })
// }
// })
// }
// })
// }
// function c(t) {
// document.getElementById("location_mars_jwd") || $("#" + w).prepend(''), t.style ? $("#location_mars_jwd").css(t.style) : $("#location_mars_jwd").css({
// left: "5px",
// bottom: "2px"
// });
// var e = new Cesium.ScreenSpaceEventHandler(b.scene.canvas);
// e.setInputAction(function(e) {
// var i = mars3d.latlng.getCurrentMousePosition(b.scene, e.endPosition);
// if (i) {
// var n = Cesium.Cartographic.fromCartesian(i),
// r = Cesium.Math.toDegrees(n.longitude),
// o = Cesium.Math.toDegrees(n.latitude),
// a = n.height;
// if (t.coordinate && "wgs" == t.coordinate) {
// var s = mars3d.map.point2wgs({
// x: r,
// y: o
// });
// r = s.x, o = s.y
// }
// var l = "经度:" + r.toFixed(6) + " 纬度:" + o.toFixed(6);
// a > 0 && (l += " 高程:" + a.toFixed(1) + "米"), $("#location_mars_jwd").html(l)
// } else $("#location_mars_jwd").html("")
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE)
// }
// function h(t) {
// function e() {
// var e = mars3d.latlng.getCenter(b);
// if (e) {
// var i = !1;
// for (var n in t.data) {
// var r = t.data[n];
// if (e.x >= r.xmin && e.x <= r.xmax && e.y >= r.ymin && e.y <= r.ymax) {
// $("#mars_msgbar").html(r.msg), i = !0;
// break
// }
// }
// }
// i || $("#mars_msgbar").html("")
// }
// null != t.data && 0 != t.data.length && (document.getElementById("mars_msgbar") || $("#" + w).prepend(''), t.style ? $("#mars_msgbar").css(t.style) : $("#mars_msgbar").css({
// right: "30px",
// bottom: "1px"
// }), b.scene.camera.moveEnd.addEventListener(e))
// }
// function d(t) {
// b.extend(Cesium.viewerCesiumNavigationMixin, {
// defaultResetView: Cesium.Rectangle.fromDegrees(110, 20, 120, 30),
// enableZoomControls: !0
// }), $(".distance-legend").css("left", "-10px"), $(".distance-legend").css("bottom", "25px"), $(".distance-legend").css("border", "none"), $(".distance-legend").css("background", "rgba(0, 0, 0, 0)"), $(".navigation-controls").hide(), t.style ? $(".compass").css(t.style) : $(".compass").css({
// top: "10px",
// left: "10px"
// })
// }
// function p() {
// var t = navigator.userAgent.toLowerCase(),
// e = "ipad" == t.match(/ipad/i),
// i = "iphone" == t.match(/iphone/i),
// n = "midp" == t.match(/midp/i),
// r = "rv:1.2.3.4" == t.match(/rv:1.2.3.4/i),
// o = "ucweb" == t.match(/ucweb/i),
// a = "android" == t.match(/android/i),
// s = "windows ce" == t.match(/windows ce/i),
// l = "windows mobile" == t.match(/windows mobile/i);
// return !(e || i || n || r || o || a || s || l)
// }
// function f() {
// return x
// }
// function m(t) {
// if ("gcj" == x) {
// var e = pointconvert.wgs2gcj([t.x, t.y]),
// i = v(t);
// return i.x = e[0], i.y = e[1], i
// }
// return t
// }
// function g(t) {
// if ("gcj" == x) {
// var e = pointconvert.gcj2wgs([t.x, t.y]),
// i = v(t);
// return i.x = e[0], i.y = e[1], i
// }
// return t
// }
// function v(t, e) {
// if (null == t || "object" != typeof t) return t;
// if (t.constructor != Object && t.constructor != Array) return t;
// if (t.constructor == Date || t.constructor == RegExp || t.constructor == Function || t.constructor == String || t.constructor == Number || t.constructor == Boolean) return new t.constructor(t);
// e = e || new t.constructor;
// for (var i in t) e[i] = "undefined" == typeof e[i] ? v(t[i], null) : e[i];
// return e
// }
// function _(t, i, n) {
// if (null == i) return void console.log("配置信息不能为空!");
// var r = e(t.id, i, t),
// o = {};
// return o.config = i, r.gisdata = o, t.success && t.success(r, o, n), r
// }
// function y() {
// var t = haoutil.system.getExplorerInfo();
// if ("IE" == t.type && t.version < 11) return !1;
// try {
// var e, i = document.createElement("canvas"),
// n = "undefined" != typeof WebGL2RenderingContext;
// if (n && (e = i.getContext("webgl2") || i.getContext("experimental-webgl2") || void 0), null == e && (e = i.getContext("webgl") || i.getContext("experimental-webgl") || void 0), null == e) return !1
// } catch (r) {
// return !1
// }
// return !0
// }
// var b, w, C, x, E, k = "cesium地图 操作类",
// L = !1;
// return {
// name: k,
// init: e,
// getMap: t,
// getLayer: i,
// centerAt: s,
// openFlyAnimation: u,
// isFlyAnimation: l,
// hasTerrain: r,
// updateTerrainProvider: o,
// getCrs: f,
// point2map: m,
// point2wgs: g,
// createMapByData: _,
// webglreport: y
// }
// }(), mars3d.createMap = function(t) {
// return t.url ? ($.ajax({
// type: "get",
// contentType: "application/json; charset=utf-8",
// dataType: "json",
// url: t.url,
// timeout: 0,
// success: function(e) {
// var i = e.map3d;
// e.serverURL && (i.serverURL = e.serverURL), t.serverURL && (i.serverURL = t.serverURL), mars3d.map.createMapByData(t, i, e)
// },
// error: function(e, i, n) {
// console.log("Json文件" + t.url + "加载失败!"), haoutil.alert("Json文件" + t.url + "加载失败!")
// }
// }), null) : (t.serverURL && t.data && (t.data.serverURL = t.serverURL), mars3d.map.createMapByData(t, t.data))
// }, mars3d.drawing = {}, mars3d.drawing.utils = {
// createDragger: function(t, e) {
// var i;
// if (e.dragger) i = e.dragger;
// else {
// var n = Cesium.defaultValue(e.position, Cesium.Cartesian3.ZERO),
// r = Cesium.defaultValue(e.dragIcon, "dragIcon.png");
// i = t.entities.add({
// position: n,
// billboard: {
// scale: 1,
// heightReference: e.heightReference ? Cesium.HeightReference.CLAMP_TO_GROUND : Cesium.HeightReference.NONE,
// image: r
// }
// })
// }
// return i._isDragger = !0, i.onDrag = Cesium.defaultValue(e.onDrag, null), i.horizontal = Cesium.defaultValue(e.horizontal, !0), i.vertical = Cesium.defaultValue(e.vertical, !1), i.verticalCtrl = Cesium.defaultValue(e.vertical, !1), i
// },
// getCoordinates: function(t) {
// for (var e = [], i = 0; i < t.length; i++) {
// var n = Cesium.Cartographic.fromCartesian(t[i]),
// r = Number(Cesium.Math.toDegrees(n.longitude).toFixed(6)),
// o = Number(Cesium.Math.toDegrees(n.latitude).toFixed(6)),
// a = Number(n.height.toFixed(1));
// e.push([r, o, a])
// }
// return e
// },
// getMaxHeightForPositions: function(t, e) {
// null == e && (e = 0);
// var i = e;
// if (null == t || 0 == t.length) return i;
// for (var n = (t[0], 0); n < t.length; n++) {
// var r = Cesium.Cartographic.fromCartesian(t[n]);
// r.height > i && (i = r.height)
// }
// return i
// },
// getPositionsWithHeight: function(t, e) {
// if (t instanceof Array) {
// for (var i = [], n = 0; n < t.length; n++) {
// var r = Cesium.Ellipsoid.WGS84.cartesianToCartographic(t[n]),
// o = {
// lon: Cesium.Math.toDegrees(r.longitude),
// lat: Cesium.Math.toDegrees(r.latitude),
// hgt: Math.ceil(Number(r.height) + Number(e))
// },
// a = [Number(o.lon), Number(o.lat), Number(o.hgt)];
// i = i.concat(a)
// }
// return Cesium.Cartesian3.fromDegreesArrayHeights(i)
// }
// var r = Cesium.Ellipsoid.WGS84.cartesianToCartographic(t),
// s = Number(Cesium.Math.toDegrees(r.longitude).toFixed(6)),
// l = Number(Cesium.Math.toDegrees(r.latitude).toFixed(6));
// return Cesium.Cartesian3.fromDegrees(s, l, Number(r.height) + Number(e))
// },
// getZHeightPosition: function(t, e) {
// var i = Cesium.Cartographic.fromCartesian(t),
// n = Number(Cesium.Math.toDegrees(i.longitude)),
// r = Number(Cesium.Math.toDegrees(i.latitude)),
// o = Number(i.height.toFixed(2)),
// a = Cesium.Cartographic.fromCartesian(e),
// s = Number(Cesium.Math.toDegrees(a.longitude)),
// l = Number(Cesium.Math.toDegrees(a.latitude)),
// u = Number(a.height.toFixed(2));
// return o > u ? Cesium.Cartesian3.fromDegrees(s, l, o) : Cesium.Cartesian3.fromDegrees(n, r, u)
// },
// getHDistance: function(t, e) {
// var i = this.getZHeightPosition(t, e),
// n = Cesium.Cartographic.fromCartesian(e),
// r = Cesium.Cartographic.fromCartesian(i),
// o = Cesium.Cartesian3.distance(t, i);
// return Math.abs(Number(r.height) - Number(n.height)) < .01 && (o = Cesium.Cartesian3.distance(e, i)), o
// },
// getMidPosition: function(t, e) {
// var i = Cesium.Cartographic.fromCartesian(t),
// n = Number(Cesium.Math.toDegrees(i.longitude)),
// r = Number(Cesium.Math.toDegrees(i.latitude)),
// o = Number(i.height.toFixed(2)),
// a = Cesium.Cartographic.fromCartesian(e),
// s = Number(Cesium.Math.toDegrees(a.longitude)),
// l = Number(Cesium.Math.toDegrees(a.latitude)),
// u = Number(a.height.toFixed(2)),
// c = (n + s) / 2,
// h = (r + l) / 2,
// d = (o + u) / 2;
// return Cesium.Cartesian3.fromDegrees(c, h, d)
// },
// getPositionsFromJson: function(t) {
// if (!t) return null;
// switch (t.type) {
// case "Point":
// return this.lonLatToCartesian(t.coordinates[0]);
// case "LineString":
// return this.lonLatsToCartesians(t.coordinates);
// case "Polygon":
// return this.lonLatsToCartesians(t.coordinates[0]);
// case "MultiPoint":
// return this.lonLatsToCartesians(t.coordinates);
// default:
// throw new Error("Invalid GeoJSON object.")
// }
// },
// lonLatToCartesian: function(t) {
// return Cesium.Cartesian3.fromDegrees(Number(t[0]), Number(t[1]), Number(t[2] || 0))
// },
// lonLatsToCartesians: function(t) {
// for (var e = [], i = 0; i < t.length; i++) {
// var n = [Number(t[i][0]), Number(t[i][1]), Number(t[i][2] || 0)];
// e = e.concat(n)
// }
// return Cesium.Cartesian3.fromDegreesArrayHeights(e)
// },
// normalizeJsonData: function(t) {
// var e = {};
// e.type = "FeatureCollection", e.features = [];
// var i;
// if (i = "string" == typeof t ? JSON.parse(t) : t, i instanceof Array) {
// for (var n = 0; n < i.length; n++) {
// var r = {
// type: "Feature"
// };
// r.properties = i[n].properties || i[n].PROPERTIES, r.geometry = i[n].geometry || i[n].GEOMETRY, e.features.push(r)
// }
// return JSON.stringify(e)
// }
// if (t.features && t.features instanceof Array) return t
// },
// normalizeBusinessData: function(t) {
// var e = {};
// try {
// e = JSON.parse(t)
// } catch (i) {
// return void haoutil.alert(i.name + ": " + i.message + " \n请确认json文件格式正确!!!")
// }
// for (var n = e.features, r = [], o = 0; o < n.length; o++) {
// var a = n[o],
// s = {
// dataID: a.properties.attr.id,
// dataType: a.properties.attr.type,
// properties: a.properties,
// geometry: a.geometry
// };
// r.push(s)
// }
// return JSON.stringify(r)
// },
// terrainPolyline: function(t) {
// var e = t.viewer,
// i = t.positions;
// if (null == i || 0 == i.length) return void(t.calback && t.calback(i));
// for (var n = Cesium.PolylinePipeline.generateArc({
// positions: i,
// granularity: t.granularity || 1e-5
// }), r = [], o = e.scene.globe.ellipsoid, a = 0; a < n.length; a += 3) {
// var s = Cesium.Cartesian3.unpack(n, a);
// r.push(o.cartesianToCartographic(s))
// }
// var l = Cesium.Cartographic.fromCartesian(i[0]).height;
// Cesium.when(Cesium.sampleTerrainMostDetailed(e.terrainProvider, r), function(e) {
// for (var n = !1, r = t.offset || 2, a = 0; a < e.length; ++a) null == e[a].height ? n = !0 : l = e[a].height || 0, e[a].height = r + (e[a].height || l);
// var s = o.cartographicArrayToCartesianArray(e);
// t.calback ? t.calback(s, n) : i.setValue && i.setValue(s)
// })
// }
// }, mars3d.drawing.DynamicProperty = function(t,type) {
// this._type = type,this._value = void 0, this._hasClone = !1, this._hasEquals = !1, this._definitionChanged = new Cesium.Event, this._constant = !1, this.setValue(t)
// }, Cesium.defineProperties(mars3d.drawing.DynamicProperty.prototype, {
// isConstant: {
// get: function() {
// return this._constant
// },
// set: function(t) {
// this._constant !== t && (this._constant = t, this._definitionChanged.raiseEvent(this))
// }
// },
// definitionChanged: {
// get: function() {
// return this._definitionChanged
// }
// }
// }), mars3d.drawing.DynamicProperty.prototype.getValue = function(t, e) {
// if(this._type){
// return {positions:this._value}
// }
// else{
// return this._hasClone ? this._value.clone(e) : this._value
// }
// }, mars3d.drawing.DynamicProperty.prototype.setValue = function(t) {
// var e = this._value;
// if (e !== t) {
// var i = Cesium.defined(t),
// n = i && "function" == typeof t.clone,
// r = i && "function" == typeof t.equals;
// this._hasClone = n, this._hasEquals = r;
// var o = !r || !t.equals(e);
// o && (this._value = n ? t.clone() : t, this._definitionChanged.raiseEvent(this))
// }
// }, mars3d.drawing.DynamicProperty.prototype.equals = function(t) {
// return this === t || t instanceof mars3d.drawing.DynamicProperty && (!this._hasEquals && this._value === t._value || this._hasEquals && this._value.equals(t._value))
// }, mars3d.drawing.DynamicProperty.prototype.valueOf = function(t) {
// return this._value
// }, mars3d.drawing.DynamicProperty.prototype.toString = function(t) {
// return String(this._value)
// }, mars3d.drawing.EllipseEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.options = i, this.draggers = [], this.heightDraggers = [], this.initDraggers()
// }, mars3d.drawing.EllipseEditor.prototype.initDraggers = function() {
// var t = this,
// e = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: this.entity.position._value,
// onDrag: function(e, i) {
// var n = new Cesium.Cartesian3;
// Cesium.Cartesian3.subtract(i, t.entity.position._value, n);
// var r = Cesium.Cartographic.fromCartesian(i),
// o = Number(r.height).toFixed(2);
// t.entity.ellipse.height = new Cesium.ConstantProperty(r.height), t.entity.attribute.style.height = o, t.entity.position._value = i;
// var a = new Cesium.Cartesian3;
// Cesium.Cartesian3.add(e.majorDragger.position._value, n, a), e.majorDragger.position = new Cesium.ConstantProperty(a), Cesium.Cartesian3.add(e.minorDragger.position._value, n, a), e.minorDragger.position = new Cesium.ConstantProperty(a), void 0 != t.entity.attribute.style.extrudedHeight && t.updateHeightDraggers(), t.entity.changeEditing()
// }
// });
// this.draggers.push(e);
// var i = Cesium.EllipseGeometryLibrary.computeEllipsePositions({
// center: this.entity.position._value,
// semiMinorAxis: this.entity.ellipse.semiMinorAxis._value,
// semiMajorAxis: this.entity.ellipse.semiMajorAxis._value,
// rotation: Cesium.Math.toRadians(Number(this.entity.attribute.style.rotation || 0)),
// granularity: 2
// }, !0, !1),
// n = new Cesium.Cartesian3(i.positions[0], i.positions[1], i.positions[2]),
// r = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: n,
// onDrag: function(e, i) {
// var n = Cesium.Cartesian3.distance(t.entity.position._value, i);
// t.entity.ellipse.semiMajorAxis = new Cesium.ConstantProperty(n), t.entity.attribute.style.semiMajorAxis = Number(n).toFixed(2), void 0 != t.entity.attribute.style.extrudedHeight && t.updateHeightDraggers(), t.entity.changeEditing()
// }
// });
// e.majorDragger = r, this.draggers.push(r);
// var o = new Cesium.Cartesian3(i.positions[3], i.positions[4], i.positions[5]),
// a = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: o,
// onDrag: function(e, i) {
// var n = Cesium.Cartesian3.distance(t.entity.position._value, i);
// t.entity.ellipse.semiMinorAxis = new Cesium.ConstantProperty(n), t.entity.attribute.style.semiMinorAxis = Number(n).toFixed(2), void 0 != t.entity.attribute.style.extrudedHeight && t.updateHeightDraggers(), t.entity.changeEditing()
// }
// });
// e.minorDragger = a, this.draggers.push(a), void 0 != this.entity.attribute.style.extrudedHeight && this.initHeightDraggers()
// }, mars3d.drawing.EllipseEditor.prototype.initHeightDraggers = function() {
// var t = this,
// e = Number(this.entity.attribute.style.extrudedHeight) - Number(this.entity.attribute.style.height),
// i = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: mars3d.drawing.utils.getPositionsWithHeight(this.entity.position._value, e),
// onDrag: function(i, n) {
// var r = new Cesium.Cartesian3;
// Cesium.Cartesian3.subtract(n, t.entity.position._value, r);
// var o = Cesium.Cartographic.fromCartesian(n),
// a = Number(o.height).toFixed(2);
// t.entity.position._value = n, t.entity.ellipse.extrudedHeight = new Cesium.ConstantProperty(Number(a) + Number(e)), t.entity.ellipse.height = new Cesium.ConstantProperty(o.height), t.entity.attribute.style.extrudedHeight = Number(a) + Number(e), t.entity.attribute.style.height = a, t.updateDraggers(), t.entity.changeEditing()
// }
// });
// this.heightDraggers.push(i);
// var n = Cesium.EllipseGeometryLibrary.computeEllipsePositions({
// center: this.entity.position._value,
// semiMinorAxis: this.entity.ellipse.semiMinorAxis._value,
// semiMajorAxis: this.entity.ellipse.semiMajorAxis._value,
// rotation: Cesium.Math.toRadians(Number(this.entity.attribute.style.rotation || 0)),
// granularity: 2
// }, !0, !1),
// r = new Cesium.Cartesian3(n.positions[0], n.positions[1], n.positions[2]),
// o = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: mars3d.drawing.utils.getPositionsWithHeight(r, e),
// onDrag: function(e, i) {
// var n = Cesium.Cartographic.fromCartesian(i);
// t.entity.ellipse.extrudedHeight = new Cesium.ConstantProperty(n.height), t.entity.attribute.style.extrudedHeight = Number(n.height).toFixed(2), t.updateHeightDraggers(), t.entity.changeEditing()
// },
// vertical: !0,
// horizontal: !1
// });
// this.heightDraggers.push(o);
// var a = new Cesium.Cartesian3(n.positions[3], n.positions[4], n.positions[5]),
// s = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: mars3d.drawing.utils.getPositionsWithHeight(a, e),
// onDrag: function(e, i) {
// var n = Cesium.Cartographic.fromCartesian(i);
// t.entity.ellipse.extrudedHeight = new Cesium.ConstantProperty(n.height), t.entity.attribute.style.extrudedHeight = Number(n.height).toFixed(2), t.updateHeightDraggers(), t.entity.changeEditing()
// },
// vertical: !0,
// horizontal: !1
// });
// this.heightDraggers.push(s)
// }, mars3d.drawing.EllipseEditor.prototype.updateDraggers = function() {
// this.destroy(), this.initDraggers()
// }, mars3d.drawing.EllipseEditor.prototype.updateHeightDraggers = function() {
// for (i = 0; i < this.heightDraggers.length; i++) this.viewer.entities.remove(this.heightDraggers[i]);
// this.heightDraggers = [], this.initHeightDraggers()
// }, mars3d.drawing.EllipseEditor.prototype.destroy = function() {
// var t = 0;
// for (t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// if (this.draggers = [], void 0 != this.entity.attribute.style.extrudedHeight) {
// for (t = 0; t < this.heightDraggers.length; t++) this.viewer.entities.remove(this.heightDraggers[t]);
// this.heightDraggers = []
// }
// }, mars3d.drawing.EllipsoidEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.options = i, this.draggers = [], this.initDraggers()
// }, mars3d.drawing.EllipsoidEditor.prototype.initDraggers = function() {
// var t = this,
// e = this.entity.position._value,
// i = Number(this.entity.attribute.style.heightRadii) || 0,
// n = Cesium.Cartographic.fromCartesian(e);
// n.height += i;
// var r = Cesium.Cartesian3.fromRadians(n.longitude, n.latitude, n.height),
// o = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: this.options.dragIcon,
// position: r,
// onDrag: function(e, i) {
// var n = new Cesium.Cartesian3;
// Cesium.Cartesian3.subtract(i, t.entity.position._value, n);
// var r = Cesium.Cartographic.fromCartesian(i),
// o = Number(t.entity.attribute.style.heightRadii) || 0;
// r.height -= o;
// var a = Cesium.Cartesian3.fromRadians(r.longitude, r.latitude, r.height);
// t.entity.position._value = a, t.entity.changeEditing()
// }
// });
// this.draggers.push(o)
// }, mars3d.drawing.EllipsoidEditor.prototype.updateDraggers = function() {
// this.destroy(), this.initDraggers()
// }, mars3d.drawing.EllipsoidEditor.prototype.destroy = function() {
// var t = 0;
// for (t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// this.draggers = []
// }, mars3d.drawing.ExtrudedPolygonEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [], this.heightDraggers = [];
// var n = this,
// r = 0,
// o = e.polygon.hierarchy._value;
// for (e.polygon.hierarchy.isConstant = !1, r = 0; r < o.length; r++) {
// var a = o[r];
// if (void 0 != e.polygon.height) {
// var s = Cesium.Cartographic.fromCartesian(a);
// s.height += e.polygon.height._value, a = Cesium.Cartesian3.fromRadians(s.longitude, s.latitude, s.height)
// }
// var l = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: a,
// onDrag: function(t, i) {
// t.positions[t.index] = i;
// for (var r = e.polygon.hierarchy._value, o = r[0], a = 1; a < r.length; a++) {
// var s = Cesium.Cartographic.fromCartesian(o),
// l = Cesium.Cartographic.fromCartesian(r[a]);
// Number(l.height) > Number(s.height) && (o = r[a])
// }
// var u = Number(e.polygon.extrudedHeight) - Number(Cesium.Cartographic.fromCartesian(o).height);
// e.attribute.style.extrudedHeight = Number(u).toFixed(2), n.updateDraggers(), e.changeEditing()
// }
// });
// l.index = r, l.positions = o, this.draggers.push(l)
// }
// if (e.polygon.extrudedHeight) for (r = 0; r < o.length; r++) {
// var u = o[r],
// c = Cesium.Cartographic.fromCartesian(u);
// c.height = e.polygon.extrudedHeight._value;
// var h = Cesium.Cartesian3.fromRadians(c.longitude, c.latitude, c.height),
// l = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: h,
// onDrag: function(t, i) {
// for (var r = n.entity.polygon.hierarchy._value, o = r[0], a = 1; a < r.length; a++) {
// var s = Cesium.Cartographic.fromCartesian(o),
// l = Cesium.Cartographic.fromCartesian(r[a]);
// Number(l.height) > Number(s.height) && (o = r[a])
// }
// var u = Cesium.Cartographic.fromCartesian(i);
// e.polygon.extrudedHeight = new Cesium.ConstantProperty(Number(u.height));
// var c = Number(u.height) - Number(Cesium.Cartographic.fromCartesian(o).height);
// e.attribute.style.extrudedHeight = Number(c).toFixed(2), n.updateDraggers(), e.changeEditing()
// },
// vertical: !0,
// horizontal: !1
// });
// l.index = r, this.heightDraggers.push(l)
// }
// }, mars3d.drawing.ExtrudedPolygonEditor.prototype.updateDraggers = function() {
// var t = this.entity.polygon.hierarchy._value,
// e = this.entity.polygon.extrudedHeight._value,
// i = 0;
// void 0 != this.entity.polygon.height && (i = this.entity.polygon.height._value);
// for (var n = 0; n < this.heightDraggers.length; n++) {
// var r = t[n],
// o = this.heightDraggers[n],
// a = Cesium.Cartographic.fromCartesian(r);
// a.height = e;
// var s = Cesium.Cartesian3.fromRadians(a.longitude, a.latitude, a.height);
// o.position = s;
// var l = this.draggers[n],
// u = Cesium.Cartographic.fromCartesian(r);
// u.height += i, s = Cesium.Cartesian3.fromRadians(u.longitude, u.latitude, u.height), l.position = s
// }
// }, mars3d.drawing.ExtrudedPolygonEditor.prototype.destroy = function() {
// var t = 0;
// for (t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// for (this.draggers = [], t = 0; t < this.heightDraggers.length; t++) this.viewer.entities.remove(this.heightDraggers[t]);
// this.heightDraggers = []
// }, mars3d.drawing.PointEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [];
// mars3d.drawing.utils.createDragger(this.viewer, {
// dragger: e,
// onDrag: function(t, i) {
// var n = new Cesium.Cartesian3;
// Cesium.Cartesian3.subtract(i, e.position._value, n), e.position._value = i, e.changeEditing()
// }
// })
// }, mars3d.drawing.PointEditor.prototype.updateDraggers = function() {}, mars3d.drawing.PointEditor.prototype.destroy = function() {
// this.draggers = []
// }, mars3d.drawing.PolygonEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [];
// var n = e.polygon.hierarchy._value;
// e.polygon.hierarchy.isConstant = !1;
// for (var r = 0; r < n.length; r++) {
// var o = n[r],
// a = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: o,
// heightReference: !e.attribute.style.perPositionHeight,
// onDrag: function(t, i) {
// t.positions[t.index] = i, e.changeEditing()
// }
// });
// a.index = r, a.positions = n, this.draggers.push(a)
// }
// }, mars3d.drawing.PolygonEditor.prototype.updateDraggers = function() {
// for (var t = this.entity.polygon.hierarchy._value, e = 0; e < this.draggers.length; e++) {
// var i = t[e];
// this.draggers[e].position = i
// }
// }, mars3d.drawing.PolygonEditor.prototype.destroy = function() {
// this.entity.polygon.hierarchy.isConstant = !0;
// for (var t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// this.draggers = []
// }, mars3d.drawing.PolylineEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [];
// var n = e.polyline.positions._value;
// e.polyline.positions.isConstant = !1;
// for (var r = 0; r < n.length; r++) {
// var o = n[r],
// a = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: o,
// onDrag: function(t, i) {
// n[t.index] = i, e.polyline.positions = n, e.changeEditing()
// }
// });
// a.index = r, this.draggers.push(a)
// }
// }, mars3d.drawing.PolylineEditor.prototype.updateDraggers = function() {
// for (var t = this.entity.polyline.positions.getValue(), e = 0; e < this.draggers.length; e++) {
// var i = t[e];
// this.draggers[e].position = i
// }
// }, mars3d.drawing.PolylineEditor.prototype.destroy = function() {
// this.entity.polyline.positions.isConstant = !0;
// for (var t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// this.draggers = []
// }, mars3d.drawing.PolylineVolumeEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [];
// var n = e.polylineVolume.positions.getValue();
// e.polylineVolume.positions.isConstant = !1;
// for (var r = 0; r < n.length; r++) {
// var o = n[r],
// a = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: o,
// onDrag: function(t, i) {
// n[t.index] = i, e.polylineVolume.positions = n, e.changeEditing()
// }
// });
// a.index = r, this.draggers.push(a)
// }
// }, mars3d.drawing.PolylineVolumeEditor.prototype.updateDraggers = function() {
// for (var t = this.entity.polylineVolume.positions.getValue(), e = 0; e < this.draggers.length; e++) {
// var i = t[e];
// this.draggers[e].position = i
// }
// }, mars3d.drawing.PolylineVolumeEditor.prototype.destroy = function() {
// this.entity.polylineVolume.positions.isConstant = !0;
// for (var t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// this.draggers = []
// }, mars3d.drawing.RectangleEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [];
// var n = this.getDraggersPositions();
// e.rectangle.coordinates.isConstant = !1;
// for (var r = 0; r < n.length; r++) {
// var o = n[r],
// a = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: o,
// heightReference: !e.attribute.style.perPositionHeight,
// onDrag: function(t, i) {
// t.positions[t.index] = i;
// var n;
// n = 0 == t.index ? Cesium.Rectangle.fromCartesianArray([i, t.positions[1]]) : Cesium.Rectangle.fromCartesianArray([i, t.positions[0]]), e.rectangle.coordinates.setValue(n), e.changeEditing()
// }
// });
// a.index = r, a.positions = n, this.draggers.push(a)
// }
// }, mars3d.drawing.RectangleEditor.prototype.updateDraggers = function() {
// for (var t = this.getDraggersPositions(), e = 0; e < this.draggers.length; e++) {
// var i = t[e];
// this.draggers[e].position = i
// }
// }, mars3d.drawing.RectangleEditor.prototype.getDraggersPositions = function() {
// var t = this.entity.rectangle.coordinates._value,
// e = Cesium.Rectangle.northwest(t),
// i = Cesium.Rectangle.southeast(t);
// return Cesium.Cartesian3.fromRadiansArray([e.longitude, e.latitude, i.longitude, i.latitude])
// }, mars3d.drawing.RectangleEditor.prototype.destroy = function() {
// this.entity.rectangle.coordinates.isConstant = !0;
// for (var t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// this.draggers = []
// }, mars3d.drawing.RectangleExtrudedEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [], this.heightDraggers = [];
// var n = this,
// r = 0,
// o = this.getDraggersPositions();
// for (e.rectangle.coordinates.isConstant = !1, r = 0; r < o.length; r++) {
// var a = o[r];
// if (void 0 != e.rectangle.height) {
// var s = Cesium.Cartographic.fromCartesian(a);
// s.height += e.rectangle.height._value, a = Cesium.Cartesian3.fromRadians(s.longitude, s.latitude, s.height)
// }
// var l = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: a,
// onDrag: function(t, i) {
// t.positions[t.index] = i;
// var r;
// r = 0 == t.index ? Cesium.Rectangle.fromCartesianArray([i, t.positions[1]]) : Cesium.Rectangle.fromCartesianArray([i, t.positions[0]]), e.rectangle.coordinates.setValue(r), n.updateDraggers(), e.changeEditing()
// }
// });
// l.index = r, l.positions = o, this.draggers.push(l)
// }
// if (e.rectangle.extrudedHeight) for (r = 0; r < o.length; r++) {
// var u = o[r],
// s = Cesium.Cartographic.fromCartesian(u);
// s.height += e.rectangle.extrudedHeight._value;
// var a = Cesium.Cartesian3.fromRadians(s.longitude, s.latitude, s.height),
// l = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: a,
// onDrag: function(t, i) {
// var r = Cesium.Cartographic.fromCartesian(i);
// e.rectangle.extrudedHeight = new Cesium.ConstantProperty(r.height);
// var o = Number(r.height) - Number(e.rectangle.height);
// e.attribute.style.extrudedHeight = Number(o).toFixed(2), n.updateDraggers(), e.changeEditing()
// },
// vertical: !0,
// horizontal: !1
// });
// l.index = r, this.heightDraggers.push(l)
// }
// }, mars3d.drawing.RectangleExtrudedEditor.prototype.getDraggersPositions = function() {
// var t = this.entity.rectangle.coordinates._value,
// e = Cesium.Rectangle.northwest(t),
// i = Cesium.Rectangle.southeast(t);
// return Cesium.Cartesian3.fromRadiansArray([e.longitude, e.latitude, i.longitude, i.latitude])
// }, mars3d.drawing.RectangleExtrudedEditor.prototype.updateDraggers = function() {
// var t = this.getDraggersPositions(),
// e = this.entity.rectangle.extrudedHeight._value,
// i = 0;
// void 0 != this.entity.rectangle.height && (i = this.entity.rectangle.height._value);
// for (var n = 0; n < this.heightDraggers.length; n++) {
// var r = t[n],
// o = this.heightDraggers[n],
// a = Cesium.Cartographic.fromCartesian(r);
// a.height += e;
// var s = Cesium.Cartesian3.fromRadians(a.longitude, a.latitude, a.height);
// o.position = s;
// var l = this.draggers[n],
// u = Cesium.Cartographic.fromCartesian(r);
// u.height += i, s = Cesium.Cartesian3.fromRadians(u.longitude, u.latitude, u.height), l.position = s
// }
// }, mars3d.drawing.RectangleExtrudedEditor.prototype.destroy = function() {
// var t = 0;
// for (t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// for (this.draggers = [], t = 0; t < this.heightDraggers.length; t++) this.viewer.entities.remove(this.heightDraggers[t]);
// this.heightDraggers = []
// }, mars3d.drawing.WallEditor = function(t, e, i) {
// this.viewer = t, this.entity = e, this.draggers = [], this.heightDraggers = [];
// var n = this,
// r = 0,
// o = e.wall.positions._value;
// for (e.wall.positions.isConstant = !1, r = 0; r < o.length; r++) {
// var a = o[r],
// s = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: a,
// onDrag: function(t, i) {
// t.positions[t.index] = i, n.updateDraggers(), e.changeEditing()
// }
// });
// s.index = r, s.positions = o, this.draggers.push(s)
// }
// if (e.wall.maximumHeights) for (r = 0; r < o.length; r++) {
// var l = o[r],
// u = Cesium.Cartographic.fromCartesian(l.clone());
// u.height = e.wall.maximumHeights._value[r];
// var a = Cesium.Cartesian3.fromRadians(u.longitude, u.latitude, u.height),
// s = mars3d.drawing.utils.createDragger(this.viewer, {
// dragIcon: i.dragIcon,
// position: a,
// onDrag: function(t, i) {
// var r = Cesium.Cartographic.fromCartesian(i),
// o = n.entity.wall.minimumHeights._value,
// a = Number(r.height) - Number(o[t.index]);
// e.attribute.style.extrudedHeight = a.toFixed(2), n.updateDraggers(), e.changeEditing()
// },
// vertical: !0,
// horizontal: !1
// });
// s.index = r, this.heightDraggers.push(s)
// }
// }, mars3d.drawing.WallEditor.prototype.updateDraggers = function() {
// for (var t = this.entity.wall.positions._value, e = this.entity.wall.minimumHeights._value, i = this.entity.wall.maximumHeights._value, n = 0; n < this.heightDraggers.length; n++) {
// var r = t[n].clone(),
// o = this.heightDraggers[n],
// a = Cesium.Cartographic.fromCartesian(r);
// e[n] = a.height, i[n] = Number(a.height) + Number(this.entity.attribute.style.extrudedHeight), o.position = mars3d.drawing.utils.getPositionsWithHeight(r, this.entity.attribute.style.extrudedHeight), this.draggers[n].position = r
// }
// }, mars3d.drawing.WallEditor.prototype.destroy = function() {
// var t = 0;
// for (t = 0; t < this.draggers.length; t++) this.viewer.entities.remove(this.draggers[t]);
// for (this.draggers = [], t = 0; t < this.heightDraggers.length; t++) this.viewer.entities.remove(this.heightDraggers[t]);
// this.heightDraggers = []
// }, mars3d.drawing.BillboardControl = {
// typename: "billboard",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// billboard: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// scale: 1,
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// e.color = new Cesium.Color.fromCssColorString("#FFFFFF").withAlpha(Number(n || 1));
// break;
// case "rotation":
// e.rotation = Cesium.Math.toRadians(n)
// }
// }
// return e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PointEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.EllipseControl = {
// typename: "ellipse",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// ellipse: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0,
// fill: !0
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "rotation":
// e.rotation = Cesium.Math.toRadians(n)
// }
// }
// return e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.EllipseEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.EllipsoidControl = {
// typename: "ellipsoid",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// ellipsoid: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0,
// fill: !0
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// case "widthRadii":
// case "heightRadii":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "extentRadii":
// var r = t.style.extentRadii || 100,
// o = t.style.widthRadii || 100,
// a = t.style.heightRadii || 100;
// e.radii = new Cesium.Cartesian3(r, o, a)
// }
// }
// return e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.EllipsoidEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.LabelControl = {
// typename: "label",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// label: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0,
// scale: 1,
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "font_style":
// case "font_weight":
// case "font_size":
// case "font_family":
// case "text":
// break;
// case "color":
// e.fillColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "border":
// e.style = n ? Cesium.LabelStyle.FILL_AND_OUTLINE : Cesium.LabelStyle.FILL;
// break;
// case "border_color":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "border_width":
// e.outlineWidth = n;
// break;
// case "background":
// e.showBackground = n;
// break;
// case "background_color":
// e.backgroundColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "pixelOffset":
// e.pixelOffset = new Cesium.Cartesian2(t.style.pixelOffset[0], t.style.pixelOffset[1])
// }
// }
// e.text = (t.style.text || "文字").replace(new RegExp(" ", "gm"), "\n");
// var r = (t.style.font_style || "normal") + " small-caps " + (t.style.font_weight || "normal") + " " + (t.style.font_size || "30") + "px " + (t.style.font_family || "黑体");
// return e.font = r, e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PointEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.ModelControl = {
// typename: "model",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// model: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "silhouette":
// case "silhouetteColor":
// case "silhouetteAlpha":
// case "silhouetteSize":
// case "fill":
// case "color":
// case "opacity":
// break;
// case "modelUrl":
// e.uri = n
// }
// }
// return t.style.silhouette ? (e.silhouetteColor = new Cesium.Color.fromCssColorString(t.style.silhouetteColor || "#FFFFFF").withAlpha(Number(t.style.silhouetteAlpha || 1)), e.silhouetteSize = Number(t.style.silhouetteSize || 1)) : e.silhouetteSize = 0, t.style.fill ? e.color = new Cesium.Color.fromCssColorString(t.style.color || "#FFFFFF").withAlpha(Number(t.style.opacity || 1)) : e.color = new Cesium.Color.fromCssColorString("#FFFFFF").withAlpha(Number(t.style.opacity || 1)), e
// },
// attribute2Model: function(t, e) {
// var i = Cesium.Math.toRadians(Number(e.attribute.style.heading || 0)),
// n = Cesium.Math.toRadians(Number(e.attribute.style.pitch || 0)),
// r = Cesium.Math.toRadians(Number(e.attribute.style.roll || 0)),
// o = new Cesium.HeadingPitchRoll(i, n, r);
// e.orientation && (e.orientation = Cesium.Transforms.headingPitchRollQuaternion(e.position._value, o))
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PointEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e);
// var i = Cesium.Math.toRadians(Number(t.attribute.style.heading || 0)),
// n = Cesium.Math.toRadians(Number(t.attribute.style.pitch || 0)),
// r = Cesium.Math.toRadians(Number(t.attribute.style.roll || 0)),
// o = new Cesium.HeadingPitchRoll(i, n, r);
// t.orientation = Cesium.Transforms.headingPitchRollQuaternion(t.position._value, o)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.PointControl = {
// typename: "point",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// point: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.color = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1))
// }
// }
// return t.style.outline || (e.outlineWidth = 0), e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PointEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.position = new mars3d.drawing.DynamicProperty(e)
// },
// getPositions: function(t) {
// return [t.position._value]
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Point",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.PolygonControl = {
// typename: "polygon",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// polygon: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// show: !0,
// fill: !0,
// hierarchy: new mars3d.drawing.DynamicProperty([],"polygon")
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "extrudedHeight":
// var r = mars3d.drawing.utils.getMaxHeightForPositions(e.hierarchy._value);
// e.extrudedHeight = Number(n) + r
// }
// }
// return null == t.style.color && (e.material = Cesium.Color.fromRandom({
// minimumGreen: .75,
// maximumBlue: .75,
// alpha: Number(t.style.opacity || 1)
// })), e
// },
// getEditor: function(t, e, i) {
// return e.polygon.extrudedHeight ? new mars3d.drawing.ExtrudedPolygonEditor(t, e, i) : new mars3d.drawing.PolygonEditor(t, e, i)
// },
// setPositions: function(t, e) {
// if (t.polygon.hierarchy = new mars3d.drawing.DynamicProperty(e), t.attribute.style.extrudedHeight) {
// var i = mars3d.drawing.utils.getMaxHeightForPositions(e);
// t.polygon.extrudedHeight = i + Number(t.attribute.style.extrudedHeight)
// }
// },
// getPositions: function(t) {
// return t.polygon.hierarchy._value
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t),
// i = e[0],
// n = e[e.length - 1];
// return i[0] == n[0] && i[1] == n[1] && i[2] == n[2] || e.push(i), {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "Polygon",
// coordinates: [e]
// }
// }
// }
// }, mars3d.drawing.PolylineControl = {
// typename: "polyline",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// polyline: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// followSurface: !0,
// positions: new mars3d.drawing.DynamicProperty([])
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "lineType":
// case "color":
// case "opacity":
// case "outline":
// case "outlineWidth":
// case "outlineColor":
// case "outlineOpacity":
// }
// }
// var r = new Cesium.Color.fromCssColorString(t.style.color || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// switch (t.style.lineType) {
// default:
// case "solid":
// t.style.outline ? e.material = new Cesium.PolylineOutlineMaterialProperty({
// color: r,
// outlineWidth: Number(t.style.outlineWidth || 1),
// outlineColor: new Cesium.Color.fromCssColorString(t.style.outlineColor || "#FFFF00").withAlpha(Number(t.style.outlineOpacity || t.style.opacity || 1))
// }) : e.material = r;
// break;
// case "dash":
// e.material = new Cesium.PolylineDashMaterialProperty({
// color: r
// })
// }
// return e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PolylineEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.polyline.positions.setValue(e)
// },
// getPositions: function(t) {
// return t.polyline.positions._value
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "LineString",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.PolylineVolumeControl = {
// typename: "polylineVolume",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// polylineVolume: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// null == e && (e = {
// positions: new mars3d.drawing.DynamicProperty([])
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// case "radius":
// case "shape":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1))
// }
// }
// switch (t.style.radius = t.style.radius || 10, t.style.shape) {
// default:
// case "pipeline":
// e.shape = this._getCorridorShape1(t.style.radius);
// break;
// case "circle":
// e.shape = this._getCorridorShape2(t.style.radius);
// break;
// case "star":
// e.shape = this._getCorridorShape3(t.style.radius)
// }
// return e
// },
// _getCorridorShape1: function(t) {
// for (var e = t / 3, i = 0, n = 360, r = [], o = i; o <= n; o++) {
// var a = Cesium.Math.toRadians(o);
// r.push(new Cesium.Cartesian2(t * Math.cos(a), t * Math.sin(a)))
// }
// for (var o = n; o >= i; o--) {
// var a = Cesium.Math.toRadians(o);
// r.push(new Cesium.Cartesian2((t - e) * Math.cos(a), (t - e) * Math.sin(a)))
// }
// return r
// },
// _getCorridorShape2: function(t) {
// for (var e = 0, i = 360, n = [], r = e; r <= i; r++) {
// var o = Cesium.Math.toRadians(r);
// n.push(new Cesium.Cartesian2(t * Math.cos(o), t * Math.sin(o)))
// }
// return n
// },
// _getCorridorShape3: function(t, e) {
// for (var e = e || 6, i = Math.PI / e, n = 2 * e, r = new Array(n), o = 0; o < n; o++) {
// var a = o % 2 === 0 ? t : t / 3;
// r[o] = new Cesium.Cartesian2(Math.cos(o * i) * a, Math.sin(o * i) * a)
// }
// return r
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.PolylineVolumeEditor(t, e, i)
// },
// setPositions: function(t, e) {
// t.polylineVolume.positions = e
// },
// getPositions: function(t) {
// return t.polylineVolume.positions._value
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "LineString",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.RectangleControl = {
// typename: "rectangle",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// rectangle: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// if (!e) {
// var i = Cesium.Rectangle.fromDegrees(78.654473, 34.878143, 78.654673, 34.878316);
// e = {
// show: !0,
// fill: !0,
// closeTop: !0,
// closeBottom: !0,
// coordinates: i
// }
// }
// for (var n in t.style) {
// var r = t.style[n];
// switch (n) {
// default:
// e[n] = r;
// break;
// case "opacity":
// case "outlineOpacity":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(r || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "height":
// e.height = Number(r), e.extrudedHeight = Number(t.style.extrudedHeight) + Number(r);
// break;
// case "extrudedHeight":
// e.extrudedHeight = Number(e.height) + Number(r);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(r || "#FFFF00").withAlpha(Number(t.style.opacity || 1));
// break;
// case "image":
// e.material = t.style.image;
// break;
// case "rotation":
// e.rotation = Cesium.Math.toRadians(r), t.style.stRotation || (e.stRotation = Cesium.Math.toRadians(r));
// break;
// case "stRotation":
// e.stRotation = Cesium.Math.toRadians(r)
// }
// }
// return null == e.material && (e.material = Cesium.Color.fromRandom({
// minimumGreen: .75,
// maximumBlue: .75,
// alpha: Number(t.style.opacity || 1)
// })), e
// },
// getEditor: function(t, e, i) {
// return e.rectangle.extrudedHeight ? new mars3d.drawing.RectangleExtrudedEditor(t, e, i) : new mars3d.drawing.RectangleEditor(t, e, i)
// },
// setPositions: function(t, e) {
// e instanceof Array && (e = Cesium.Rectangle.fromCartesianArray(e)), t.rectangle.coordinates.setValue(e)
// },
// getPositions: function(t) {
// return t.rectangle.coordinates
// },
// getCoordinates: function(t) {
// var e = this.getDiagonalPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// getDiagonalPositions: function(t) {
// var e = t.rectangle.coordinates._value,
// i = Cesium.Rectangle.northwest(e),
// n = Cesium.Rectangle.southeast(e);
// return Cesium.Cartesian3.fromRadiansArray([i.longitude, i.latitude, n.longitude, n.latitude])
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "MultiPoint",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.WallControl = {
// typename: "wall",
// startDraw: function(t, e) {
// var i = this.attribute2Entity(e),
// n = t.entities.add({
// wall: i,
// attribute: e
// });
// return n
// },
// attribute2Entity: function(t, e) {
// e || (e = {
// show: !0,
// fill: !0,
// minimumHeights: [],
// maximumHeights: [],
// positions: new mars3d.drawing.DynamicProperty([])
// });
// for (var i in t.style) {
// var n = t.style[i];
// switch (i) {
// default:
// e[i] = n;
// break;
// case "opacity":
// case "outlineOpacity":
// break;
// case "outlineColor":
// e.outlineColor = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(t.style.outlineOpacity || t.style.opacity || 1);
// break;
// case "color":
// e.material = new Cesium.Color.fromCssColorString(n || "#FFFF00").withAlpha(Number(t.style.opacity || 1))
// }
// }
// return null == e.material && (e.material = Cesium.Color.fromRandom({
// minimumGreen: .75,
// maximumBlue: .75,
// alpha: Number(t.style.opacity || 1)
// })), e
// },
// getEditor: function(t, e, i) {
// return new mars3d.drawing.WallEditor(t, e, i)
// },
// setPositions: function(t, e) {
// if (t.wall.positions = new mars3d.drawing.DynamicProperty(e), t.wall.maximumHeights && t.wall.minimumHeights) for (var i = 0; i < e.length; i++) {
// var n = Cesium.Cartographic.fromCartesian(e[i]);
// t.wall.minimumHeights._value[i] = Number(n.height), t.wall.maximumHeights._value[i] = Number(n.height) + Number(t.attribute.style.extrudedHeight)
// }
// },
// getPositions: function(t) {
// return t.wall.positions._value
// },
// setMaximumHeights: function(t, e) {
// t.wall.maximumHeights = new mars3d.drawing.DynamicProperty(e)
// },
// getMaximumHeights: function(t) {
// return t.wall.maximumHeights._value
// },
// setMinimumHeights: function(t, e) {
// t.wall.minimumHeights = new mars3d.drawing.DynamicProperty(e)
// },
// getMinimumHeights: function(t) {
// return t.wall.minimumHeights._value
// },
// getCoordinates: function(t) {
// var e = this.getPositions(t),
// i = mars3d.drawing.utils.getCoordinates(e);
// return i
// },
// toGeoJSON: function(t) {
// var e = this.getCoordinates(t);
// return {
// type: "Feature",
// properties: t.attribute,
// geometry: {
// type: "LineString",
// coordinates: e
// }
// }
// }
// }, mars3d.drawing.EventControl = function(t) {
// this.viewer = t, t.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), t.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK)
// }, mars3d.drawing.EventControl.prototype.createDrawPointHandler = function(t) {
// var e = this;
// t.inProgress = !0;
// var i = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
// return i.setInputAction(function(n) {
// var r = mars3d.latlng.getCurrentMousePosition(e.viewer.scene, n.position);
// r && (t.updatePositions(r), t.inProgress = !1, t.stopDrawing(), t.startEditing(), i.destroy(), e.drawHandler = null)
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), this.drawHandler = i, i
// },
// mars3d.drawing.EventControl.prototype.createDrawPolylineHandler = function(t, e) {
// var i = this;
// t.inProgress = !0;
// var n = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
// return n.lastPointTemporary = !1, n.setInputAction(function(r) {
// var o = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, r.position);
// o && (n.lastPointTemporary && e.pop(), e.push(o), n.lastPointTemporary = !1, t.attribute && t.attribute.minMaxPoints && (e.length == t.attribute.minMaxPoints.min && e.length == t.attribute.minMaxPoints.max || t.attribute.minMaxPoints.isSuper && 4 == e.length) && (t.inProgress = !1, n.destroy(), i.drawHandler = null, t.stopDrawing(), t.startEditing()), t.changeDrawing())
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), n.setInputAction(function(r) {
// if (r.endPosition) {
// var o = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, r.endPosition);
// o && (n.lastPointTemporary && e.pop(), e.push(o), n.lastPointTemporary = !0, t.moveDrawing())
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE), n.setInputAction(function(r) {
// t.inProgress = !1, n.destroy(), i.drawHandler = null, e.pop(), t.stopDrawing(), t.startEditing()
// }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.drawHandler = n, n
// },
// mars3d.drawing.EventControl.prototype.createDrawPolygonHandler = function(t, e) {
// var i = this;
// t.inProgress = !0;
// var n = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
// return n.lastPointTemporary = !1, n.setInputAction(function(r) {
// var o = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, r.position);
// if (o) {
// if (n.lastPointTemporary && e.pop(), e.push(o), t.attribute.style.extrudedHeight) {
// var a = mars3d.drawing.utils.getMaxHeightForPositions(e);
// t.polygon.extrudedHeight = a + Number(t.attribute.style.extrudedHeight)
// }
// n.lastPointTemporary = !1, t.changeDrawing()
// }
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), n.setInputAction(function(r) {
// if (r.endPosition) {
// var o = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, r.endPosition);
// if (o) {
// if (n.lastPointTemporary && e.pop(), e.push(o), t.attribute.style.extrudedHeight) {
// var a = mars3d.drawing.utils.getMaxHeightForPositions(e);
// t.polygon.extrudedHeight = a + Number(t.attribute.style.extrudedHeight)
// }
// n.lastPointTemporary = !0, t.moveDrawing()
// }
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE), n.setInputAction(function(r) {
// t.inProgress = !1, n.destroy(), i.drawHandler = null, e.pop(), t.stopDrawing(), t.startEditing()
// }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.drawHandler = n, n
// }, mars3d.drawing.EventControl.prototype.createTwoPointsModelHandler = function(t, e) {
// var i = this;
// t.inProgress = !0;
// var n = [],
// r = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
// return r.lastPointTemporary = !1, r.setInputAction(function(o) {
// var a = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, o.position);
// if (a) {
// if (r.lastPointTemporary && n.pop(), n.push(a), 1 == n.length && t.attribute.style.extrudedHeight) {
// var s = Number(Cesium.Cartographic.fromCartesian(a).height).toFixed(2);
// t.rectangle.height = Number(s), t.rectangle.extrudedHeight = Number(s) + Number(t.attribute.style.extrudedHeight), t.attribute.style.height = Number(s)
// }
// if (2 == n.length) {
// var l = Cesium.Rectangle.fromCartesianArray(n);
// e.setValue(l)
// }
// r.lastPointTemporary = !1, t.changeDrawing(), 2 == n.length && (t.inProgress = !1, r.destroy(), i.drawHandler = null, t.stopDrawing(), t.startEditing())
// }
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), r.setInputAction(function(o) {
// if (o.endPosition) {
// var a = mars3d.latlng.getCurrentMousePosition(i.viewer.scene, o.endPosition);
// if (a) {
// if (r.lastPointTemporary && n.pop(), n.push(a), 2 == n.length) {
// var s = Cesium.Rectangle.fromCartesianArray(n);
// e.setValue(s)
// }
// r.lastPointTemporary = !0, t.moveDrawing()
// }
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE), this.drawHandler = r, r
// }, mars3d.drawing.EventControl.prototype.createDrawWallHandler = function(t, e, i, n) {
// var r = this;
// t.inProgress = !0;
// var o = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
// return o.lastPointTemporary = !1, o.setInputAction(function(a) {
// var s = mars3d.latlng.getCurrentMousePosition(r.viewer.scene, a.position);
// if (s) {
// o.lastPointTemporary && (e.pop(), i.pop(), n.pop()), e.push(s);
// var l = Cesium.Cartographic.fromCartesian(s),
// u = Number(l.height).toFixed(2),
// c = Number(u) + Number(t.attribute.style.extrudedHeight);
// i.push(u), n.push(c), o.lastPointTemporary = !1, t.changeDrawing()
// }
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), o.setInputAction(function(a) {
// if (a.endPosition) {
// var s = mars3d.latlng.getCurrentMousePosition(r.viewer.scene, a.endPosition);
// if (s) {
// o.lastPointTemporary && (e.pop(), i.pop(), n.pop()), e.push(s);
// var l = Cesium.Cartographic.fromCartesian(s),
// u = Number(l.height).toFixed(2),
// c = Number(u) + Number(t.attribute.style.extrudedHeight);
// i.push(u), n.push(c), o.lastPointTemporary = !0, t.moveDrawing()
// }
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE), o.setInputAction(function(a) {
// t.inProgress = !1, o.destroy(), r.drawHandler = null, e.pop(), i.pop(), n.pop(), t.stopDrawing(), t.startEditing()
// }, Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK), this.drawHandler = o, o
// }, mars3d.drawing.EventControl.prototype.destroyDrawHandler = function() {
// this.drawHandler && (this.drawHandler.destroy(), this.drawHandler = null)
// }, mars3d.drawing.EventControl.prototype.createEditSelectHandler = function(t) {
// var e = this,
// i = new Cesium.ScreenSpaceEventHandler(this.viewer.canvas);
// i.setInputAction(function(i) {
// var n = e.viewer.scene.pick(i.position),
// r = null;
// if (Cesium.defined(n)) {
// var o = Cesium.defaultValue(n.id, n.primitive.id);
// if (o instanceof Cesium.Entity) {
// var a = Cesium.defaultValue(o.inProgress, !1);
// a || (r = o)
// }
// }
// t(r)
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK), this.selectHandler = i
// }, mars3d.drawing.EventControl.prototype.createEditDraggerHandler = function() {
// var t = new Cesium.ScreenSpaceEventHandler(this.viewer.canvas);
// t.dragger = null;
// var e = this;
// t.setInputAction(function(i) {
// var n = e.viewer.scene.pick(i.position);
// if (Cesium.defined(n)) {
// var r = n.id;
// r && Cesium.defaultValue(r._isDragger, !1) && (r.billboard && (r.billboard.scale_src = r.billboard.scale._value, r.billboard.scale._value = 1.2 * r.billboard.scale_src), t.dragger = r, e.viewer.scene.screenSpaceCameraController.enableRotate = !1, e.viewer.scene.screenSpaceCameraController.enableTilt = !1, e.viewer.scene.screenSpaceCameraController.enableTranslate = !1)
// }
// }, Cesium.ScreenSpaceEventType.LEFT_DOWN), t.setInputAction(function(i) {
// var n = e.viewer.scene.pick(i.position);
// if (Cesium.defined(n)) {
// var r = n.id;
// r && Cesium.defaultValue(r._isDragger, !1) && (r.billboard && (r.billboard.scale_src = r.billboard.scale._value, r.billboard.scale._value = 1.2 * r.billboard.scale_src), t.dragger = r, e.viewer.scene.screenSpaceCameraController.enableRotate = !1, e.viewer.scene.screenSpaceCameraController.enableTilt = !1, e.viewer.scene.screenSpaceCameraController.enableTranslate = !1)
// }
// }, Cesium.ScreenSpaceEventType.LEFT_DOWN, Cesium.KeyboardEventModifier.CTRL), t.setInputAction(function(n) {
// if (t.dragger) {
// if (t.dragger.horizontal) {
// var r;
// if (t.dragger.model) {
// var o = e.viewer.scene,
// a = o.pick(n.endPosition);
// if (Cesium.defined(a) && a.id == t.dragger) {
// var s = o.camera.getPickRay(n.endPosition);
// r = o.globe.pick(s, o)
// }
// }
// null == r && (r = mars3d.latlng.getCurrentMousePosition(e.viewer.scene, n.endPosition)), r && (t.dragger.position = r, t.dragger.onDrag && t.dragger.onDrag(t.dragger, r))
// }
// if (t.dragger.vertical) {
// var l = n.endPosition.y - n.startPosition.y,
// u = t.dragger.position._value,
// c = new Cesium.EllipsoidTangentPlane(u);
// i.center = u, i.radius = 1;
// var h = e.viewer.scene.frameState.camera.getPixelSize(i, e.viewer.scene.frameState.context.drawingBufferWidth, e.viewer.scene.frameState.context.drawingBufferHeight),
// d = new Cesium.Cartesian3;
// Cesium.Cartesian3.multiplyByScalar(c.zAxis, -l * h, d);
// var p = Cesium.Cartesian3.clone(u);
// Cesium.Cartesian3.add(u, d, p), t.dragger.position = p, t.dragger.onDrag && t.dragger.onDrag(t.dragger, p)
// }
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
// var i = new Cesium.BoundingSphere;
// t.setInputAction(function(n) {
// if (t.dragger && t.dragger.verticalCtrl) {
// var r = n.endPosition.y - n.startPosition.y,
// o = t.dragger.position._value,
// a = new Cesium.EllipsoidTangentPlane(o);
// i.center = o, i.radius = 1;
// var s = e.viewer.scene.frameState.camera.getPixelSize(i, e.viewer.scene.frameState.context.drawingBufferWidth, e.viewer.scene.frameState.context.drawingBufferHeight),
// l = new Cesium.Cartesian3;
// Cesium.Cartesian3.multiplyByScalar(a.zAxis, -r * s, l);
// var u = Cesium.Cartesian3.clone(o);
// Cesium.Cartesian3.add(o, l, u), t.dragger.position = u, t.dragger.onDrag && t.dragger.onDrag(t.dragger, u)
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE, Cesium.KeyboardEventModifier.CTRL), t.setInputAction(function() {
// t.dragger && (t.dragger.billboard && (t.dragger.billboard.scale._value = t.dragger.billboard.scale_src), t.dragger = null, e.viewer.scene.screenSpaceCameraController.enableRotate = !0, e.viewer.scene.screenSpaceCameraController.enableTilt = !0, e.viewer.scene.screenSpaceCameraController.enableTranslate = !0)
// }, Cesium.ScreenSpaceEventType.LEFT_UP), t.setInputAction(function() {
// t.dragger && (t.dragger.billboard && (t.dragger.billboard.scale._value = t.dragger.billboard.scale_src), t.dragger = null, e.viewer.scene.screenSpaceCameraController.enableRotate = !0, e.viewer.scene.screenSpaceCameraController.enableTilt = !0, e.viewer.scene.screenSpaceCameraController.enableTranslate = !0)
// }, Cesium.ScreenSpaceEventType.LEFT_UP, Cesium.KeyboardEventModifier.CTRL), this.draggerHandler = t
// }, mars3d.drawing.EventControl.prototype.destroyEditHandler = function() {
// this.selectHandler && (this.selectHandler.destroy(), this.selectHandler = null), this.draggerHandler && (this.draggerHandler.destroy(), this.draggerHandler = null)
// }, mars3d.Draw = function(t) {
// function e(e) {
// L = e, e ? (k.createEditSelectHandler(function(e) {
// x && x.inProgress || (e !== x ? (x && x.stopEditing && (x.stopEditing(), x = null), x = e, x && x.startEditing && x.startEditing()) : t.onStopEditing && "function" == typeof t.onStopEditing && t.onStopEditing())
// }), k.createEditDraggerHandler()) : (n(), k.destroyEditHandler())
// }
// function i(t) {
// if (n(), null == t || null == t.type) throw "请传入需要绘制的类型参数";
// t.style = t.style || {}, t.attr = t.attr || {};
// var e = t.type;
// if (null == b[e]) throw "传入的[" + e + "]类型参数有误";
// var i = b[e].startDraw(w, t);
// switch (e) {
// case "label":
// case "point":
// case "billboard":
// case "model":
// case "ellipse":
// case "ellipsoid":
// k.createDrawPointHandler(i);
// break;
// case "polyline":
// case "polylineVolume":
// k.createDrawPolylineHandler(i, b[e].getPositions(i));
// break;
// case "polygon":
// k.createDrawPolygonHandler(i, b[e].getPositions(i));
// break;
// case "rectangle":
// case "extrudedRectangle":
// case "measureHeight":
// k.createTwoPointsModelHandler(i, b[e].getPositions(i));
// break;
// case "wall":
// var r = b[e].getPositions(i),
// o = b[e].getMinimumHeights(i),
// s = b[e].getMaximumHeights(i);
// k.createDrawWallHandler(i, r, o, s)
// }
// return a(i), E.push(i), i.startDrawing(), x = i, i
// }
// function n() {
// return k.destroyDrawHandler(), x && x.inProgress && (x.stopDrawing(), w.entities.remove(x), y(E, x)), x && (x.stopEditing(), x = null), this
// }
// function r(t) {
// if (null != x && null != t) {
// t.style = t.style || {}, t.attr = t.attr || {};
// var e = x.attribute.type;
// return b[e].attribute2Entity(t, x[e]), "model" == e && b[e].attribute2Model(t, x), x.attribute = t, "ellipse" != e && "polygon" != e && "wall" != e && "rectangle" != e || x.editor.updateDraggers(), x
// }
// }
// function o(t) {
// if (null != x && null != t) {
// var e = x.attribute.type;
// return b[e].setPositions(x, t), x.editor.updateDraggers(), x
// }
// }
// function a(e) {
// e.startDrawing = function() {
// $(".cesium-viewer").css("cursor", "crosshair");
// var e = this;
// t.onStartDrawing && "function" == typeof t.onStartDrawing && t.onStartDrawing(e)
// }, e.changeDrawing = function() {
// var e = this;
// t.onChangeDrawing && "function" == typeof t.onChangeDrawing && t.onChangeDrawing(e)
// }, e.moveDrawing = function() {
// var e = this;
// t.onMoveDrawing && "function" == typeof t.onMoveDrawing && t.onMoveDrawing(e)
// }, e.stopDrawing = function() {
// $(".cesium-viewer").css("cursor", "");
// var e = this;
// t.onStopDrawing && "function" == typeof t.onStopDrawing && t.onStopDrawing(e)
// }, e.startEditing = function() {
// if (L) {
// var e = this;
// if (null == e.editor) {
// var i = e.attribute.type;
// e.editor = b[i].getEditor(w, e, {
// dragIcon: C
// })
// }
// t.onStartEditing && "function" == typeof t.onStartEditing && t.onStartEditing(e)
// }
// }, e.stopEditing = function() {
// var e = this;
// e.editor && (e.editor.destroy(), e.editor = null), t.onStopEditing && "function" == typeof t.onStopEditing && t.onStopEditing()
// }, e.changeEditing = function() {
// var e = this;
// t.onChangeEditing && "function" == typeof t.onChangeEditing && t.onChangeEditing(e)
// }, e.updatePositions = function(t) {
// var e = this,
// i = e.attribute.type;
// if ("ellipse" == i) {
// var n = Cesium.Cartographic.fromCartesian(t).height;
// if (e.attribute.style.height = Number(Number(n).toFixed(2)), e.ellipse.height._value = Number(Number(n).toFixed(2)), e.attribute.style.extrudedHeight) {
// var r = Number(n) + Number(e.attribute.style.extrudedHeight);
// e.ellipse.extrudedHeight._value = Number(r.toFixed(2)), e.attribute.style.extrudedHeight = Number(r.toFixed(2))
// }
// }
// b[i].setPositions(x, t)
// }
// }
// function s(t) {
// null != t && (t.stopEditing(), y(E, t), w.entities.remove(t))
// }
// function l() {
// x && (x.stopEditing(), y(E, x), w.entities.remove(x), x = null)
// }
// function u() {
// n();
// for (var t = 0; t < E.length; t++) {
// var e = E[t];
// e.stopEditing(), w.entities.remove(e)
// }
// E = []
// }
// function c(t) {
// var e = t.attribute.type,
// i = b[e].getCoordinates(t);
// return i
// }
// function h(t) {
// var e = t.attribute.type,
// i = b[e].getPositions(t);
// return i
// }
// function d(t, e) {
// var i = t.attribute.type,
// e = b[i].setPositions(t, e)
// }
// function p() {
// return E.length > 0
// }
// function f() {
// return E
// }
// function m() {
// if (0 == E.length) return "";
// for (var t = [], e = 0; e < E.length; e++) {
// var i = E[e],
// n = i.attribute.type,
// r = b[n].toGeoJSON(i);
// t.push(r)
// }
// var r = {
// type: "FeatureCollection",
// features: t
// };
// return JSON.stringify(r)
// }
// function g(t, e, i) {
// var n = t;
// try {
// v(t) && (n = JSON.parse(t))
// } catch (r) {
// return void haoutil.alert(r.name + ": " + r.message + " \n请确认json文件格式正确!!!")
// }
// e && u();
// for (var o = n.features, s = 0; s < o.length; s++) {
// var l = o[s],
// c = l.properties.type,
// h = b[c].startDraw(w, l.properties),
// d = mars3d.drawing.utils.getPositionsFromJson(l.geometry);
// b[c].setPositions(h, d), a(h), E.push(h)
// }
// return i && w.flyTo(E, {
// duration: 3
// }), E
// }
// function v(t) {
// return "string" == typeof t && t.constructor == String
// }
// function _(t, e, i) {
// var n = t;
// try {
// v(t) && (n = JSON.parse(t))
// } catch (r) {
// return void haoutil.alert(r.name + ": " + r.message + " \n请确认json文件格式正确!!!")
// }
// if (!(n instanceof Array)) return void haoutil.alert("请确认json文件格式正确!!!");
// i && u();
// for (var o = 0; o < n.length; o++) {
// var s = n[o];
// if (!s.x || !s.y) return void haoutil.alert(r.name + ": " + r.message + " \n请确认json文件格式正确!!!");
// var l = {
// id: s.id || s.ID || "",
// name: s.name || s.NAME || "",
// remark: s.remark || s.REMA || ""
// },
// c = {
// type: e.type || "billboard",
// attr: l,
// style: e.style
// },
// h = Cesium.Cartesian3.fromDegrees(s.x, s.y, s.z || 0),
// d = b[c.type].startDraw(w, c);
// b[c.type].setPositions(d, h), a(d), E.push(d)
// }
// return E
// }
// function y(t, e) {
// for (var i = 0; i < t.length; i++) if (t[i] == e) {
// t.splice(i, 1);
// break
// }
// }
// var b = {
// billboard: mars3d.drawing.BillboardControl,
// label: mars3d.drawing.LabelControl,
// ellipse: mars3d.drawing.EllipseControl,
// polyline: mars3d.drawing.PolylineControl,
// polylineVolume: mars3d.drawing.PolylineVolumeControl,
// polygon: mars3d.drawing.PolygonControl,
// ellipsoid: mars3d.drawing.EllipsoidControl,
// wall: mars3d.drawing.WallControl,
// point: mars3d.drawing.PointControl,
// rectangle: mars3d.drawing.RectangleControl,
// model: mars3d.drawing.ModelControl
// },
// w = t.viewer,
// C = (w.scene, t.dragIcon),
// x = null,
// E = [],
// k = new mars3d.drawing.EventControl(w),
// L = t.hasEdit;
// return e(t.hasEdit), {
// startDraw: i,
// stopDraw: n,
// updateAttribute: r,
// updateGeometry: o,
// toGeoJSON: m,
// jsonToEntity: g,
// markersInfoToEntity: _,
// deleteEntity: s,
// deleteCurrentEntity: l,
// deleteAll: u,
// hasDraw: p,
// hasEdit: e,
// getEntitys: f,
// getCoordinates: c,
// getPositions: h,
// setPositions: d
// }
// }, mars3d.Measure = function(t) {
// function e(t) {
// // debugger;
// r(), h = "length", t = t || {}, t.type = h, t.hasOwnProperty("terrain") || (t.terrain = !0), p.start(t)
// }
// function i(t) {
// r(), h = "area", t = t || {}, t.type = h, f.start(t)
// }
// function n(t) {
// r(), t = t || {}, t.hasOwnProperty("isSuper") && !t.isSuper ? (h = "height", t.type = h, m.start(t)) : (h = "super_height", t.type = h, g.start(t))
// }
// function r() {
// p.clearLastNoEnd(), f.clearLastNoEnd(), m.clearLastNoEnd(), g.clearLastNoEnd(), d.stopDraw()
// }
// function o() {
// h = "", r();
// for (var t = d.getEntitys(), e = 0; e < t.length; e++) {
// var i = t[e];
// if (i._totalLable && (u.entities.remove(i._totalLable), delete i._totalLable), i._arrLables) {
// var n = i._arrLables;
// if (n && n.length > 0) for (var e in n) u.entities.remove(n[e]);
// delete i._arrLables
// }
// }
// t = [];
// var o = u.entities.values;
// for (var e in o) {
// var i = o[e];
// i.label && i.isMarsMeasureLabel && t.push(i)
// }
// for (var e = 0; e < t.length; e++) {
// var i = t[e];
// u.entities.remove(i)
// }
// d.deleteAll()
// }
// function a(t, e) {
// var i = u.entities.values;
// for (var n in i) {
// var r = i[n];
// if (r.label && r.isMarsMeasureLabel && r.attribute && r.attribute.value) {
// if (r.attribute.type != t) continue;
// "area" == t ? r.label.text._value = (r.attribute.textEx || "") + s(r.attribute.value, e) : r._label.text._value = (r.attribute.textEx || "") + l(r.attribute.value, e)
// }
// }
// }
// function s(t, e) {
// if (null == t) return "";
// null != e && "auto" != e || (e = t < 1e6 ? "m" : "km");
// var i = "";
// switch (e) {
// default:
// case "m":
// i = t.toFixed(2) + " 平方米";
// break;
// case "km":
// i = (t / 1e6).toFixed(2) + " 平方公里";
// break;
// case "mu":
// i = (.0015 * t).toFixed(2) + " 亩";
// break;
// case "ha":
// i = (1e-4 * t).toFixed(2) + " 公顷"
// }
// return i
// }
// function l(t, e) {
// // debugger;
// if (null == t) return "";
// null != e && "auto" != e || (e = t < 1e3 ? "m" : "km");
// var i = "";
// switch (e) {
// default:
// case "m":
// i = t.toFixed(2) + " 米";
// break;
// case "km":
// i = (.001 * t).toFixed(2) + " 公里";
// break;
// case "mile":
// i = (54e-5 * t).toFixed(2) + " 海里";
// break;
// case "zhang":
// i = (.3 * t).toFixed(2) + " 丈"
// }
// return i
// }
// var u = t.viewer,
// c = t.font || "16px SimHei",
// h = "",
// d = new mars3d.Draw({
// viewer: u,
// hasEdit: !1,
// onChangeDrawing: function(t) {
// switch (h) {
// case "length":
// p.showAddPointLength(t);
// break;
// case "area":
// f.showAddPointLength(t);
// break;
// case "height":
// m.showAddPointLength(t);
// break;
// case "super_height":
// g.showAddPointLength(t)
// }
// },
// onMoveDrawing: function(t) {
// switch (h) {
// case "length":
// p.showMoveDrawing(t);
// break;
// case "area":
// f.showMoveDrawing(t);
// break;
// case "height":
// m.showMoveDrawing(t);
// break;
// case "super_height":
// g.showMoveDrawing(t)
// }
// },
// onStopDrawing: function(t) {
// switch (h) {
// case "length":
// p.showDrawEnd(t);
// break;
// case "area":
// f.showDrawEnd(t);
// break;
// case "height":
// m.showDrawEnd(t);
// break;
// case "super_height":
// g.showDrawEnd(t)
// }
// }
// }),
// p = {
// options: null,
// arrLables: [],
// totalLable: null,
// clearLastNoEnd: function() {
// if (null != this.totalLable && u.entities.remove(this.totalLable), this.arrLables && this.arrLables.length > 0) {
// var t = this.arrLables;
// if (t && t.length > 0) for (var e in t) u.entities.remove(t[e])
// }
// this.totalLable = null, this.arrLables = []
// },
// start: function(t) {
// // debugger;
// this.options = t, this.totalLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// eyeOffset: new Cesium.Cartesian3(0, 0, (-20)),
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// font: c,
// show: !1
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }), this.arrLables = [], d.startDraw({
// type: "polyline",
// style: {
// color: "#ffff00",
// width: 3
// }
// })
// },
// showAddPointLength: function(t) {
// var e = d.getPositions(t),
// i = u.entities.add({
// position: e[e.length - 1],
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// eyeOffset: new Cesium.Cartesian3(0, 0, (-20)),
// font: c,
// show: !0
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// });
// if (1 == e.length) i.label.text = "起点";
// else {
// var n = this.getLength(e),
// r = l(n, this.options.unit);
// i.label.text = r, i.attribute.value = n, this.getLength([e[e.length - 2], e[e.length - 1]]) < 5 && (i.show = !1)
// }
// this.arrLables.push(i)
// },
// showMoveDrawing: function(t) {
// var e = d.getPositions(t);
// if (!(e.length < 2)) {
// var i = this.getLength(e),
// n = l(i, this.options.unit);
// this.totalLable.position = e[e.length - 1], this.totalLable.label.text = "全长:" + n, this.totalLable.label.show = !0, this.totalLable.attribute.value = i, this.totalLable.attribute.textEx = "全长:", this.options.calback && this.options.calback(n, i)
// }
// },
// showDrawEnd: function(t) {
// var e = d.getPositions(t),
// i = this.arrLables.length - e.length;
// if (i >= 0) {
// for (var n = this.arrLables.length - 1; n >= e.length - 1; n--) u.entities.remove(this.arrLables[n]);
// this.arrLables.splice(e.length - 1, i + 1)
// }
// t._totalLable = this.totalLable, t._arrLables = this.arrLables, this.totalLable = null, this.arrLables = [], this.updateLengthForTerrain(t)
// },
// updateLengthForTerrain: function(t) {
// function e() {
// s++;
// var h = [n[s - 1], n[s]];
// mars3d.drawing.utils.terrainPolyline({
// viewer: u,
// positions: h,
// calback: function(u, d) {
// if (c = d ? 1 == s ? c.concat(h) : c.concat([n[s]]) : c.concat(u), s >= n.length - 1) {
// if (t.polyline.positions.setValue(c), o) {
// var p = i.getLength(c),
// f = l(p, a);
// o.label.text = "全长:" + f, o.attribute.value = p, i.options.calback && i.options.calback(f, p)
// }
// } else {
// var p = i.getLength(u),
// f = l(p, a),
// m = r[s];
// m.label.text = f, m.attribute.value = p, e()
// }
// }
// })
// }
// if (this.options.terrain && null != t.polyline) {
// var i = this,
// n = t.polyline.positions.getValue(),
// r = t._arrLables,
// o = t._totalLable,
// a = o && o.unit,
// s = 0,
// c = [];
// e()
// }
// },
// getLength: function(t) {
// for (var e = 0, i = 0, n = t.length - 1; i < n; i++) e += Cesium.Cartesian3.distance(t[i], t[i + 1]);
// return e
// }
// },
// f = {
// options: null,
// totalLable: null,
// clearLastNoEnd: function() {
// null != this.totalLable && u.entities.remove(this.totalLable), this.totalLable = null
// },
// start: function(t) {
// this.options = t,
// this.totalLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
// outlineWidth: 3,
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// eyeOffset: new Cesium.Cartesian3(0, 0, (-20)),
// font: c,
// show: !1
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }),
// d.startDraw({
// type: "polygon",
// style: {
// color: "#ffff00",
// outline: !0,
// outlineColor: "#ffff00",
// outlineWidth: 4,
// opacity: .4
// }
// })
// },
// showAddPointLength: function(t) {},
// showMoveDrawing: function(t) {
// var e = d.getPositions(t);
// if (!(e.length < 3)) {
// var i = mars3d.drawing.PolygonControl.toGeoJSON(t),
// n = turf.area(i),
// r = s(n, this.options.unit),
// o = turf.centerOfMass(i),
// a = mars3d.drawing.utils.getMaxHeightForPositions(e),
// l = Cesium.Cartesian3.fromDegrees(o.geometry.coordinates[0], o.geometry.coordinates[1], a + 1);
// this.totalLable.position = l, this.totalLable.label.text = "面积:" + r, this.totalLable.label.show = !0, this.totalLable.attribute.value = n, this.totalLable.attribute.textEx = "面积:", this.options.calback && this.options.calback(r, n)
// }
// },
// showDrawEnd: function(t) {
// if (null != t.polygon) {
// var e = t.polygon.hierarchy.getValue();
// $.each(e, function(t, e) {
// e.z = e.z + 1
// }), t._totalLable = this.totalLable, this.totalLable = null
// }
// }
// },
// m = {
// options: null,
// totalLable: null,
// clearLastNoEnd: function() {
// null != this.totalLable && u.entities.remove(this.totalLable), this.totalLable = null
// },
// start: function(t) {
// this.options = t, this.totalLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// font: c,
// show: !1
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }), d.startDraw({
// type: "polyline",
// minMaxPoints: {
// min: 2,
// max: 2,
// isSuper: !1
// },
// style: {
// color: "#ffff00",
// width: 3
// }
// })
// },
// showAddPointLength: function(t) {},
// showMoveDrawing: function(t) {
// var e = d.getPositions(t);
// if (!(e.length < 2)) {
// var i = Cesium.Cartographic.fromCartesian(e[0]),
// n = Cesium.Cartographic.fromCartesian(e[1]),
// r = Math.abs(n.height - i.height),
// o = l(r, this.options.unit);
// this.totalLable.position = mars3d.drawing.utils.getMidPosition(e[0], e[1]), this.totalLable.label.text = "高度差:" + o, this.totalLable.label.show = !0, this.totalLable.attribute.value = r, this.totalLable.attribute.textEx = "高度差:", this.options.calback && this.options.calback(o, r)
// }
// },
// showDrawEnd: function(t) {
// t._totalLable = this.totalLable, this.totalLable = null
// }
// },
// g = {
// options: null,
// totalLable: null,
// xLable: null,
// hLable: null,
// clearLastNoEnd: function() {
// null != this.totalLable && u.entities.remove(this.totalLable), null != this.xLable && u.entities.remove(this.xLable), null != this.hLable && u.entities.remove(this.hLable), this.totalLable = null, this.xLable = null, this.hLable = null
// },
// start: function(t) {
// this.options = t, this.totalLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// font: c,
// show: !1,
// pixelOffset: new Cesium.Cartesian2((-40), 0)
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }), this.xLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// font: c,
// show: !1,
// pixelOffset: new Cesium.Cartesian2((-40), 0)
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }), this.hLable = u.entities.add({
// label: {
// style: Cesium.LabelStyle.FILL_AND_OUTLINE,
// fillColor: Cesium.Color.AZURE,
// outlineColor: Cesium.Color.BLACK,
// outlineWidth: 3,
// font: c,
// show: !1,
// pixelOffset: new Cesium.Cartesian2((-40), 0)
// },
// isMarsMeasureLabel: !0,
// attribute: {
// unit: this.options.unit,
// type: this.options.type
// }
// }), d.startDraw({
// type: "polyline",
// minMaxPoints: {
// min: 2,
// max: 2,
// isSuper: !0
// },
// style: {
// color: "#ffff00",
// width: 3
// }
// })
// },
// showAddPointLength: function(t) {
// var e = d.getPositions(t);
// if (4 == e.length) {
// var i = e[3].clone();
// e.pop(), e.pop(), e.pop(), e.push(i)
// }
// if (2 == e.length) {
// var n = mars3d.drawing.utils.getZHeightPosition(e[0], e[1]),
// r = mars3d.drawing.utils.getHDistance(e[0], e[1]);
// r > 3 && (e.push(n), e.push(e[0]))
// }
// this.showSuperHeight(e)
// },
// showMoveDrawing: function(t) {
// var e = d.getPositions(t);
// if (4 == e.length) {
// var i = e[3].clone();
// e.pop(), e.pop(), e.pop(), e.push(i)
// }
// if (2 == e.length) {
// var n = mars3d.drawing.utils.getZHeightPosition(e[0], e[1]),
// r = mars3d.drawing.utils.getHDistance(e[0], e[1]);
// r > 3 && (e.push(n), e.push(e[0]))
// }
// this.showSuperHeight(e)
// },
// showDrawEnd: function(t) {
// t._arrLables = [this.totalLable, this.hLable, this.xLable], this.totalLable = null, this.hLable = null, this.xLable = null
// },
// showSuperHeight: function(t) {
// var e, i, n, r;
// if (4 == t.length) {
// var o, a, s = mars3d.drawing.utils.getMidPosition(t[0], t[1]),
// u = Cesium.Cartographic.fromCartesian(t[0]),
// c = Cesium.Cartographic.fromCartesian(t[1]),
// h = Cesium.Cartographic.fromCartesian(t[2]);
// tempHeight = c.height - h.height, r = c.height - u.height, n = Cesium.Cartesian3.distance(t[0], t[1]), r > -1 && r < 1 ? (a = t[1], this.updateSuperHeightLabel(this.totalLable, a, "高度差", r), this.updateSuperHeightLabel(this.hLable, s, "长度", n)) : (tempHeight > -.1 && tempHeight < .1 ? (o = mars3d.drawing.utils.getMidPosition(t[2], t[1]), a = mars3d.drawing.utils.getMidPosition(t[2], t[3]), i = Cesium.Cartesian3.distance(t[1], t[2]), e = Cesium.Cartesian3.distance(t[3], t[2])) : (a = mars3d.drawing.utils.getMidPosition(t[2], t[1]), o = mars3d.drawing.utils.getMidPosition(t[2], t[3]), i = Cesium.Cartesian3.distance(t[3], t[2]), e = Cesium.Cartesian3.distance(t[1], t[2])), this.updateSuperHeightLabel(this.totalLable, a, "高度差", e), this.updateSuperHeightLabel(this.xLable, o, "水平距离", i), this.updateSuperHeightLabel(this.hLable, s, "长度", n))
// } else if (2 == t.length) {
// e = Cesium.Cartesian3.distance(t[1], t[0]);
// var a = mars3d.drawing.utils.getMidPosition(t[0], t[1]);
// xLable.label.show && (xLable.label.show = !1, hLable.label.show = !1), this.updateSuperHeightLabel(this.totalLable, a, "高度差", e)
// }
// var d = l(e, this.options.unit);
// this.options.calback && this.options.calback(d, e)
// },
// updateSuperHeightLabel: function(t, e, i, n) {
// null != t && (t.position = e, t.label.text = i + ":" + l(n, this.options.unit), t.label.show = !0, t.attribute.value = n, t.attribute.textEx = i + ":")
// }
// };
// return {
// measuerLength: e,
// measureHeight: n,
// measureArea: i,
// updateUnit: a,
// clearMeasure: o,
// formatArea: s,
// formatLength: l
// }
// };