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b,GAAuB,EAAS,WACzD,EAAO,OAAO,GAEd,EAAoB,QAAE,aAAa,EAAY,EAE5D,CACF,GAAG,MACI,CACT,CAgBA,KAAA,CAAM,GACJ,GAAI,KAAK,KAAM,CACb,MAAM,EAAS,KAAK,YAChB,SAAwC,EAAO,YACjD,KAAK,KAAK,YAAY,EAAQ,EAElC,CACA,OAAO,IACT,EAEF,EAAkB,MAAM,mBAAqB,GAG7C,EAAkB,UAAU,SAAS,iBAAkB,IAiQvD,EAAoB,QAAE,KAAO,GAE7B,EAAkB,KAAO,GACzB,EAAkB,IAAI,QAAQ,2DAE9B,EAAQ,mBAAqB,GAC7B,EAAQ,mBAAqB,GAC7B,EAAQ,iBAAmB,GAC3B,EAAQ,gBAAkB,GAE1B,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GAEvD","file":"/npm/mars2d-esri@3.3.7/mars2d-esri.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/mars2d-esri@3.3.7/mars2d-esri.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Mars2D平台插件,ArcGIS Server功能支持插件  mars2d-esri\n *\n * 版本信息：v3.3.7\n * 编译日期：2025-12-31 16:28\n * 版权所有：Copyright by 火星科技  http://mars2d.cn\n * 使用单位：免费公开版 ，2025-01-23\n */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, (window.L || require('leaflet')), (window.mars2d || require('mars2d'))) :\n  typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'mars2d'], factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global[\"mars2d-esri\"] = {}, global.L, global.mars2d));\n})(this, (function (exports, L, mars2d) { 'use strict';\n\n  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n  function _interopNamespace(e) {\n    if (e && e.__esModule) return e;\n    var n = Object.create(null);\n    if (e) {\n      Object.keys(e).forEach(function (k) {\n        if (k !== 'default') {\n          var d = Object.getOwnPropertyDescriptor(e, k);\n          Object.defineProperty(n, k, d.get ? d : {\n            enumerable: true,\n            get: function () { return e[k]; }\n          });\n        }\n      });\n    }\n    n[\"default\"] = e;\n    return n;\n  }\n\n  var L__default = /*#__PURE__*/_interopDefaultLegacy(L);\n  var mars2d__namespace = /*#__PURE__*/_interopNamespace(mars2d);\n\n  var name = \"esri-leaflet\";\n  var description = \"Leaflet plugins for consuming ArcGIS Online and ArcGIS Server services.\";\n  var version$2 = \"3.0.18\";\n  var author = \"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)\";\n  var bugs = {\n  \turl: \"https://github.com/esri/esri-leaflet/issues\"\n  };\n  var contributors = [\n  \t\"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)\",\n  \t\"John Gravois (https://johngravois.com)\",\n  \t\"Gavin Rehkemper <grehkemper@esri.com> (https://gavinr.com)\",\n  \t\"Jacob Wasilkowski (https://jwasilgeo.github.io)\"\n  ];\n  var dependencies = {\n  \t\"@terraformer/arcgis\": \"^2.1.0\",\n  \t\"tiny-binary-search\": \"^1.0.3\"\n  };\n  var devDependencies = {\n  \t\"@rollup/plugin-json\": \"^6.0.0\",\n  \t\"@rollup/plugin-node-resolve\": \"^15.0.1\",\n  \t\"@rollup/plugin-terser\": \"^0.3.0\",\n  \tchai: \"4.3.7\",\n  \t\"chokidar-cli\": \"^3.0.0\",\n  \teslint: \"^9.24.0\",\n  \t\"eslint-config-mourner\": \"^4.0.2\",\n  \t\"eslint-config-prettier\": \"^10.1.2\",\n  \t\"eslint-plugin-import-x\": \"^4.10.2\",\n  \t\"gh-release\": \"^7.0.1\",\n  \t\"highlight.js\": \"^11.7.0\",\n  \t\"http-server\": \"^14.1.1\",\n  \thusky: \"^1.1.1\",\n  \tkarma: \"^6.4.1\",\n  \t\"karma-chrome-launcher\": \"^3.1.1\",\n  \t\"karma-coverage\": \"^2.2.0\",\n  \t\"karma-edgium-launcher\": \"github:matracey/karma-edgium-launcher\",\n  \t\"karma-firefox-launcher\": \"^2.1.2\",\n  \t\"karma-mocha\": \"^2.0.1\",\n  \t\"karma-mocha-reporter\": \"^2.2.5\",\n  \t\"karma-safari-launcher\": \"~1.0.0\",\n  \t\"karma-sinon-chai\": \"^2.0.2\",\n  \t\"karma-sourcemap-loader\": \"^0.3.8\",\n  \tleaflet: \"^1.6.0\",\n  \tmkdirp: \"^1.0.4\",\n  \tmocha: \"^10.2.0\",\n  \t\"npm-run-all\": \"^4.1.5\",\n  \tprettier: \"3.5.3\",\n  \trollup: \"^2.79.1\",\n  \tsinon: \"^15.0.1\",\n  \t\"sinon-chai\": \"3.7.0\"\n  };\n  var files = [\n  \t\"src/**/*.js\",\n  \t\"dist/esri-leaflet.js\",\n  \t\"dist/esri-leaflet.js.map\",\n  \t\"dist/esri-leaflet-debug.js.map\",\n  \t\"dist/siteData.json\",\n  \t\"profiles/*.js\"\n  ];\n  var homepage = \"https://developers.arcgis.com/esri-leaflet/\";\n  var module = \"src/EsriLeaflet.js\";\n  var jspm = {\n  \tregistry: \"npm\",\n  \tformat: \"es6\",\n  \tmain: \"src/EsriLeaflet.js\"\n  };\n  var keywords = [\n  \t\"arcgis\",\n  \t\"esri\",\n  \t\"esri leaflet\",\n  \t\"gis\",\n  \t\"leaflet plugin\",\n  \t\"mapping\"\n  ];\n  var license = \"Apache-2.0\";\n  var main = \"dist/esri-leaflet-debug.js\";\n  var peerDependencies = {\n  \tleaflet: \"^1.0.0\"\n  };\n  var readmeFilename = \"README.md\";\n  var repository = {\n  \ttype: \"git\",\n  \turl: \"git@github.com:Esri/esri-leaflet.git\"\n  };\n  var scripts = {\n  \tbuild: \"rollup -c profiles/debug.js & rollup -c profiles/production.js\",\n  \tlint: \"npm run eslint && npm run prettier\",\n  \teslint: \"eslint .\",\n  \teslintfix: \"npm run eslint -- --fix\",\n  \tprettier: \"npx prettier . --check\",\n  \tprettierfix: \"npx prettier . --write\",\n  \tprebuild: \"mkdirp dist\",\n  \tpretest: \"npm run build\",\n  \trelease: \"./scripts/release.sh\",\n  \t\"start-watch\": \"chokidar src -c \\\"npm run build\\\"\",\n  \tstart: \"run-p start-watch serve\",\n  \tserve: \"http-server -p 5000 -c-1 -o\",\n  \ttest: \"npm run lint && karma start\"\n  };\n  var unpkg = \"dist/esri-leaflet-debug.js\";\n  var husky = {\n  \thooks: {\n  \t\t\"pre-commit\": \"npm run lint\"\n  \t}\n  };\n  var packageInfo = {\n  \tname: name,\n  \tdescription: description,\n  \tversion: version$2,\n  \tauthor: author,\n  \tbugs: bugs,\n  \tcontributors: contributors,\n  \tdependencies: dependencies,\n  \tdevDependencies: devDependencies,\n  \tfiles: files,\n  \thomepage: homepage,\n  \tmodule: module,\n  \t\"jsnext:main\": \"src/EsriLeaflet.js\",\n  \tjspm: jspm,\n  \tkeywords: keywords,\n  \tlicense: license,\n  \tmain: main,\n  \tpeerDependencies: peerDependencies,\n  \treadmeFilename: readmeFilename,\n  \trepository: repository,\n  \tscripts: scripts,\n  \tunpkg: unpkg,\n  \thusky: husky\n  };\n\n  const cors =\n    window.XMLHttpRequest && \"withCredentials\" in new window.XMLHttpRequest();\n  const pointerEvents =\n    document.documentElement.style.pointerEvents === \"\";\n\n  const Support = {\n    cors,\n    pointerEvents,\n  };\n\n  const options = {\n    attributionWidthOffset: 55,\n  };\n\n  let callbacks = 0;\n\n  function serialize(params) {\n    let data = \"\";\n\n    params.f = params.f || \"json\";\n\n    for (const key in params) {\n      if (Object.hasOwn(params, key)) {\n        const param = params[key];\n        const type = Object.prototype.toString.call(param);\n        let value;\n\n        if (data.length) {\n          data += \"&\";\n        }\n\n        if (type === \"[object Array]\") {\n          value =\n            Object.prototype.toString.call(param[0]) === \"[object Object]\"\n              ? JSON.stringify(param)\n              : param.join(\",\");\n        } else if (type === \"[object Object]\") {\n          value = JSON.stringify(param);\n        } else if (type === \"[object Date]\") {\n          value = param.valueOf();\n        } else {\n          value = param;\n        }\n\n        data += `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;\n      }\n    }\n\n    const APOSTROPHE_URL_ENCODE = \"%27\";\n    return data.replaceAll(\"'\", APOSTROPHE_URL_ENCODE);\n  }\n\n  function createRequest(callback, context) {\n    const httpRequest = new window.XMLHttpRequest();\n\n    httpRequest.onerror = function () {\n      httpRequest.onreadystatechange = L.Util.falseFn;\n\n      callback.call(\n        context,\n        {\n          error: {\n            code: 500,\n            message: \"XMLHttpRequest error\",\n          },\n        },\n        null,\n      );\n    };\n\n    httpRequest.onreadystatechange = function () {\n      let response;\n      let error;\n\n      if (httpRequest.readyState === 4) {\n        try {\n          response = JSON.parse(httpRequest.responseText);\n        } catch (e) {\n          response = null;\n          error = {\n            code: 500,\n            message:\n              \"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error.\",\n          };\n        }\n\n        if (!error && response.error) {\n          error = response.error;\n          response = null;\n        }\n\n        httpRequest.onerror = L.Util.falseFn;\n\n        callback.call(context, error, response);\n      }\n    };\n\n    httpRequest.ontimeout = function () {\n      this.onerror();\n    };\n\n    return httpRequest;\n  }\n\n  function xmlHttpPost(url, params, callback, context) {\n    const httpRequest = createRequest(callback, context);\n    httpRequest.open(\"POST\", url);\n\n    if (typeof context !== \"undefined\" && context !== null) {\n      if (typeof context.options !== \"undefined\") {\n        httpRequest.timeout = context.options.timeout;\n      }\n    }\n    httpRequest.setRequestHeader(\n      \"Content-Type\",\n      \"application/x-www-form-urlencoded; charset=UTF-8\",\n    );\n    httpRequest.send(serialize(params));\n\n    return httpRequest;\n  }\n\n  function xmlHttpGet(url, params, callback, context) {\n    const httpRequest = createRequest(callback, context);\n    httpRequest.open(\"GET\", `${url}?${serialize(params)}`, true);\n\n    if (typeof context !== \"undefined\" && context !== null) {\n      if (typeof context.options !== \"undefined\") {\n        httpRequest.timeout = context.options.timeout;\n        if (context.options.withCredentials) {\n          httpRequest.withCredentials = true;\n        }\n      }\n    }\n    httpRequest.send(null);\n\n    return httpRequest;\n  }\n\n  // AJAX handlers for CORS (modern browsers) or JSONP (older browsers)\n  function request(url, params, callback, context) {\n    const paramString = serialize(params);\n    const httpRequest = createRequest(callback, context);\n    const requestLength = `${url}?${paramString}`.length;\n\n    // ie10/11 require the request be opened before a timeout is applied\n    if (requestLength <= 2000 && Support.cors) {\n      httpRequest.open(\"GET\", `${url}?${paramString}`);\n    } else if (requestLength > 2000 && Support.cors) {\n      httpRequest.open(\"POST\", url);\n      httpRequest.setRequestHeader(\n        \"Content-Type\",\n        \"application/x-www-form-urlencoded; charset=UTF-8\",\n      );\n    }\n\n    if (typeof context !== \"undefined\" && context !== null) {\n      if (typeof context.options !== \"undefined\") {\n        httpRequest.timeout = context.options.timeout;\n        if (context.options.withCredentials) {\n          httpRequest.withCredentials = true;\n        }\n      }\n    }\n\n    // request is less than 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest\n    if (requestLength <= 2000 && Support.cors) {\n      httpRequest.send(null);\n\n      // request is more than 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest\n    } else if (requestLength > 2000 && Support.cors) {\n      httpRequest.send(paramString);\n\n      // request is less  than 2000 characters and the browser does not support CORS, make a JSONP request\n    } else if (requestLength <= 2000 && !Support.cors) {\n      return jsonp(url, params, callback, context);\n\n      // request is longer then 2000 characters and the browser does not support CORS, log a warning\n    } else {\n      warn(\n        `a request to ${url} was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy https://developers.arcgis.com/esri-leaflet/api-reference/request/`,\n      );\n      return;\n    }\n\n    return httpRequest;\n  }\n\n  function jsonp(url, params, callback, context) {\n    window._EsriLeafletCallbacks = window._EsriLeafletCallbacks || {};\n    const callbackId = `c${callbacks}`;\n    params.callback = `window._EsriLeafletCallbacks.${callbackId}`;\n\n    window._EsriLeafletCallbacks[callbackId] = function (response) {\n      if (window._EsriLeafletCallbacks[callbackId] !== true) {\n        let error;\n        const responseType = Object.prototype.toString.call(response);\n\n        if (\n          !(\n            responseType === \"[object Object]\" ||\n            responseType === \"[object Array]\"\n          )\n        ) {\n          error = {\n            error: {\n              code: 500,\n              message: \"Expected array or object as JSONP response\",\n            },\n          };\n          response = null;\n        }\n\n        if (!error && response.error) {\n          error = response;\n          response = null;\n        }\n\n        callback.call(context, error, response);\n        window._EsriLeafletCallbacks[callbackId] = true;\n      }\n    };\n\n    const script = L.DomUtil.create(\"script\", null, document.body);\n    script.type = \"text/javascript\";\n    script.src = `${url}?${serialize(params)}`;\n    script.id = callbackId;\n    script.onerror = function (error) {\n      if (error && window._EsriLeafletCallbacks[callbackId] !== true) {\n        // Can't get true error code: it can be 404, or 401, or 500\n        const err = {\n          error: {\n            code: 500,\n            message: \"An unknown error occurred\",\n          },\n        };\n\n        callback.call(context, err);\n        window._EsriLeafletCallbacks[callbackId] = true;\n      }\n    };\n    L.DomUtil.addClass(script, \"esri-leaflet-jsonp\");\n\n    callbacks++;\n\n    return {\n      id: callbackId,\n      url: script.src,\n      abort() {\n        window._EsriLeafletCallbacks._callback[callbackId]({\n          code: 0,\n          message: \"Request aborted.\",\n        });\n      },\n    };\n  }\n\n  const get = Support.cors ? xmlHttpGet : jsonp;\n  get.CORS = xmlHttpGet;\n  get.JSONP = jsonp;\n\n  function warn(...args) {\n    if (console && console.warn) {\n      console.warn.apply(console, args);\n    }\n  }\n\n  // export the Request object to call the different handlers for debugging\n  const Request = {\n    request,\n    get,\n    post: xmlHttpPost,\n  };\n\n  /* @preserve\n  * @terraformer/arcgis - v2.1.1 - MIT\n  * Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc.\n  * Tue Aug 02 2022 14:23:48 GMT-0700 (Pacific Daylight Time)\n  */\n  /* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n   * Apache-2.0 */\n\n  var edgeIntersectsEdge = function edgeIntersectsEdge(a1, a2, b1, b2) {\n    var uaT = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);\n    var ubT = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);\n    var uB = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);\n\n    if (uB !== 0) {\n      var ua = uaT / uB;\n      var ub = ubT / uB;\n\n      if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n  var coordinatesContainPoint = function coordinatesContainPoint(coordinates, point) {\n    var contains = false;\n\n    for (var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {\n      if ((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1] || coordinates[j][1] <= point[1] && point[1] < coordinates[i][1]) && point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0]) {\n        contains = !contains;\n      }\n    }\n\n    return contains;\n  };\n  var pointsEqual = function pointsEqual(a, b) {\n    for (var i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  };\n  var arrayIntersectsArray = function arrayIntersectsArray(a, b) {\n    for (var i = 0; i < a.length - 1; i++) {\n      for (var j = 0; j < b.length - 1; j++) {\n        if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  };\n\n  /* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n   * Apache-2.0 */\n\n  var closeRing = function closeRing(coordinates) {\n    if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {\n      coordinates.push(coordinates[0]);\n    }\n\n    return coordinates;\n  }; // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring\n  // or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-\n  // points-are-in-clockwise-order\n\n  var ringIsClockwise = function ringIsClockwise(ringToTest) {\n    var total = 0;\n    var i = 0;\n    var rLength = ringToTest.length;\n    var pt1 = ringToTest[i];\n    var pt2;\n\n    for (i; i < rLength - 1; i++) {\n      pt2 = ringToTest[i + 1];\n      total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);\n      pt1 = pt2;\n    }\n\n    return total >= 0;\n  }; // This function ensures that rings are oriented in the right directions\n  // from http://jsperf.com/cloning-an-object/2\n\n  var shallowClone = function shallowClone(obj) {\n    var target = {};\n\n    for (var i in obj) {\n      // both arcgis attributes and geojson props are just hardcoded keys\n      if (obj.hasOwnProperty(i)) {\n        // eslint-disable-line no-prototype-builtins\n        target[i] = obj[i];\n      }\n    }\n\n    return target;\n  };\n\n  /* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n   * Apache-2.0 */\n\n  var coordinatesContainCoordinates = function coordinatesContainCoordinates(outer, inner) {\n    var intersects = arrayIntersectsArray(outer, inner);\n    var contains = coordinatesContainPoint(outer, inner[0]);\n\n    if (!intersects && contains) {\n      return true;\n    }\n\n    return false;\n  }; // do any polygons in this array contain any other polygons in this array?\n  // used for checking for holes in arcgis rings\n\n\n  var convertRingsToGeoJSON = function convertRingsToGeoJSON(rings) {\n    var outerRings = [];\n    var holes = [];\n    var x; // iterator\n\n    var outerRing; // current outer ring being evaluated\n\n    var hole; // current hole being evaluated\n    // for each ring\n\n    for (var r = 0; r < rings.length; r++) {\n      var ring = closeRing(rings[r].slice(0));\n\n      if (ring.length < 4) {\n        continue;\n      } // is this ring an outer ring? is it clockwise?\n\n\n      if (ringIsClockwise(ring)) {\n        var polygon = [ring.slice().reverse()]; // wind outer rings counterclockwise for RFC 7946 compliance\n\n        outerRings.push(polygon); // push to outer rings\n      } else {\n        holes.push(ring.slice().reverse()); // wind inner rings clockwise for RFC 7946 compliance\n      }\n    }\n\n    var uncontainedHoles = []; // while there are holes left...\n\n    while (holes.length) {\n      // pop a hole off out stack\n      hole = holes.pop(); // loop over all outer rings and see if they contain our hole.\n\n      var contained = false;\n\n      for (x = outerRings.length - 1; x >= 0; x--) {\n        outerRing = outerRings[x][0];\n\n        if (coordinatesContainCoordinates(outerRing, hole)) {\n          // the hole is contained push it into our polygon\n          outerRings[x].push(hole);\n          contained = true;\n          break;\n        }\n      } // ring is not contained in any outer ring\n      // sometimes this happens https://github.com/Esri/esri-leaflet/issues/320\n\n\n      if (!contained) {\n        uncontainedHoles.push(hole);\n      }\n    } // if we couldn't match any holes using contains we can try intersects...\n\n\n    while (uncontainedHoles.length) {\n      // pop a hole off out stack\n      hole = uncontainedHoles.pop(); // loop over all outer rings and see if any intersect our hole.\n\n      var intersects = false;\n\n      for (x = outerRings.length - 1; x >= 0; x--) {\n        outerRing = outerRings[x][0];\n\n        if (arrayIntersectsArray(outerRing, hole)) {\n          // the hole is contained push it into our polygon\n          outerRings[x].push(hole);\n          intersects = true;\n          break;\n        }\n      }\n\n      if (!intersects) {\n        outerRings.push([hole.reverse()]);\n      }\n    }\n\n    if (outerRings.length === 1) {\n      return {\n        type: 'Polygon',\n        coordinates: outerRings[0]\n      };\n    } else {\n      return {\n        type: 'MultiPolygon',\n        coordinates: outerRings\n      };\n    }\n  };\n\n  var getId = function getId(attributes, idAttribute) {\n    var keys = idAttribute ? [idAttribute, 'OBJECTID', 'FID'] : ['OBJECTID', 'FID'];\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key in attributes && (typeof attributes[key] === 'string' || typeof attributes[key] === 'number')) {\n        return attributes[key];\n      }\n    }\n\n    throw Error('No valid id attribute found');\n  };\n\n  var arcgisToGeoJSON$1 = function arcgisToGeoJSON(arcgis, idAttribute) {\n    var geojson = {};\n\n    if (arcgis.features) {\n      geojson.type = 'FeatureCollection';\n      geojson.features = [];\n\n      for (var i = 0; i < arcgis.features.length; i++) {\n        geojson.features.push(arcgisToGeoJSON(arcgis.features[i], idAttribute));\n      }\n    }\n\n    if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {\n      geojson.type = 'Point';\n      geojson.coordinates = [arcgis.x, arcgis.y];\n\n      if (typeof arcgis.z === 'number') {\n        geojson.coordinates.push(arcgis.z);\n      }\n    }\n\n    if (arcgis.points) {\n      geojson.type = 'MultiPoint';\n      geojson.coordinates = arcgis.points.slice(0);\n    }\n\n    if (arcgis.paths) {\n      if (arcgis.paths.length === 1) {\n        geojson.type = 'LineString';\n        geojson.coordinates = arcgis.paths[0].slice(0);\n      } else {\n        geojson.type = 'MultiLineString';\n        geojson.coordinates = arcgis.paths.slice(0);\n      }\n    }\n\n    if (arcgis.rings) {\n      geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));\n    }\n\n    if (typeof arcgis.xmin === 'number' && typeof arcgis.ymin === 'number' && typeof arcgis.xmax === 'number' && typeof arcgis.ymax === 'number') {\n      geojson.type = 'Polygon';\n      geojson.coordinates = [[[arcgis.xmax, arcgis.ymax], [arcgis.xmin, arcgis.ymax], [arcgis.xmin, arcgis.ymin], [arcgis.xmax, arcgis.ymin], [arcgis.xmax, arcgis.ymax]]];\n    }\n\n    if (arcgis.geometry || arcgis.attributes) {\n      geojson.type = 'Feature';\n      geojson.geometry = arcgis.geometry ? arcgisToGeoJSON(arcgis.geometry) : null;\n      geojson.properties = arcgis.attributes ? shallowClone(arcgis.attributes) : null;\n\n      if (arcgis.attributes) {\n        try {\n          geojson.id = getId(arcgis.attributes, idAttribute);\n        } catch (err) {// don't set an id\n        }\n      }\n    } // if no valid geometry was encountered\n\n\n    if (JSON.stringify(geojson.geometry) === JSON.stringify({})) {\n      geojson.geometry = null;\n    }\n\n    if (arcgis.spatialReference && arcgis.spatialReference.wkid && arcgis.spatialReference.wkid !== 4326) {\n      console.warn('Object converted in non-standard crs - ' + JSON.stringify(arcgis.spatialReference));\n    }\n\n    return geojson;\n  };\n\n  /* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n   * Apache-2.0 */\n  // outer rings are clockwise, holes are counterclockwise\n  // used for converting GeoJSON Polygons to ArcGIS Polygons\n\n  var orientRings = function orientRings(poly) {\n    var output = [];\n    var polygon = poly.slice(0);\n    var outerRing = closeRing(polygon.shift().slice(0));\n\n    if (outerRing.length >= 4) {\n      if (!ringIsClockwise(outerRing)) {\n        outerRing.reverse();\n      }\n\n      output.push(outerRing);\n\n      for (var i = 0; i < polygon.length; i++) {\n        var hole = closeRing(polygon[i].slice(0));\n\n        if (hole.length >= 4) {\n          if (ringIsClockwise(hole)) {\n            hole.reverse();\n          }\n\n          output.push(hole);\n        }\n      }\n    }\n\n    return output;\n  }; // This function flattens holes in multipolygons to one array of polygons\n  // used for converting GeoJSON Polygons to ArcGIS Polygons\n\n\n  var flattenMultiPolygonRings = function flattenMultiPolygonRings(rings) {\n    var output = [];\n\n    for (var i = 0; i < rings.length; i++) {\n      var polygon = orientRings(rings[i]);\n\n      for (var x = polygon.length - 1; x >= 0; x--) {\n        var ring = polygon[x].slice(0);\n        output.push(ring);\n      }\n    }\n\n    return output;\n  };\n\n  var geojsonToArcGIS$1 = function geojsonToArcGIS(geojson, idAttribute) {\n    idAttribute = idAttribute || 'OBJECTID';\n    var spatialReference = {\n      wkid: 4326\n    };\n    var result = {};\n    var i;\n\n    switch (geojson.type) {\n      case 'Point':\n        result.x = geojson.coordinates[0];\n        result.y = geojson.coordinates[1];\n\n        if (geojson.coordinates[2] != null) {\n          result.z = geojson.coordinates[2];\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'MultiPoint':\n        result.points = geojson.coordinates.slice(0);\n\n        if (geojson.coordinates[0][2] != null) {\n          result.hasZ = true;\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'LineString':\n        result.paths = [geojson.coordinates.slice(0)];\n\n        if (geojson.coordinates[0][2] != null) {\n          result.hasZ = true;\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'MultiLineString':\n        result.paths = geojson.coordinates.slice(0);\n\n        if (geojson.coordinates[0][0][2] != null) {\n          result.hasZ = true;\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'Polygon':\n        result.rings = orientRings(geojson.coordinates.slice(0));\n\n        if (geojson.coordinates[0][0][2] != null) {\n          result.hasZ = true;\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'MultiPolygon':\n        result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));\n\n        if (geojson.coordinates[0][0][0][2] != null) {\n          result.hasZ = true;\n        }\n\n        result.spatialReference = spatialReference;\n        break;\n\n      case 'Feature':\n        if (geojson.geometry) {\n          result.geometry = geojsonToArcGIS(geojson.geometry, idAttribute);\n        }\n\n        result.attributes = geojson.properties ? shallowClone(geojson.properties) : {};\n\n        if (geojson.id) {\n          result.attributes[idAttribute] = geojson.id;\n        }\n\n        break;\n\n      case 'FeatureCollection':\n        result = [];\n\n        for (i = 0; i < geojson.features.length; i++) {\n          result.push(geojsonToArcGIS(geojson.features[i], idAttribute));\n        }\n\n        break;\n\n      case 'GeometryCollection':\n        result = [];\n\n        for (i = 0; i < geojson.geometries.length; i++) {\n          result.push(geojsonToArcGIS(geojson.geometries[i], idAttribute));\n        }\n\n        break;\n    }\n\n    return result;\n  };\n\n  const POWERED_BY_ESRI_ATTRIBUTION_STRING =\n    'Powered by <a href=\"https://www.esri.com\">Esri</a>';\n\n  function geojsonToArcGIS(geojson, idAttr) {\n    return geojsonToArcGIS$1(geojson, idAttr);\n  }\n\n  function arcgisToGeoJSON(arcgis, idAttr) {\n    return arcgisToGeoJSON$1(arcgis, idAttr);\n  }\n\n  // convert an extent (ArcGIS) to LatLngBounds (Leaflet)\n  function extentToBounds(extent) {\n    // \"NaN\" coordinates from ArcGIS Server indicate a null geometry\n    if (\n      extent.xmin !== \"NaN\" &&\n      extent.ymin !== \"NaN\" &&\n      extent.xmax !== \"NaN\" &&\n      extent.ymax !== \"NaN\"\n    ) {\n      const sw = L.latLng(extent.ymin, extent.xmin);\n      const ne = L.latLng(extent.ymax, extent.xmax);\n      return L.latLngBounds(sw, ne);\n    }\n    return null;\n  }\n\n  // convert an LatLngBounds (Leaflet) to extent (ArcGIS)\n  function boundsToExtent(bounds) {\n    bounds = L.latLngBounds(bounds);\n    return {\n      xmin: bounds.getSouthWest().lng,\n      ymin: bounds.getSouthWest().lat,\n      xmax: bounds.getNorthEast().lng,\n      ymax: bounds.getNorthEast().lat,\n      spatialReference: {\n        wkid: 4326,\n      },\n    };\n  }\n\n  const knownFieldNames = /^(OBJECTID|FID|OID|ID)$/i;\n\n  // Attempts to find the ID Field from response\n  function _findIdAttributeFromResponse(response) {\n    let result;\n\n    if (response.objectIdFieldName) {\n      // Find Id Field directly\n      result = response.objectIdFieldName;\n    } else if (response.fields) {\n      // Find ID Field based on field type\n      for (let j = 0; j <= response.fields.length - 1; j++) {\n        if (response.fields[j].type === \"esriFieldTypeOID\") {\n          result = response.fields[j].name;\n          break;\n        }\n      }\n      if (!result) {\n        // If no field was marked as being the esriFieldTypeOID try well known field names\n        for (let j = 0; j <= response.fields.length - 1; j++) {\n          if (response.fields[j].name.match(knownFieldNames)) {\n            result = response.fields[j].name;\n            break;\n          }\n        }\n      }\n    }\n    return result;\n  }\n\n  // This is the 'last' resort, find the Id field from the specified feature\n  function _findIdAttributeFromFeature(feature) {\n    for (const key in feature.attributes) {\n      if (key.match(knownFieldNames)) {\n        return key;\n      }\n    }\n  }\n\n  function responseToFeatureCollection(response, idAttribute) {\n    let objectIdField;\n    const features = response.features || response.results;\n    const count = features && features.length;\n\n    if (idAttribute) {\n      objectIdField = idAttribute;\n    } else {\n      objectIdField = _findIdAttributeFromResponse(response);\n    }\n\n    const featureCollection = {\n      type: \"FeatureCollection\",\n      features: [],\n    };\n\n    if (count) {\n      for (let i = features.length - 1; i >= 0; i--) {\n        const feature = arcgisToGeoJSON(\n          features[i],\n          objectIdField || _findIdAttributeFromFeature(features[i]),\n        );\n        featureCollection.features.push(feature);\n      }\n    }\n\n    return featureCollection;\n  }\n\n  // trim url whitespace and add a trailing slash if needed\n  function cleanUrl(url) {\n    // trim leading and trailing spaces, but not spaces inside the url\n    url = L.Util.trim(url);\n\n    // add a trailing slash to the url if the user omitted it\n    if (url[url.length - 1] !== \"/\") {\n      url += \"/\";\n    }\n\n    return url;\n  }\n\n  /* Extract url params if any and store them in requestParams attribute.\n  \t Return the options params updated */\n  function getUrlParams(options) {\n    if (options.url.indexOf(\"?\") !== -1) {\n      options.requestParams = options.requestParams || {};\n      const queryString = options.url.substring(options.url.indexOf(\"?\") + 1);\n      options.url = options.url.split(\"?\")[0];\n      options.requestParams = JSON.parse(\n        `{\"${decodeURI(queryString).replace(/\"/g, '\\\\\"').replace(/&/g, '\",\"').replace(/=/g, '\":\"')}\"}`,\n      );\n    }\n    options.url = cleanUrl(options.url.split(\"?\")[0]);\n    return options;\n  }\n\n  function isArcgisOnline(url) {\n    /* hosted feature services support geojson as an output format\n  \tutility.arcgis.com services are proxied from a variety of ArcGIS Server vintages, and may not */\n    return /^(?!.*utility\\.arcgis\\.com).*\\.arcgis\\.com.*FeatureServer/i.test(url);\n  }\n\n  function geojsonTypeToArcGIS(geoJsonType) {\n    let arcgisGeometryType;\n    switch (geoJsonType) {\n      case \"Point\":\n        arcgisGeometryType = \"esriGeometryPoint\";\n        break;\n      case \"MultiPoint\":\n        arcgisGeometryType = \"esriGeometryMultipoint\";\n        break;\n      case \"LineString\":\n        arcgisGeometryType = \"esriGeometryPolyline\";\n        break;\n      case \"MultiLineString\":\n        arcgisGeometryType = \"esriGeometryPolyline\";\n        break;\n      case \"Polygon\":\n        arcgisGeometryType = \"esriGeometryPolygon\";\n        break;\n      case \"MultiPolygon\":\n        arcgisGeometryType = \"esriGeometryPolygon\";\n        break;\n    }\n\n    return arcgisGeometryType;\n  }\n\n  function calcAttributionWidth(map) {\n    // either crop at 55px or user defined buffer\n    return `${map.getSize().x - options.attributionWidthOffset}px`;\n  }\n\n  function setEsriAttribution(map) {\n    if (!map.attributionControl) {\n      return;\n    }\n\n    if (!map.attributionControl._esriAttributionLayerCount) {\n      map.attributionControl._esriAttributionLayerCount = 0;\n    }\n\n    if (map.attributionControl._esriAttributionLayerCount === 0) {\n      // Dynamically creating the CSS rules, only run this once per page load:\n      if (!map.attributionControl._esriAttributionAddedOnce) {\n        const hoverAttributionStyle = document.createElement(\"style\");\n        hoverAttributionStyle.type = \"text/css\";\n        hoverAttributionStyle.innerHTML =\n          \".esri-truncated-attribution:hover {white-space: normal;}\";\n        document\n          .getElementsByTagName(\"head\")[0]\n          .appendChild(hoverAttributionStyle);\n\n        // define a new css class in JS to trim attribution into a single line\n        const attributionStyle = document.createElement(\"style\");\n        attributionStyle.type = \"text/css\";\n        attributionStyle.innerHTML =\n          \".esri-truncated-attribution {\" +\n          \"vertical-align: -3px;\" +\n          \"white-space: nowrap;\" +\n          \"overflow: hidden;\" +\n          \"text-overflow: ellipsis;\" +\n          \"display: inline-block;\" +\n          \"transition: 0s white-space;\" +\n          \"transition-delay: 1s;\" +\n          `max-width: ${calcAttributionWidth(map)};` +\n          \"}\";\n        document.getElementsByTagName(\"head\")[0].appendChild(attributionStyle);\n\n        // update the width used to truncate when the map itself is resized\n        map.on(\"resize\", (e) => {\n          if (map.attributionControl) {\n            map.attributionControl._container.style.maxWidth =\n              calcAttributionWidth(e.target);\n          }\n        });\n\n        map.attributionControl._esriAttributionAddedOnce = true;\n      }\n\n      L.DomUtil.addClass(\n        map.attributionControl._container,\n        \"esri-truncated-attribution:hover\",\n      );\n      L.DomUtil.addClass(\n        map.attributionControl._container,\n        \"esri-truncated-attribution\",\n      );\n    }\n\n    // Track the number of esri-leaflet layers that are on the map so we can know when we can remove the attribution (below in removeEsriAttribution)\n    map.attributionControl._esriAttributionLayerCount =\n      map.attributionControl._esriAttributionLayerCount + 1;\n  }\n\n  function getEsriAttributionHtmlString() {\n    return POWERED_BY_ESRI_ATTRIBUTION_STRING;\n  }\n\n  function removeEsriAttribution(map) {\n    if (!map.attributionControl) {\n      return;\n    }\n\n    // Only remove the attribution if we're about to remove the LAST esri-leaflet layer (_esriAttributionLayerCount)\n    if (\n      map.attributionControl._esriAttributionLayerCount &&\n      map.attributionControl._esriAttributionLayerCount === 1\n    ) {\n      L.DomUtil.removeClass(\n        map.attributionControl._container,\n        \"esri-truncated-attribution:hover\",\n      );\n      L.DomUtil.removeClass(\n        map.attributionControl._container,\n        \"esri-truncated-attribution\",\n      );\n    }\n    map.attributionControl._esriAttributionLayerCount =\n      map.attributionControl._esriAttributionLayerCount - 1;\n  }\n\n  function _setGeometry(geometry) {\n    const params = {\n      geometry: null,\n      geometryType: null,\n    };\n\n    // convert bounds to extent and finish\n    if (geometry instanceof L.LatLngBounds) {\n      // set geometry + geometryType\n      params.geometry = boundsToExtent(geometry);\n      params.geometryType = \"esriGeometryEnvelope\";\n      return params;\n    }\n\n    // convert L.Marker > L.LatLng\n    if (geometry.getLatLng) {\n      geometry = geometry.getLatLng();\n    }\n\n    // convert L.LatLng to a geojson point and continue;\n    if (geometry instanceof L.LatLng) {\n      geometry = {\n        type: \"Point\",\n        coordinates: [geometry.lng, geometry.lat],\n      };\n    }\n\n    // handle L.GeoJSON, pull out the first geometry\n    if (geometry instanceof L.GeoJSON) {\n      // reassign geometry to the GeoJSON value  (we are assuming that only one feature is present)\n      geometry = geometry.getLayers()[0].feature.geometry;\n      params.geometry = geojsonToArcGIS(geometry);\n      params.geometryType = geojsonTypeToArcGIS(geometry.type);\n    }\n\n    // Handle L.Polyline and L.Polygon\n    if (geometry.toGeoJSON) {\n      geometry = geometry.toGeoJSON();\n    }\n\n    // handle GeoJSON feature by pulling out the geometry\n    if (geometry.type === \"Feature\") {\n      // get the geometry of the geojson feature\n      geometry = geometry.geometry;\n    }\n\n    // confirm that our GeoJSON is a point, line or polygon\n    if (\n      geometry.type === \"Point\" ||\n      geometry.type === \"LineString\" ||\n      geometry.type === \"Polygon\" ||\n      geometry.type === \"MultiPolygon\"\n    ) {\n      params.geometry = geojsonToArcGIS(geometry);\n      params.geometryType = geojsonTypeToArcGIS(geometry.type);\n      return params;\n    }\n\n    // warn the user if we havn't found an appropriate object\n    warn(\n      \"invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object\",\n    );\n  }\n\n  function _getAttributionData(url, map) {\n    if (Support.cors) {\n      request(\n        url,\n        {},\n        L.Util.bind((error, attributions) => {\n          if (error) {\n            return;\n          }\n          map._esriAttributions = [];\n          for (let c = 0; c < attributions.contributors.length; c++) {\n            const contributor = attributions.contributors[c];\n\n            for (let i = 0; i < contributor.coverageAreas.length; i++) {\n              const coverageArea = contributor.coverageAreas[i];\n              const southWest = L.latLng(\n                coverageArea.bbox[0],\n                coverageArea.bbox[1],\n              );\n              const northEast = L.latLng(\n                coverageArea.bbox[2],\n                coverageArea.bbox[3],\n              );\n              map._esriAttributions.push({\n                attribution: contributor.attribution,\n                score: coverageArea.score,\n                bounds: L.latLngBounds(southWest, northEast),\n                minZoom: coverageArea.zoomMin,\n                maxZoom: coverageArea.zoomMax,\n              });\n            }\n          }\n\n          map._esriAttributions.sort((a, b) => b.score - a.score);\n\n          // pass the same argument as the map's 'moveend' event\n          const obj = { target: map };\n          _updateMapAttribution(obj);\n        }, this),\n      );\n    }\n  }\n\n  function _updateMapAttribution(evt) {\n    const map = evt.target;\n    const oldAttributions = map._esriAttributions;\n\n    if (!map || !map.attributionControl) {\n      return;\n    }\n\n    const attributionElement = map.attributionControl._container.querySelector(\n      \".esri-dynamic-attribution\",\n    );\n\n    if (attributionElement && oldAttributions) {\n      let newAttributions = \"\";\n      const bounds = map.getBounds();\n      const wrappedBounds = L.latLngBounds(\n        bounds.getSouthWest().wrap(),\n        bounds.getNorthEast().wrap(),\n      );\n      const zoom = map.getZoom();\n\n      for (let i = 0; i < oldAttributions.length; i++) {\n        const attribution = oldAttributions[i];\n        const text = attribution.attribution;\n\n        if (\n          !newAttributions.match(text) &&\n          attribution.bounds.intersects(wrappedBounds) &&\n          zoom >= attribution.minZoom &&\n          zoom <= attribution.maxZoom\n        ) {\n          newAttributions += `, ${text}`;\n        }\n      }\n\n      newAttributions = `${getEsriAttributionHtmlString()} | ${newAttributions.substr(2)}`;\n      attributionElement.innerHTML = newAttributions;\n      attributionElement.style.maxWidth = calcAttributionWidth(map);\n\n      map.fire(\"attributionupdated\", {\n        attribution: newAttributions,\n      });\n    }\n  }\n\n  const EsriUtil = {\n    warn,\n    cleanUrl,\n    getUrlParams,\n    isArcgisOnline,\n    geojsonTypeToArcGIS,\n    responseToFeatureCollection,\n    geojsonToArcGIS,\n    arcgisToGeoJSON,\n    boundsToExtent,\n    extentToBounds,\n    calcAttributionWidth,\n    setEsriAttribution,\n    getEsriAttributionHtmlString,\n    removeEsriAttribution,\n    _setGeometry,\n    _getAttributionData,\n    _updateMapAttribution,\n    _findIdAttributeFromFeature,\n    _findIdAttributeFromResponse,\n  };\n\n  const Task = L.Class.extend({\n    options: {\n      proxy: false,\n      useCors: cors,\n    },\n\n    // Generate a method for each methodName:paramName in the setters for this task.\n    generateSetter(param, context) {\n      return L.Util.bind(function (value) {\n        this.params[param] = value;\n        return this;\n      }, context);\n    },\n\n    initialize(endpoint) {\n      // endpoint can be either a url (and options) for an ArcGIS Rest Service or an instance of EsriLeaflet.Service\n      if (endpoint.request && endpoint.options) {\n        this._service = endpoint;\n        L.Util.setOptions(this, endpoint.options);\n      } else {\n        L.Util.setOptions(this, endpoint);\n        this.options.url = cleanUrl(endpoint.url);\n      }\n\n      // clone default params into this object\n      this.params = L.Util.extend({}, this.params || {});\n\n      // generate setter methods based on the setters object implimented a child class\n      if (this.setters) {\n        for (const setter in this.setters) {\n          const param = this.setters[setter];\n          this[setter] = this.generateSetter(param, this);\n        }\n      }\n    },\n\n    token(token) {\n      if (this._service) {\n        this._service.authenticate(token);\n      } else {\n        this.params.token = token;\n      }\n      return this;\n    },\n\n    apikey(apikey) {\n      return this.token(apikey);\n    },\n\n    // ArcGIS Server Find/Identify 10.5+\n    format(boolean) {\n      // use double negative to expose a more intuitive positive method name\n      this.params.returnUnformattedValues = !boolean;\n      return this;\n    },\n\n    request(callback, context) {\n      if (this.options.requestParams) {\n        L.Util.extend(this.params, this.options.requestParams);\n      }\n      if (this._service) {\n        return this._service.request(this.path, this.params, callback, context);\n      }\n\n      return this._request(\"request\", this.path, this.params, callback, context);\n    },\n\n    _request(method, path, params, callback, context) {\n      const url = this.options.proxy\n        ? `${this.options.proxy}?${this.options.url}${path}`\n        : this.options.url + path;\n\n      if ((method === \"get\" || method === \"request\") && !this.options.useCors) {\n        return Request.get.JSONP(url, params, callback, context);\n      }\n\n      return Request[method](url, params, callback, context);\n    },\n  });\n\n  function task(options) {\n    options = getUrlParams(options);\n    return new Task(options);\n  }\n\n  const Query = Task.extend({\n    setters: {\n      offset: \"resultOffset\",\n      limit: \"resultRecordCount\",\n      fields: \"outFields\",\n      precision: \"geometryPrecision\",\n      featureIds: \"objectIds\",\n      returnGeometry: \"returnGeometry\",\n      returnM: \"returnM\",\n      transform: \"datumTransformation\",\n      token: \"token\",\n    },\n\n    path: \"query\",\n\n    params: {\n      returnGeometry: true,\n      where: \"1=1\",\n      outSR: 4326,\n      outFields: \"*\",\n    },\n\n    // Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations.\n    within(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelContains\"; // to the REST api this reads geometry **contains** layer\n      return this;\n    },\n\n    // Returns a feature if any spatial relationship is found. Applies to all shape type combinations.\n    intersects(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelIntersects\";\n      return this;\n    },\n\n    // Returns a feature if its shape wholly contains the search geometry. Valid for all shape type combinations.\n    contains(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelWithin\"; // to the REST api this reads geometry **within** layer\n      return this;\n    },\n\n    // Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.\n    crosses(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelCrosses\";\n      return this;\n    },\n\n    // Returns a feature if the two shapes share a common boundary. However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point.\n    touches(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelTouches\";\n      return this;\n    },\n\n    // Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes. Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations.\n    overlaps(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelOverlaps\";\n      return this;\n    },\n\n    // Returns a feature if the envelope of the two shapes intersects.\n    bboxIntersects(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelEnvelopeIntersects\";\n      return this;\n    },\n\n    // if someone can help decipher the ArcObjects explanation and translate to plain speak, we should mention this method in the doc\n    indexIntersects(geometry) {\n      this._setGeometryParams(geometry);\n      this.params.spatialRel = \"esriSpatialRelIndexIntersects\"; // Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry\n      return this;\n    },\n\n    // only valid for Feature Services running on ArcGIS Server 10.3+ or ArcGIS Online\n    nearby(latlng, radius) {\n      latlng = L.latLng(latlng);\n      this.params.geometry = [latlng.lng, latlng.lat];\n      this.params.geometryType = \"esriGeometryPoint\";\n      this.params.spatialRel = \"esriSpatialRelIntersects\";\n      this.params.units = \"esriSRUnit_Meter\";\n      this.params.distance = radius;\n      this.params.inSR = 4326;\n      return this;\n    },\n\n    where(string) {\n      // instead of converting double-quotes to single quotes, pass as is, and provide a more informative message if a 400 is encountered\n      this.params.where = string;\n      return this;\n    },\n\n    between(start, end) {\n      this.params.time = [start.valueOf(), end.valueOf()];\n      return this;\n    },\n\n    simplify(map, factor) {\n      const mapWidth = Math.abs(\n        map.getBounds().getWest() - map.getBounds().getEast(),\n      );\n      this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\n      return this;\n    },\n\n    orderBy(fieldName, order) {\n      order = order || \"ASC\";\n      this.params.orderByFields = this.params.orderByFields\n        ? `${this.params.orderByFields},`\n        : \"\";\n      this.params.orderByFields += [fieldName, order].join(\" \");\n      return this;\n    },\n\n    run(callback, context) {\n      this._cleanParams();\n\n      // services hosted on ArcGIS Online and ArcGIS Server 10.3.1+ support requesting geojson directly\n      if (\n        this.options.isModern ||\n        (isArcgisOnline(this.options.url) && this.options.isModern === undefined)\n      ) {\n        this.params.f = \"geojson\";\n\n        return this.request(function (error, response) {\n          this._trapSQLerrors(error);\n          callback.call(context, error, response, response);\n        }, this);\n\n        // otherwise convert it in the callback then pass it on\n      }\n      return this.request(function (error, response) {\n        this._trapSQLerrors(error);\n        callback.call(\n          context,\n          error,\n          response && responseToFeatureCollection(response),\n          response,\n        );\n      }, this);\n    },\n\n    count(callback, context) {\n      this._cleanParams();\n      this.params.returnCountOnly = true;\n      return this.request(function (error, response) {\n        callback.call(this, error, response && response.count, response);\n      }, context);\n    },\n\n    ids(callback, context) {\n      this._cleanParams();\n      this.params.returnIdsOnly = true;\n      return this.request(function (error, response) {\n        callback.call(this, error, response && response.objectIds, response);\n      }, context);\n    },\n\n    // only valid for Feature Services running on ArcGIS Server 10.3+ or ArcGIS Online\n    bounds(callback, context) {\n      this._cleanParams();\n      this.params.returnExtentOnly = true;\n      return this.request((error, response) => {\n        if (response && response.extent && extentToBounds(response.extent)) {\n          callback.call(\n            context,\n            error,\n            extentToBounds(response.extent),\n            response,\n          );\n        } else {\n          error = {\n            message: \"Invalid Bounds\",\n          };\n          callback.call(context, error, null, response);\n        }\n      }, context);\n    },\n\n    distinct() {\n      // geometry must be omitted for queries requesting distinct values\n      this.params.returnGeometry = false;\n      this.params.returnDistinctValues = true;\n      return this;\n    },\n\n    // only valid for image services\n    pixelSize(rawPoint) {\n      const castPoint = L.point(rawPoint);\n      this.params.pixelSize = [castPoint.x, castPoint.y];\n      return this;\n    },\n\n    // only valid for map services\n    layer(layer) {\n      this.path = `${layer}/query`;\n      return this;\n    },\n\n    _trapSQLerrors(error) {\n      if (error) {\n        if (error.code === \"400\") {\n          warn(\n            \"one common syntax error in query requests is encasing string values in double quotes instead of single quotes\",\n          );\n        }\n      }\n    },\n\n    _cleanParams() {\n      delete this.params.returnIdsOnly;\n      delete this.params.returnExtentOnly;\n      delete this.params.returnCountOnly;\n    },\n\n    _setGeometryParams(geometry) {\n      this.params.inSR = 4326;\n      const converted = _setGeometry(geometry);\n      this.params.geometry = converted.geometry;\n      this.params.geometryType = converted.geometryType;\n    },\n  });\n\n  function query(options) {\n    return new Query(options);\n  }\n\n  const Find = Task.extend({\n    setters: {\n      // method name > param name\n      contains: \"contains\",\n      text: \"searchText\",\n      fields: \"searchFields\", // denote an array or single string\n      spatialReference: \"sr\",\n      sr: \"sr\",\n      layers: \"layers\",\n      returnGeometry: \"returnGeometry\",\n      maxAllowableOffset: \"maxAllowableOffset\",\n      precision: \"geometryPrecision\",\n      dynamicLayers: \"dynamicLayers\",\n      returnZ: \"returnZ\",\n      returnM: \"returnM\",\n      gdbVersion: \"gdbVersion\",\n      // skipped implementing this (for now) because the REST service implementation isnt consistent between operations\n      // 'transform': 'datumTransformations',\n      token: \"token\",\n    },\n\n    path: \"find\",\n\n    params: {\n      sr: 4326,\n      contains: true,\n      returnGeometry: true,\n      returnZ: true,\n      returnM: false,\n    },\n\n    layerDefs(id, where) {\n      this.params.layerDefs = this.params.layerDefs\n        ? `${this.params.layerDefs};`\n        : \"\";\n      this.params.layerDefs += [id, where].join(\":\");\n      return this;\n    },\n\n    simplify(map, factor) {\n      const mapWidth = Math.abs(\n        map.getBounds().getWest() - map.getBounds().getEast(),\n      );\n      this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\n      return this;\n    },\n\n    run(callback, context) {\n      return this.request((error, response) => {\n        callback.call(\n          context,\n          error,\n          response && responseToFeatureCollection(response),\n          response,\n        );\n      }, context);\n    },\n  });\n\n  function find(options) {\n    return new Find(options);\n  }\n\n  const Identify = Task.extend({\n    path: \"identify\",\n\n    between(start, end) {\n      this.params.time = [start.valueOf(), end.valueOf()];\n      return this;\n    },\n  });\n\n  function identify(options) {\n    return new Identify(options);\n  }\n\n  const IdentifyFeatures = Identify.extend({\n    setters: {\n      layers: \"layers\",\n      precision: \"geometryPrecision\",\n      tolerance: \"tolerance\",\n      // skipped implementing this (for now) because the REST service implementation isnt consistent between operations.\n      // 'transform': 'datumTransformations'\n      returnGeometry: \"returnGeometry\",\n    },\n\n    params: {\n      sr: 4326,\n      layers: \"all\",\n      tolerance: 3,\n      returnGeometry: true,\n    },\n\n    on(map) {\n      const extent = boundsToExtent(map.getBounds());\n      const size = map.getSize();\n      this.params.imageDisplay = [size.x, size.y, 96];\n      this.params.mapExtent = [\n        extent.xmin,\n        extent.ymin,\n        extent.xmax,\n        extent.ymax,\n      ];\n      return this;\n    },\n\n    at(geometry) {\n      // cast lat, long pairs in raw array form manually\n      if (geometry.length === 2) {\n        geometry = L.latLng(geometry);\n      }\n      this._setGeometryParams(geometry);\n      return this;\n    },\n\n    layerDef(id, where) {\n      this.params.layerDefs = this.params.layerDefs\n        ? `${this.params.layerDefs};`\n        : \"\";\n      this.params.layerDefs += [id, where].join(\":\");\n      return this;\n    },\n\n    simplify(map, factor) {\n      const mapWidth = Math.abs(\n        map.getBounds().getWest() - map.getBounds().getEast(),\n      );\n      this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\n      return this;\n    },\n\n    run(callback, context) {\n      return this.request((error, response) => {\n        // immediately invoke with an error\n        if (error) {\n          callback.call(context, error, undefined, response);\n\n          // ok no error lets just assume we have features...\n        } else {\n          const featureCollection = responseToFeatureCollection(response);\n          response.results = response.results.reverse();\n          for (let i = 0; i < featureCollection.features.length; i++) {\n            const feature = featureCollection.features[i];\n            feature.layerId = response.results[i].layerId;\n          }\n          callback.call(context, undefined, featureCollection, response);\n        }\n      });\n    },\n\n    _setGeometryParams(geometry) {\n      const converted = _setGeometry(geometry);\n      this.params.geometry = converted.geometry;\n      this.params.geometryType = converted.geometryType;\n    },\n  });\n\n  function identifyFeatures(options) {\n    return new IdentifyFeatures(options);\n  }\n\n  const IdentifyImage = Identify.extend({\n    setters: {\n      setMosaicRule: \"mosaicRule\",\n      setRenderingRule: \"renderingRule\",\n      setPixelSize: \"pixelSize\",\n      returnCatalogItems: \"returnCatalogItems\",\n      returnGeometry: \"returnGeometry\",\n    },\n\n    params: {\n      returnGeometry: false,\n    },\n\n    at(latlng) {\n      latlng = L.latLng(latlng);\n      this.params.geometry = JSON.stringify({\n        x: latlng.lng,\n        y: latlng.lat,\n        spatialReference: {\n          wkid: 4326,\n        },\n      });\n      this.params.geometryType = \"esriGeometryPoint\";\n      return this;\n    },\n\n    getMosaicRule() {\n      return this.params.mosaicRule;\n    },\n\n    getRenderingRule() {\n      return this.params.renderingRule;\n    },\n\n    getPixelSize() {\n      return this.params.pixelSize;\n    },\n\n    run(callback, context) {\n      return this.request(function (error, response) {\n        callback.call(\n          context,\n          error,\n          response && this._responseToGeoJSON(response),\n          response,\n        );\n      }, this);\n    },\n\n    // get pixel data and return as geoJSON point\n    // populate catalog items (if any)\n    // merging in any catalogItemVisibilities as a propery of each feature\n    _responseToGeoJSON(response) {\n      const location = response.location;\n      const catalogItems = response.catalogItems;\n      const catalogItemVisibilities = response.catalogItemVisibilities;\n      const geoJSON = {\n        pixel: {\n          type: \"Feature\",\n          geometry: {\n            type: \"Point\",\n            coordinates: [location.x, location.y],\n          },\n          crs: {\n            type: \"EPSG\",\n            properties: {\n              code: location.spatialReference.wkid,\n            },\n          },\n          properties: {\n            OBJECTID: response.objectId,\n            name: response.name,\n            value: response.value,\n          },\n          id: response.objectId,\n        },\n      };\n\n      if (response.properties && response.properties.Values) {\n        geoJSON.pixel.properties.values = response.properties.Values;\n      }\n\n      if (catalogItems && catalogItems.features) {\n        geoJSON.catalogItems = responseToFeatureCollection(catalogItems);\n        if (\n          catalogItemVisibilities &&\n          catalogItemVisibilities.length === geoJSON.catalogItems.features.length\n        ) {\n          for (let i = catalogItemVisibilities.length - 1; i >= 0; i--) {\n            geoJSON.catalogItems.features[i].properties.catalogItemVisibility =\n              catalogItemVisibilities[i];\n          }\n        }\n      }\n      return geoJSON;\n    },\n  });\n\n  function identifyImage(params) {\n    return new IdentifyImage(params);\n  }\n\n  const Service = L.Evented.extend({\n    options: {\n      proxy: false,\n      useCors: cors,\n      timeout: 0,\n    },\n\n    initialize(options) {\n      options = options || {};\n      this._requestQueue = [];\n      this._authenticating = false;\n      L.Util.setOptions(this, options);\n      this.options.url = cleanUrl(this.options.url);\n    },\n\n    get(path, params, callback, context) {\n      return this._request(\"get\", path, params, callback, context);\n    },\n\n    post(path, params, callback, context) {\n      return this._request(\"post\", path, params, callback, context);\n    },\n\n    request(path, params, callback, context) {\n      return this._request(\"request\", path, params, callback, context);\n    },\n\n    metadata(callback, context) {\n      return this._request(\"get\", \"\", {}, callback, context);\n    },\n\n    authenticate(token) {\n      this._authenticating = false;\n      this.options.token = token;\n      this._runQueue();\n      return this;\n    },\n\n    getTimeout() {\n      return this.options.timeout;\n    },\n\n    setTimeout(timeout) {\n      this.options.timeout = timeout;\n    },\n\n    _request(method, path, params, callback, context) {\n      this.fire(\n        \"requeststart\",\n        {\n          url: this.options.url + path,\n          params,\n          method,\n        },\n        true,\n      );\n\n      const wrappedCallback = this._createServiceCallback(\n        method,\n        path,\n        params,\n        callback,\n        context,\n      );\n\n      if (this.options.token) {\n        params.token = this.options.token;\n      }\n      if (this.options.requestParams) {\n        L.Util.extend(params, this.options.requestParams);\n      }\n      if (this._authenticating) {\n        this._requestQueue.push([method, path, params, callback, context]);\n      } else {\n        const url = this.options.proxy\n          ? `${this.options.proxy}?${this.options.url}${path}`\n          : this.options.url + path;\n\n        if ((method === \"get\" || method === \"request\") && !this.options.useCors) {\n          return Request.get.JSONP(url, params, wrappedCallback, context);\n        }\n        return Request[method](url, params, wrappedCallback, context);\n      }\n    },\n\n    _createServiceCallback(method, path, params, callback, context) {\n      return L.Util.bind(function (error, response) {\n        if (error && (error.code === 499 || error.code === 498)) {\n          this._authenticating = true;\n\n          this._requestQueue.push([method, path, params, callback, context]);\n\n          // fire an event for users to handle and re-authenticate\n          this.fire(\n            \"authenticationrequired\",\n            {\n              authenticate: L.Util.bind(this.authenticate, this),\n            },\n            true,\n          );\n\n          // if the user has access to a callback they can handle the auth error\n          error.authenticate = L.Util.bind(this.authenticate, this);\n        }\n\n        callback.call(context, error, response);\n\n        if (error) {\n          this.fire(\n            \"requesterror\",\n            {\n              url: this.options.url + path,\n              params,\n              message: error.message,\n              code: error.code,\n              method,\n            },\n            true,\n          );\n        } else {\n          this.fire(\n            \"requestsuccess\",\n            {\n              url: this.options.url + path,\n              params,\n              response,\n              method,\n            },\n            true,\n          );\n        }\n\n        this.fire(\n          \"requestend\",\n          {\n            url: this.options.url + path,\n            params,\n            method,\n          },\n          true,\n        );\n      }, this);\n    },\n\n    _runQueue() {\n      for (let i = this._requestQueue.length - 1; i >= 0; i--) {\n        const request = this._requestQueue[i];\n        const method = request.shift();\n        this[method].apply(this, request);\n      }\n      this._requestQueue = [];\n    },\n  });\n\n  function service(options) {\n    options = getUrlParams(options);\n    return new Service(options);\n  }\n\n  const MapService = Service.extend({\n    identify() {\n      return identifyFeatures(this);\n    },\n\n    find() {\n      return find(this);\n    },\n\n    query() {\n      return query(this);\n    },\n  });\n\n  function mapService(options) {\n    return new MapService(options);\n  }\n\n  const ImageService = Service.extend({\n    query() {\n      return query(this);\n    },\n\n    identify() {\n      return identifyImage(this);\n    },\n  });\n\n  function imageService(options) {\n    return new ImageService(options);\n  }\n\n  const FeatureLayerService = Service.extend({\n    options: {\n      idAttribute: \"OBJECTID\",\n    },\n\n    query() {\n      return query(this);\n    },\n\n    addFeature(feature, callback, context) {\n      this.addFeatures(feature, callback, context);\n    },\n\n    addFeatures(features, callback, context) {\n      const featuresArray = features.features ? features.features : [features];\n      for (let i = featuresArray.length - 1; i >= 0; i--) {\n        delete featuresArray[i].id;\n      }\n      features = geojsonToArcGIS(features);\n      features = featuresArray.length > 1 ? features : [features];\n      return this.post(\n        \"addFeatures\",\n        {\n          features,\n        },\n        (error, response) => {\n          // For compatibility reason with former addFeature function,\n          // we return the object in the array and not the array itself\n          const result =\n            response && response.addResults\n              ? response.addResults.length > 1\n                ? response.addResults\n                : response.addResults[0]\n              : undefined;\n          if (callback) {\n            callback.call(context, error || response.addResults[0].error, result);\n          }\n        },\n        context,\n      );\n    },\n\n    updateFeature(feature, callback, context) {\n      this.updateFeatures(feature, callback, context);\n    },\n\n    updateFeatures(features, callback, context) {\n      const featuresArray = features.features ? features.features : [features];\n      features = geojsonToArcGIS(features, this.options.idAttribute);\n      features = featuresArray.length > 1 ? features : [features];\n\n      return this.post(\n        \"updateFeatures\",\n        {\n          features,\n        },\n        (error, response) => {\n          // For compatibility reason with former updateFeature function,\n          // we return the object in the array and not the array itself\n          const result =\n            response && response.updateResults\n              ? response.updateResults.length > 1\n                ? response.updateResults\n                : response.updateResults[0]\n              : undefined;\n          if (callback) {\n            callback.call(\n              context,\n              error || response.updateResults[0].error,\n              result,\n            );\n          }\n        },\n        context,\n      );\n    },\n\n    deleteFeature(id, callback, context) {\n      this.deleteFeatures(id, callback, context);\n    },\n\n    deleteFeatures(ids, callback, context) {\n      return this.post(\n        \"deleteFeatures\",\n        {\n          objectIds: ids,\n        },\n        (error, response) => {\n          // For compatibility reason with former deleteFeature function,\n          // we return the object in the array and not the array itself\n          const result =\n            response && response.deleteResults\n              ? response.deleteResults.length > 1\n                ? response.deleteResults\n                : response.deleteResults[0]\n              : undefined;\n          if (callback) {\n            callback.call(\n              context,\n              error || response.deleteResults[0].error,\n              result,\n            );\n          }\n        },\n        context,\n      );\n    },\n  });\n\n  function featureLayerService(options) {\n    return new FeatureLayerService(options);\n  }\n\n  const tileProtocol = window.location.protocol !== \"https:\" ? \"http:\" : \"https:\";\n\n  const BasemapLayer = L.TileLayer.extend({\n    statics: {\n      TILES: {\n        Streets: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS, NOAA\",\n            attributionUrl:\n              \"https://static.arcgis.com/attribution/World_Street_Map\",\n          },\n        },\n        Topographic: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS, NOAA\",\n            attributionUrl:\n              \"https://static.arcgis.com/attribution/World_Topo_Map\",\n          },\n        },\n        Oceans: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS, NOAA\",\n            attributionUrl: \"https://static.arcgis.com/attribution/Ocean_Basemap\",\n          },\n        },\n        OceansLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        NationalGeographic: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            attribution:\n              \"National Geographic, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.\",\n          },\n        },\n        DarkGray: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            attribution:\n              \"HERE, DeLorme, MapmyIndia, &copy; OpenStreetMap contributors\",\n          },\n        },\n        DarkGrayLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        Gray: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            attribution:\n              \"HERE, DeLorme, MapmyIndia, &copy; OpenStreetMap contributors\",\n          },\n        },\n        GrayLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 16,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        Imagery: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            subdomains: [\"server\", \"services\"],\n            attribution:\n              \"DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community\",\n            attributionUrl: \"https://static.arcgis.com/attribution/World_Imagery\",\n          },\n        },\n        ImageryLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        ImageryTransportation: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        ShadedRelief: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 13,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS\",\n          },\n        },\n        ShadedReliefLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 12,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        Terrain: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 13,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS, NOAA\",\n          },\n        },\n        TerrainLabels: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 13,\n            subdomains: [\"server\", \"services\"],\n            pane: pointerEvents ? \"esri-labels\" : \"tilePane\",\n            attribution: \"\",\n          },\n        },\n        USATopo: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 15,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"USGS, National Geographic Society, i-cubed\",\n          },\n        },\n        ImageryClarity: {\n          urlTemplate: `${tileProtocol}//clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            attribution:\n              \"Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community\",\n          },\n        },\n        Physical: {\n          urlTemplate: `${tileProtocol}//{s}.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 8,\n            subdomains: [\"server\", \"services\"],\n            attribution: \"U.S. National Park Service\",\n          },\n        },\n        ImageryFirefly: {\n          urlTemplate: `${tileProtocol}//fly.maptiles.arcgis.com/arcgis/rest/services/World_Imagery_Firefly/MapServer/tile/{z}/{y}/{x}`,\n          options: {\n            minZoom: 1,\n            maxZoom: 19,\n            attribution:\n              \"Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community\",\n            attributionUrl: \"https://static.arcgis.com/attribution/World_Imagery\",\n          },\n        },\n      },\n    },\n\n    initialize(key, options) {\n      let config;\n\n      // set the config variable with the appropriate config object\n      if (typeof key === \"object\" && key.urlTemplate && key.options) {\n        config = key;\n      } else if (typeof key === \"string\" && BasemapLayer.TILES[key]) {\n        config = BasemapLayer.TILES[key];\n      } else {\n        throw new Error(\n          'L.esri.BasemapLayer: Invalid parameter. Use one of \"Streets\", \"Topographic\", \"Oceans\", \"OceansLabels\", \"NationalGeographic\", \"Physical\", \"Gray\", \"GrayLabels\", \"DarkGray\", \"DarkGrayLabels\", \"Imagery\", \"ImageryLabels\", \"ImageryTransportation\", \"ImageryClarity\", \"ImageryFirefly\", ShadedRelief\", \"ShadedReliefLabels\", \"Terrain\", \"TerrainLabels\" or \"USATopo\"',\n        );\n      }\n\n      // merge passed options into the config options\n      const tileOptions = L.Util.extend(config.options, options);\n\n      L.Util.setOptions(this, tileOptions);\n\n      // Deprecation notice:\n      if (!this.options.ignoreDeprecationWarning) {\n        console.warn(\n          \"WARNING: L.esri.BasemapLayer uses data services that are in mature support and are not being updated. Please use L.esri.Vector.vectorBasemapLayer instead. More info: https://esriurl.com/esri-leaflet-basemap\",\n        );\n      }\n\n      if (this.options.token && config.urlTemplate.indexOf(\"token=\") === -1) {\n        config.urlTemplate += `?token=${this.options.token}`;\n      }\n      if (this.options.proxy) {\n        config.urlTemplate = `${this.options.proxy}?${config.urlTemplate}`;\n      }\n\n      // call the initialize method on L.TileLayer to set everything up\n      L.TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions);\n    },\n\n    onAdd(map) {\n      // include 'Powered by Esri' in map attribution\n      setEsriAttribution(map);\n\n      if (this.options.pane === \"esri-labels\") {\n        this._initPane();\n      }\n      // some basemaps can supply dynamic attribution\n      if (this.options.attributionUrl) {\n        _getAttributionData(\n          (this.options.proxy ? `${this.options.proxy}?` : \"\") +\n            this.options.attributionUrl,\n          map,\n        );\n      }\n\n      map.on(\"moveend\", _updateMapAttribution);\n\n      L.TileLayer.prototype.onAdd.call(this, map);\n    },\n\n    onRemove(map) {\n      removeEsriAttribution(map);\n\n      map.off(\"moveend\", _updateMapAttribution);\n\n      L.TileLayer.prototype.onRemove.call(this, map);\n    },\n\n    _initPane() {\n      if (!this._map.getPane(this.options.pane)) {\n        const pane = this._map.createPane(this.options.pane);\n        pane.style.pointerEvents = \"none\";\n        pane.style.zIndex = 500;\n      }\n    },\n\n    getAttribution() {\n      let attribution;\n      if (this.options.attribution) {\n        attribution = `<span class=\"esri-dynamic-attribution\">${this.options.attribution}</span>`;\n      }\n      return attribution;\n    },\n  });\n\n  function basemapLayer(key, options) {\n    return new BasemapLayer(key, options);\n  }\n\n  const TiledMapLayer = L.TileLayer.extend({\n    options: {\n      zoomOffsetAllowance: 0.1,\n      errorTileUrl:\n        \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg==\",\n    },\n\n    statics: {\n      MercatorZoomLevels: {\n        0: 156543.03392799999,\n        1: 78271.516963999893,\n        2: 39135.758482000099,\n        3: 19567.879240999901,\n        4: 9783.9396204999593,\n        5: 4891.9698102499797,\n        6: 2445.9849051249898,\n        7: 1222.9924525624899,\n        8: 611.49622628138002,\n        9: 305.74811314055802,\n        10: 152.874056570411,\n        11: 76.437028285073197,\n        12: 38.218514142536598,\n        13: 19.109257071268299,\n        14: 9.5546285356341496,\n        15: 4.7773142679493699,\n        16: 2.38865713397468,\n        17: 1.1943285668550501,\n        18: 0.59716428355981699,\n        19: 0.29858214164761698,\n        20: 0.14929107082381,\n        21: 0.07464553541191,\n        22: 0.0373227677059525,\n        23: 0.0186613838529763,\n      },\n    },\n\n    initialize(options) {\n      options = L.Util.setOptions(this, options);\n\n      // support apikey property being passed in\n      if (options.apikey) {\n        options.token = options.apikey;\n      }\n\n      // set the urls\n      options = getUrlParams(options);\n      this.tileUrl = `${(options.proxy ? `${options.proxy}?` : \"\") + options.url}tile/{z}/{y}/{x}${options.requestParams && Object.keys(options.requestParams).length > 0 ? L.Util.getParamString(options.requestParams) : \"\"}`;\n      // Remove subdomain in url\n      // https://github.com/Esri/esri-leaflet/issues/991\n      if (options.url.indexOf(\"{s}\") !== -1 && options.subdomains) {\n        options.url = options.url.replace(\"{s}\", options.subdomains[0]);\n      }\n      this.service = mapService(options);\n      this.service.addEventParent(this);\n\n      const arcgisonline = new RegExp(/tiles.arcgis(online)?\\.com/g);\n      if (arcgisonline.test(options.url)) {\n        this.tileUrl = this.tileUrl.replace(\"://tiles\", \"://tiles{s}\");\n        options.subdomains = [\"1\", \"2\", \"3\", \"4\"];\n      }\n\n      if (this.options.token) {\n        this.tileUrl += `?token=${this.options.token}`;\n      }\n\n      // init layer by calling TileLayers initialize method\n      L.TileLayer.prototype.initialize.call(this, this.tileUrl, options);\n    },\n\n    getTileUrl(tilePoint) {\n      const zoom = this._getZoomForUrl();\n\n      return L.Util.template(\n        this.tileUrl,\n        L.Util.extend(\n          {\n            s: this._getSubdomain(tilePoint),\n            x: tilePoint.x,\n            y: tilePoint.y,\n            // try lod map first, then just default to zoom level\n            z:\n              this._lodMap && this._lodMap[zoom] !== undefined\n                ? this._lodMap[zoom]\n                : zoom,\n          },\n          this.options,\n        ),\n      );\n    },\n\n    createTile(coords, done) {\n      const tile = document.createElement(\"img\");\n\n      L.DomEvent.on(tile, \"load\", L.Util.bind(this._tileOnLoad, this, done, tile));\n      L.DomEvent.on(tile, \"error\", L.Util.bind(this._tileOnError, this, done, tile));\n\n      if (this.options.crossOrigin) {\n        tile.crossOrigin = \"\";\n      }\n\n      /*\n       Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons\n       http://www.w3.org/TR/WCAG20-TECHS/H67\n      */\n      tile.alt = \"\";\n\n      // if there is no lod map or an lod map with a proper zoom load the tile\n      // otherwise wait for the lod map to become available\n      if (\n        !this._lodMap ||\n        (this._lodMap && this._lodMap[this._getZoomForUrl()] !== undefined)\n      ) {\n        tile.src = this.getTileUrl(coords);\n      } else {\n        this.once(\n          \"lodmap\",\n          function () {\n            tile.src = this.getTileUrl(coords);\n          },\n          this,\n        );\n      }\n\n      return tile;\n    },\n\n    onAdd(map) {\n      // include 'Powered by Esri' in map attribution\n      setEsriAttribution(map);\n\n      if (!this._lodMap) {\n        this.metadata(function (error, metadata) {\n          if (!error && metadata.spatialReference) {\n            const sr =\n              metadata.spatialReference.latestWkid ||\n              metadata.spatialReference.wkid;\n            // display the copyright text from the service using leaflet's attribution control\n            if (\n              !this.options.attribution &&\n              map.attributionControl &&\n              metadata.copyrightText\n            ) {\n              this.options.attribution = metadata.copyrightText;\n              map.attributionControl.addAttribution(this.getAttribution());\n            }\n\n            // if the service tiles were published in web mercator using conventional LODs but missing levels, we can try and remap them\n            if (\n              map.options.crs === L.CRS.EPSG3857 &&\n              (sr === 102100 || sr === 3857)\n            ) {\n              this._lodMap = {};\n              // create the zoom level data\n              const arcgisLODs = metadata.tileInfo.lods;\n              const correctResolutions = TiledMapLayer.MercatorZoomLevels;\n\n              for (let i = 0; i < arcgisLODs.length; i++) {\n                const arcgisLOD = arcgisLODs[i];\n                for (const ci in correctResolutions) {\n                  const correctRes = correctResolutions[ci];\n\n                  if (\n                    this._withinPercentage(\n                      arcgisLOD.resolution,\n                      correctRes,\n                      this.options.zoomOffsetAllowance,\n                    )\n                  ) {\n                    this._lodMap[ci] = arcgisLOD.level;\n                    break;\n                  }\n                }\n              }\n\n              this.fire(\"lodmap\");\n            } else if (\n              map.options.crs &&\n              map.options.crs.code &&\n              map.options.crs.code.indexOf(sr) > -1\n            ) ; else {\n              // if the service was cached in a custom projection and an appropriate LOD hasn't been defined in the map, guide the developer to our Proj4 sample\n              warn(\n                \"L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet https://developers.arcgis.com/esri-leaflet/samples/non-mercator-projection/\",\n              );\n            }\n          }\n        }, this);\n      }\n\n      L.TileLayer.prototype.onAdd.call(this, map);\n    },\n\n    onRemove(map) {\n      removeEsriAttribution(map);\n\n      L.TileLayer.prototype.onRemove.call(this, map);\n    },\n\n    metadata(callback, context) {\n      this.service.metadata(callback, context);\n      return this;\n    },\n\n    identify() {\n      return this.service.identify();\n    },\n\n    find() {\n      return this.service.find();\n    },\n\n    query() {\n      return this.service.query();\n    },\n\n    authenticate(token) {\n      const tokenQs = `?token=${token}`;\n      this.tileUrl = this.options.token\n        ? this.tileUrl.replace(/\\?token=(.+)/g, tokenQs)\n        : this.tileUrl + tokenQs;\n      this.options.token = token;\n      this.service.authenticate(token);\n      return this;\n    },\n\n    _withinPercentage(a, b, percentage) {\n      const diff = Math.abs(a / b - 1);\n      return diff < percentage;\n    },\n  });\n\n  function tiledMapLayer(url, options) {\n    return new TiledMapLayer(url, options);\n  }\n\n  const Overlay = L.ImageOverlay.extend({\n    onAdd(map) {\n      this._topLeft = map.getPixelBounds().min;\n      L.ImageOverlay.prototype.onAdd.call(this, map);\n    },\n    _reset() {\n      if (this._map.options.crs === L.CRS.EPSG3857) {\n        L.ImageOverlay.prototype._reset.call(this);\n      } else {\n        L.DomUtil.setPosition(\n          this._image,\n          this._topLeft.subtract(this._map.getPixelOrigin()),\n        );\n      }\n    },\n  });\n\n  const RasterLayer = L.Layer.extend({\n    options: {\n      opacity: 1,\n      position: \"front\",\n      f: \"image\",\n      useCors: cors,\n      attribution: null,\n      interactive: false,\n      alt: \"\",\n    },\n\n    onAdd(map) {\n      // include 'Powered by Esri' in map attribution\n      setEsriAttribution(map);\n\n      if (this.options.zIndex) {\n        this.options.position = null;\n      }\n\n      this._update = L.Util.throttle(\n        this._update,\n        this.options.updateInterval,\n        this,\n      );\n\n      map.on(\"moveend\", this._update, this);\n\n      // if we had an image loaded and it matches the\n      // current bounds show the image otherwise remove it\n      if (\n        this._currentImage &&\n        this._currentImage._bounds.equals(this._map.getBounds())\n      ) {\n        map.addLayer(this._currentImage);\n      } else if (this._currentImage) {\n        this._map.removeLayer(this._currentImage);\n        this._currentImage = null;\n      }\n\n      this._update();\n\n      if (this._popup) {\n        this._map.on(\"click\", this._getPopupData, this);\n        this._map.on(\"dblclick\", this._resetPopupState, this);\n      }\n\n      // add copyright text listed in service metadata\n      this.metadata(function (err, metadata) {\n        if (\n          !err &&\n          !this.options.attribution &&\n          map.attributionControl &&\n          metadata.copyrightText\n        ) {\n          this.options.attribution = metadata.copyrightText;\n          map.attributionControl.addAttribution(this.getAttribution());\n        }\n      }, this);\n    },\n\n    onRemove(map) {\n      removeEsriAttribution(map);\n\n      if (this._currentImage) {\n        this._map.removeLayer(this._currentImage);\n      }\n\n      if (this._popup) {\n        this._map.off(\"click\", this._getPopupData, this);\n        this._map.off(\"dblclick\", this._resetPopupState, this);\n      }\n\n      this._map.off(\"moveend\", this._update, this);\n    },\n\n    bindPopup(fn, popupOptions) {\n      this._shouldRenderPopup = false;\n      this._lastClick = false;\n      this._popup = L.popup(popupOptions);\n      this._popupFunction = fn;\n      if (this._map) {\n        this._map.on(\"click\", this._getPopupData, this);\n        this._map.on(\"dblclick\", this._resetPopupState, this);\n      }\n      return this;\n    },\n\n    unbindPopup() {\n      if (this._map) {\n        this._map.closePopup(this._popup);\n        this._map.off(\"click\", this._getPopupData, this);\n        this._map.off(\"dblclick\", this._resetPopupState, this);\n      }\n      this._popup = false;\n      return this;\n    },\n\n    bringToFront() {\n      this.options.position = \"front\";\n      if (this._currentImage) {\n        this._currentImage.bringToFront();\n        this._setAutoZIndex(Math.max);\n      }\n      return this;\n    },\n\n    bringToBack() {\n      this.options.position = \"back\";\n      if (this._currentImage) {\n        this._currentImage.bringToBack();\n        this._setAutoZIndex(Math.min);\n      }\n      return this;\n    },\n\n    setZIndex(value) {\n      this.options.zIndex = value;\n      if (this._currentImage) {\n        this._currentImage.setZIndex(value);\n      }\n      return this;\n    },\n\n    _setAutoZIndex(compare) {\n      // go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n      if (!this._currentImage) {\n        return;\n      }\n      const layers = this._currentImage.getPane().children;\n      let edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n      for (let i = 0, len = layers.length, zIndex; i < len; i++) {\n        zIndex = layers[i].style.zIndex;\n        if (layers[i] !== this._currentImage._image && zIndex) {\n          edgeZIndex = compare(edgeZIndex, +zIndex);\n        }\n      }\n\n      if (isFinite(edgeZIndex)) {\n        this.options.zIndex = edgeZIndex + compare(-1, 1);\n        this.setZIndex(this.options.zIndex);\n      }\n    },\n\n    getAttribution() {\n      return this.options.attribution;\n    },\n\n    getOpacity() {\n      return this.options.opacity;\n    },\n\n    setOpacity(opacity) {\n      this.options.opacity = opacity;\n      if (this._currentImage) {\n        this._currentImage.setOpacity(opacity);\n      }\n      return this;\n    },\n\n    getTimeRange() {\n      return [this.options.from, this.options.to];\n    },\n\n    setTimeRange(from, to) {\n      this.options.from = from;\n      this.options.to = to;\n      this._update();\n      return this;\n    },\n\n    metadata(callback, context) {\n      this.service.metadata(callback, context);\n      return this;\n    },\n\n    authenticate(token) {\n      this.service.authenticate(token);\n      return this;\n    },\n\n    redraw() {\n      this._update();\n    },\n\n    _renderImage(url, bounds, contentType) {\n      if (this._map) {\n        // if no output directory has been specified for a service, MIME data will be returned\n        if (contentType) {\n          url = `data:${contentType};base64,${url}`;\n        }\n\n        // if server returns an inappropriate response, abort.\n        if (!url) {\n          return;\n        }\n\n        // create a new image overlay and add it to the map\n        // to start loading the image\n        // opacity is 0 while the image is loading\n        const image = new Overlay(url, bounds, {\n          opacity: 0,\n          crossOrigin: this.options.withCredentials\n            ? \"use-credentials\"\n            : this.options.useCors,\n          alt: this.options.alt,\n          pane: this.options.pane || this.getPane(),\n          interactive: this.options.interactive,\n        }).addTo(this._map);\n\n        // eslint-disable-next-line prefer-const\n        let onOverlayLoad;\n\n        const onOverlayError = function () {\n          this._map.removeLayer(image);\n          this.fire(\"error\");\n          image.off(\"load\", onOverlayLoad, this);\n        };\n\n        onOverlayLoad = function (e) {\n          image.off(\"error\", onOverlayError, this);\n          if (this._map) {\n            const newImage = e.target;\n            const oldImage = this._currentImage;\n\n            // if the bounds of this image matches the bounds that\n            // _renderImage was called with and we have a map with the same bounds\n            // hide the old image if there is one and set the opacity\n            // of the new image otherwise remove the new image\n            if (\n              newImage._bounds.equals(bounds) &&\n              newImage._bounds.equals(this._map.getBounds())\n            ) {\n              this._currentImage = newImage;\n\n              if (this.options.position === \"front\") {\n                this.bringToFront();\n              } else if (this.options.position === \"back\") {\n                this.bringToBack();\n              }\n\n              if (this.options.zIndex) {\n                this.setZIndex(this.options.zIndex);\n              }\n\n              if (this._map && this._currentImage._map) {\n                this._currentImage.setOpacity(this.options.opacity);\n              } else {\n                this._currentImage._map.removeLayer(this._currentImage);\n              }\n\n              if (oldImage && this._map) {\n                this._map.removeLayer(oldImage);\n              }\n\n              if (oldImage && oldImage._map) {\n                oldImage._map.removeLayer(oldImage);\n              }\n            } else {\n              this._map.removeLayer(newImage);\n            }\n          }\n\n          this.fire(\"load\", {\n            bounds,\n          });\n        };\n\n        // If loading the image fails\n        image.once(\"error\", onOverlayError, this);\n\n        // once the image loads\n        image.once(\"load\", onOverlayLoad, this);\n      }\n    },\n\n    _update() {\n      if (!this._map) {\n        return;\n      }\n\n      const zoom = this._map.getZoom();\n      const bounds = this._map.getBounds();\n\n      if (this._animatingZoom) {\n        return;\n      }\n\n      if (this._map._panTransition && this._map._panTransition._inProgress) {\n        return;\n      }\n\n      if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\n        if (this._currentImage) {\n          this._currentImage._map.removeLayer(this._currentImage);\n          this._currentImage = null;\n        }\n        return;\n      }\n\n      const params = this._buildExportParams();\n      L.Util.extend(params, this.options.requestParams);\n\n      if (params) {\n        this._requestExport(params, bounds);\n\n        this.fire(\"loading\", {\n          bounds,\n        });\n      } else if (this._currentImage) {\n        this._currentImage._map.removeLayer(this._currentImage);\n        this._currentImage = null;\n      }\n    },\n\n    _renderPopup(latlng, error, results, response) {\n      latlng = L.latLng(latlng);\n      if (this._shouldRenderPopup && this._lastClick.equals(latlng)) {\n        // add the popup to the map where the mouse was clicked at\n        const content = this._popupFunction(error, results, response);\n        if (content) {\n          this._popup.setLatLng(latlng).setContent(content).openOn(this._map);\n        }\n      }\n    },\n\n    _resetPopupState(e) {\n      this._shouldRenderPopup = false;\n      this._lastClick = e.latlng;\n    },\n\n    _calculateBbox() {\n      const pixelBounds = this._map.getPixelBounds();\n\n      const sw = this._map.unproject(pixelBounds.getBottomLeft());\n      const ne = this._map.unproject(pixelBounds.getTopRight());\n\n      const neProjected = this._map.options.crs.project(ne);\n      const swProjected = this._map.options.crs.project(sw);\n\n      // this ensures ne/sw are switched in polar maps where north/top bottom/south is inverted\n      const boundsProjected = L.bounds(neProjected, swProjected);\n\n      return [\n        boundsProjected.getBottomLeft().x,\n        boundsProjected.getBottomLeft().y,\n        boundsProjected.getTopRight().x,\n        boundsProjected.getTopRight().y,\n      ].join(\",\");\n    },\n\n    _calculateImageSize() {\n      // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying within the div\n      const bounds = this._map.getPixelBounds();\n      const size = this._map.getSize();\n\n      const sw = this._map.unproject(bounds.getBottomLeft());\n      const ne = this._map.unproject(bounds.getTopRight());\n\n      const top = this._map.latLngToLayerPoint(ne).y;\n      const bottom = this._map.latLngToLayerPoint(sw).y;\n\n      if (top > 0 || bottom < size.y) {\n        size.y = bottom - top;\n      }\n\n      return `${size.x},${size.y}`;\n    },\n  });\n\n  const ImageMapLayer = RasterLayer.extend({\n    options: {\n      updateInterval: 150,\n      format: \"jpgpng\",\n      transparent: true,\n      f: \"image\",\n    },\n\n    query() {\n      return this.service.query();\n    },\n\n    identify() {\n      return this.service.identify();\n    },\n\n    initialize(options) {\n      options = getUrlParams(options);\n      this.service = imageService(options);\n      this.service.addEventParent(this);\n\n      L.Util.setOptions(this, options);\n    },\n\n    setPixelType(pixelType) {\n      this.options.pixelType = pixelType;\n      this._update();\n      return this;\n    },\n\n    getPixelType() {\n      return this.options.pixelType;\n    },\n\n    setBandIds(bandIds) {\n      if (L.Util.isArray(bandIds)) {\n        this.options.bandIds = bandIds.join(\",\");\n      } else {\n        this.options.bandIds = bandIds.toString();\n      }\n      this._update();\n      return this;\n    },\n\n    getBandIds() {\n      return this.options.bandIds;\n    },\n\n    setNoData(noData, noDataInterpretation) {\n      if (L.Util.isArray(noData)) {\n        this.options.noData = noData.join(\",\");\n      } else {\n        this.options.noData = noData.toString();\n      }\n      if (noDataInterpretation) {\n        this.options.noDataInterpretation = noDataInterpretation;\n      }\n      this._update();\n      return this;\n    },\n\n    getNoData() {\n      return this.options.noData;\n    },\n\n    getNoDataInterpretation() {\n      return this.options.noDataInterpretation;\n    },\n\n    setRenderingRule(renderingRule) {\n      this.options.renderingRule = renderingRule;\n      this._update();\n    },\n\n    getRenderingRule() {\n      return this.options.renderingRule;\n    },\n\n    setMosaicRule(mosaicRule) {\n      this.options.mosaicRule = mosaicRule;\n      this._update();\n    },\n\n    getMosaicRule() {\n      return this.options.mosaicRule;\n    },\n\n    _getPopupData(e) {\n      const callback = L.Util.bind(function (error, results, response) {\n        if (error) {\n          return;\n        } // we really can't do anything here but authenticate or requesterror will fire\n        setTimeout(\n          L.Util.bind(function () {\n            this._renderPopup(e.latlng, error, results, response);\n          }, this),\n          300,\n        );\n      }, this);\n\n      const identifyRequest = this.identify().at(e.latlng);\n\n      // set mosaic rule for identify task if it is set for layer\n      if (this.options.mosaicRule) {\n        identifyRequest.setMosaicRule(this.options.mosaicRule);\n        // @TODO: force return catalog items too?\n      }\n\n      // @TODO: set rendering rule? Not sure,\n      // sometimes you want raw pixel values\n      // if (this.options.renderingRule) {\n      //   identifyRequest.setRenderingRule(this.options.renderingRule);\n      // }\n\n      identifyRequest.run(callback);\n\n      // set the flags to show the popup\n      this._shouldRenderPopup = true;\n      this._lastClick = e.latlng;\n    },\n\n    _buildExportParams() {\n      const sr = parseInt(this._map.options.crs.code.split(\":\")[1], 10);\n\n      const params = {\n        bbox: this._calculateBbox(),\n        size: this._calculateImageSize(),\n        format: this.options.format,\n        transparent: this.options.transparent,\n        bboxSR: sr,\n        imageSR: sr,\n      };\n\n      if (this.options.from && this.options.to) {\n        params.time = `${this.options.from.valueOf()},${this.options.to.valueOf()}`;\n      }\n\n      if (this.options.pixelType) {\n        params.pixelType = this.options.pixelType;\n      }\n\n      if (this.options.interpolation) {\n        params.interpolation = this.options.interpolation;\n      }\n\n      if (this.options.compressionQuality) {\n        params.compressionQuality = this.options.compressionQuality;\n      }\n\n      if (this.options.bandIds) {\n        params.bandIds = this.options.bandIds;\n      }\n\n      // 0 is falsy *and* a valid input parameter\n      if (this.options.noData === 0 || this.options.noData) {\n        params.noData = this.options.noData;\n      }\n\n      if (this.options.noDataInterpretation) {\n        params.noDataInterpretation = this.options.noDataInterpretation;\n      }\n\n      if (this.service.options.token) {\n        params.token = this.service.options.token;\n      }\n\n      if (this.options.renderingRule) {\n        params.renderingRule = JSON.stringify(this.options.renderingRule);\n      }\n\n      if (this.options.mosaicRule) {\n        params.mosaicRule = JSON.stringify(this.options.mosaicRule);\n      }\n\n      return params;\n    },\n\n    _requestExport(params, bounds) {\n      if (this.options.f === \"json\") {\n        this.service.request(\n          \"exportImage\",\n          params,\n          function (error, response) {\n            if (error) {\n              return;\n            } // we really can't do anything here but authenticate or requesterror will fire\n            if (this.options.token) {\n              response.href += `?token=${this.options.token}`;\n            }\n            if (this.options.proxy) {\n              response.href = `${this.options.proxy}?${response.href}`;\n            }\n            this._renderImage(response.href, bounds);\n          },\n          this,\n        );\n      } else {\n        params.f = \"image\";\n        let fullUrl = `${this.options.url}exportImage${L.Util.getParamString(params)}`;\n        if (this.options.proxy) {\n          fullUrl = `${this.options.proxy}?${fullUrl}`;\n        }\n        this._renderImage(fullUrl, bounds);\n      }\n    },\n  });\n\n  function imageMapLayer(url, options) {\n    return new ImageMapLayer(url, options);\n  }\n\n  const DynamicMapLayer = RasterLayer.extend({\n    options: {\n      updateInterval: 150,\n      layers: false,\n      layerDefs: false,\n      timeOptions: false,\n      format: \"png32\",\n      transparent: true,\n      f: \"json\",\n    },\n\n    initialize(options) {\n      options = getUrlParams(options);\n      this.service = mapService(options);\n      this.service.addEventParent(this);\n\n      L.Util.setOptions(this, options);\n    },\n\n    getDynamicLayers() {\n      return this.options.dynamicLayers;\n    },\n\n    setDynamicLayers(dynamicLayers) {\n      this.options.dynamicLayers = dynamicLayers;\n      this._update();\n      return this;\n    },\n\n    getLayers() {\n      return this.options.layers;\n    },\n\n    setLayers(layers) {\n      this.options.layers = layers;\n      this._update();\n      return this;\n    },\n\n    getLayerDefs() {\n      return this.options.layerDefs;\n    },\n\n    setLayerDefs(layerDefs) {\n      this.options.layerDefs = layerDefs;\n      this._update();\n      return this;\n    },\n\n    getTimeOptions() {\n      return this.options.timeOptions;\n    },\n\n    setTimeOptions(timeOptions) {\n      this.options.timeOptions = timeOptions;\n      this._update();\n      return this;\n    },\n\n    query() {\n      return this.service.query();\n    },\n\n    identify() {\n      return this.service.identify();\n    },\n\n    find() {\n      return this.service.find();\n    },\n\n    _getPopupData(e) {\n      const callback = L.Util.bind(function (error, featureCollection, response) {\n        if (error) {\n          return;\n        } // we really can't do anything here but authenticate or requesterror will fire\n        setTimeout(\n          L.Util.bind(function () {\n            this._renderPopup(e.latlng, error, featureCollection, response);\n          }, this),\n          300,\n        );\n      }, this);\n\n      let identifyRequest;\n      if (this.options.popup) {\n        identifyRequest = this.options.popup.on(this._map).at(e.latlng);\n      } else {\n        identifyRequest = this.identify().on(this._map).at(e.latlng);\n      }\n\n      // remove extraneous vertices from response features if it has not already been done\n      if (!identifyRequest.params.maxAllowableOffset) {\n        identifyRequest.simplify(this._map, 0.5);\n      }\n\n      if (\n        !(\n          this.options.popup &&\n          this.options.popup.params &&\n          this.options.popup.params.layers\n        )\n      ) {\n        if (this.options.layers) {\n          identifyRequest.layers(`visible:${this.options.layers.join(\",\")}`);\n        } else {\n          identifyRequest.layers(\"visible\");\n        }\n      }\n\n      // if present, pass layer ids and sql filters through to the identify task\n      if (\n        this.options.layerDefs &&\n        typeof this.options.layerDefs !== \"string\" &&\n        !identifyRequest.params.layerDefs\n      ) {\n        for (const id in this.options.layerDefs) {\n          if (Object.hasOwn(this.options.layerDefs, id)) {\n            identifyRequest.layerDef(id, this.options.layerDefs[id]);\n          }\n        }\n      }\n\n      identifyRequest.run(callback);\n\n      // set the flags to show the popup\n      this._shouldRenderPopup = true;\n      this._lastClick = e.latlng;\n    },\n\n    _buildExportParams() {\n      const sr = parseInt(this._map.options.crs.code.split(\":\")[1], 10);\n\n      const params = {\n        bbox: this._calculateBbox(),\n        size: this._calculateImageSize(),\n        dpi: 96,\n        format: this.options.format,\n        transparent: this.options.transparent,\n        bboxSR: sr,\n        imageSR: sr,\n      };\n\n      if (this.options.dynamicLayers) {\n        params.dynamicLayers = this.options.dynamicLayers;\n      }\n\n      if (this.options.layers) {\n        if (this.options.layers.length === 0) {\n          return;\n        }\n        params.layers = `show:${this.options.layers.join(\",\")}`;\n      }\n\n      if (this.options.layerDefs) {\n        params.layerDefs =\n          typeof this.options.layerDefs === \"string\"\n            ? this.options.layerDefs\n            : JSON.stringify(this.options.layerDefs);\n      }\n\n      if (this.options.timeOptions) {\n        params.timeOptions = JSON.stringify(this.options.timeOptions);\n      }\n\n      if (this.options.from && this.options.to) {\n        params.time = `${this.options.from.valueOf()},${this.options.to.valueOf()}`;\n      }\n\n      if (this.service.options.token) {\n        params.token = this.service.options.token;\n      }\n\n      if (this.options.proxy) {\n        params.proxy = this.options.proxy;\n      }\n\n      // use a timestamp to bust server cache\n      if (this.options.disableCache) {\n        params._ts = Date.now();\n      }\n\n      return params;\n    },\n\n    _requestExport(params, bounds) {\n      if (this.options.f === \"json\") {\n        this.service.request(\n          \"export\",\n          params,\n          function (error, response) {\n            if (error) {\n              return;\n            } // we really can't do anything here but authenticate or requesterror will fire\n\n            if (this.options.token && response.href) {\n              response.href += `?token=${this.options.token}`;\n            }\n            if (this.options.proxy && response.href) {\n              response.href = `${this.options.proxy}?${response.href}`;\n            }\n            if (response.href) {\n              this._renderImage(response.href, bounds);\n            } else {\n              this._renderImage(response.imageData, bounds, response.contentType);\n            }\n          },\n          this,\n        );\n      } else {\n        params.f = \"image\";\n        let fullUrl = `${this.options.url}export${L.Util.getParamString(params)}`;\n        if (this.options.proxy) {\n          fullUrl = `${this.options.proxy}?${fullUrl}`;\n        }\n        this._renderImage(fullUrl, bounds);\n      }\n    },\n  });\n\n  function dynamicMapLayer(url, options) {\n    return new DynamicMapLayer(url, options);\n  }\n\n  const FeatureGrid = L.Layer.extend({\n    // @section\n    // @aka GridLayer options\n    options: {\n      // @option cellSize: Number|Point = 256\n      // Width and height of cells in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n      cellSize: 512,\n\n      // @option updateWhenIdle: Boolean = (depends)\n      // Load new cells only when panning ends.\n      // `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n      // `false` otherwise in order to display new cells _during_ panning, since it is easy to pan outside the\n      // [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n      updateWhenIdle: L.Browser.mobile,\n\n      // @option updateInterval: Number = 150\n      // Cells will not update more than once every `updateInterval` milliseconds when panning.\n      updateInterval: 150,\n\n      // @option noWrap: Boolean = false\n      // Whether the layer is wrapped around the antimeridian. If `true`, the\n      // GridLayer will only be displayed once at low zoom levels. Has no\n      // effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n      // in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n      // cells outside the CRS limits.\n      noWrap: false,\n\n      // @option keepBuffer: Number = 1.5\n      // When panning the map, keep this many rows and columns of cells before unloading them.\n      keepBuffer: 1.5,\n    },\n\n    initialize(options) {\n      L.Util.setOptions(this, options);\n    },\n\n    onAdd() {\n      this._cells = {};\n      this._activeCells = {};\n      this._resetView();\n      this._update();\n    },\n\n    onRemove() {\n      this._removeAllCells();\n      this._cellZoom = undefined;\n    },\n\n    // @method isLoading: Boolean\n    // Returns `true` if any cell in the grid layer has not finished loading.\n    isLoading() {\n      return this._loading;\n    },\n\n    // @method redraw: this\n    // Causes the layer to clear all the cells and request them again.\n    redraw() {\n      if (this._map) {\n        this._removeAllCells();\n        this._update();\n      }\n      return this;\n    },\n\n    getEvents() {\n      const events = {\n        viewprereset: this._invalidateAll,\n        viewreset: this._resetView,\n        zoom: this._resetView,\n        moveend: this._onMoveEnd,\n      };\n\n      if (!this.options.updateWhenIdle) {\n        // update cells on move, but not more often than once per given interval\n        if (!this._onMove) {\n          this._onMove = L.Util.throttle(\n            this._onMoveEnd,\n            this.options.updateInterval,\n            this,\n          );\n        }\n\n        events.move = this._onMove;\n      }\n\n      return events;\n    },\n\n    // @section Extension methods\n    // Layers extending `GridLayer` shall reimplement the following method.\n    // @method createCell(coords: Object, done?: Function): HTMLElement\n    // Called only internally, must be overridden by classes extending `GridLayer`.\n    // Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n    // is specified, it must be called when the cell has finished loading and drawing.\n    createCell() {\n      return document.createElement(\"div\");\n    },\n\n    removeCell() {},\n\n    reuseCell() {},\n\n    cellLeave() {},\n\n    cellEnter() {},\n    // @section\n    // @method getCellSize: Point\n    // Normalizes the [cellSize option](#gridlayer-cellsize) into a point. Used by the `createCell()` method.\n    getCellSize() {\n      const s = this.options.cellSize;\n      return s instanceof L.Point ? s : new L.Point(s, s);\n    },\n\n    _pruneCells() {\n      if (!this._map) {\n        return;\n      }\n\n      let key, cell;\n\n      for (key in this._cells) {\n        cell = this._cells[key];\n        cell.retain = cell.current;\n      }\n\n      for (key in this._cells) {\n        cell = this._cells[key];\n        if (cell.current && !cell.active) {\n          const coords = cell.coords;\n          if (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n            this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n          }\n        }\n      }\n\n      for (key in this._cells) {\n        if (!this._cells[key].retain) {\n          this._removeCell(key);\n        }\n      }\n    },\n\n    _removeAllCells() {\n      for (const key in this._cells) {\n        this._removeCell(key);\n      }\n    },\n\n    _invalidateAll() {\n      this._removeAllCells();\n\n      this._cellZoom = undefined;\n    },\n\n    _retainParent(x, y, z, minZoom) {\n      const x2 = Math.floor(x / 2);\n      const y2 = Math.floor(y / 2);\n      const z2 = z - 1;\n      const coords2 = new L.Point(+x2, +y2);\n      coords2.z = +z2;\n\n      const key = this._cellCoordsToKey(coords2);\n      const cell = this._cells[key];\n\n      if (cell && cell.active) {\n        cell.retain = true;\n        return true;\n      } else if (cell && cell.loaded) {\n        cell.retain = true;\n      }\n\n      if (z2 > minZoom) {\n        return this._retainParent(x2, y2, z2, minZoom);\n      }\n\n      return false;\n    },\n\n    _retainChildren(x, y, z, maxZoom) {\n      for (let i = 2 * x; i < 2 * x + 2; i++) {\n        for (let j = 2 * y; j < 2 * y + 2; j++) {\n          const coords = new L.Point(i, j);\n          coords.z = z + 1;\n\n          const key = this._cellCoordsToKey(coords);\n          const cell = this._cells[key];\n\n          if (cell && cell.active) {\n            cell.retain = true;\n            continue;\n          } else if (cell && cell.loaded) {\n            cell.retain = true;\n          }\n\n          if (z + 1 < maxZoom) {\n            this._retainChildren(i, j, z + 1, maxZoom);\n          }\n        }\n      }\n    },\n\n    _resetView(e) {\n      const animating = e && (e.pinch || e.flyTo);\n\n      if (animating) {\n        return;\n      }\n\n      this._setView(\n        this._map.getCenter(),\n        this._map.getZoom(),\n        animating,\n        animating,\n      );\n    },\n\n    _setView(center, zoom, noPrune, noUpdate) {\n      const cellZoom = Math.round(zoom);\n\n      if (!noUpdate) {\n        this._cellZoom = cellZoom;\n\n        if (this._abortLoading) {\n          this._abortLoading();\n        }\n\n        this._resetGrid();\n\n        if (cellZoom !== undefined) {\n          this._update(center);\n        }\n\n        if (!noPrune) {\n          this._pruneCells();\n        }\n\n        // Flag to prevent _updateOpacity from pruning cells during\n        // a zoom anim or a pinch gesture\n        this._noPrune = !!noPrune;\n      }\n    },\n\n    _resetGrid() {\n      const map = this._map;\n      const crs = map.options.crs;\n      const cellSize = (this._cellSize = this.getCellSize());\n      const cellZoom = this._cellZoom;\n\n      const bounds = this._map.getPixelWorldBounds(this._cellZoom);\n      if (bounds) {\n        this._globalCellRange = this._pxBoundsToCellRange(bounds);\n      }\n\n      this._wrapX = crs.wrapLng &&\n        !this.options.noWrap && [\n          Math.floor(map.project([0, crs.wrapLng[0]], cellZoom).x / cellSize.x),\n          Math.ceil(map.project([0, crs.wrapLng[1]], cellZoom).x / cellSize.y),\n        ];\n      this._wrapY = crs.wrapLat &&\n        !this.options.noWrap && [\n          Math.floor(map.project([crs.wrapLat[0], 0], cellZoom).y / cellSize.x),\n          Math.ceil(map.project([crs.wrapLat[1], 0], cellZoom).y / cellSize.y),\n        ];\n    },\n\n    _onMoveEnd(e) {\n      const animating = e && (e.pinch || e.flyTo);\n\n      if (animating || !this._map || this._map._animatingZoom) {\n        return;\n      }\n\n      this._update();\n    },\n\n    _getCelldPixelBounds(center) {\n      const map = this._map;\n      const mapZoom = map._animatingZoom\n        ? Math.max(map._animateToZoom, map.getZoom())\n        : map.getZoom();\n      const scale = map.getZoomScale(mapZoom, this._cellZoom);\n      const pixelCenter = map.project(center, this._cellZoom).floor();\n      const halfSize = map.getSize().divideBy(scale * 2);\n\n      return new L.Bounds(\n        pixelCenter.subtract(halfSize),\n        pixelCenter.add(halfSize),\n      );\n    },\n\n    // Private method to load cells in the grid's active zoom level according to map bounds\n    _update(center) {\n      const map = this._map;\n      if (!map) {\n        return;\n      }\n      const zoom = Math.round(map.getZoom());\n\n      if (center === undefined) {\n        center = map.getCenter();\n      }\n\n      const pixelBounds = this._getCelldPixelBounds(center);\n      const cellRange = this._pxBoundsToCellRange(pixelBounds);\n      const cellCenter = cellRange.getCenter();\n      const queue = [];\n      const margin = this.options.keepBuffer;\n      const noPruneRange = new L.Bounds(\n        cellRange.getBottomLeft().subtract([margin, -margin]),\n        cellRange.getTopRight().add([margin, -margin]),\n      );\n\n      // Sanity check: panic if the cell range contains Infinity somewhere.\n      if (\n        !(\n          isFinite(cellRange.min.x) &&\n          isFinite(cellRange.min.y) &&\n          isFinite(cellRange.max.x) &&\n          isFinite(cellRange.max.y)\n        )\n      ) {\n        throw new Error(\"Attempted to load an infinite number of cells\");\n      }\n\n      for (const key in this._cells) {\n        const c = this._cells[key].coords;\n        if (\n          c.z !== this._cellZoom ||\n          !noPruneRange.contains(new L.Point(c.x, c.y))\n        ) {\n          this._cells[key].current = false;\n        }\n      }\n\n      // _update just loads more cells. If the cell zoom level differs too much\n      // from the map's, let _setView reset levels and prune old cells.\n      if (Math.abs(zoom - this._cellZoom) > 1) {\n        this._setView(center, zoom);\n        return;\n      }\n\n      // create a queue of coordinates to load cells from\n      for (let j = cellRange.min.y; j <= cellRange.max.y; j++) {\n        for (let i = cellRange.min.x; i <= cellRange.max.x; i++) {\n          const coords = new L.Point(i, j);\n          coords.z = this._cellZoom;\n\n          if (!this._isValidCell(coords)) {\n            continue;\n          }\n\n          const cell = this._cells[this._cellCoordsToKey(coords)];\n          if (cell) {\n            cell.current = true;\n          } else {\n            queue.push(coords);\n          }\n        }\n      }\n\n      // sort cell queue to load cells in order of their distance to center\n      queue.sort((a, b) => a.distanceTo(cellCenter) - b.distanceTo(cellCenter));\n\n      if (queue.length !== 0) {\n        // if it's the first batch of cells to load\n        if (!this._loading) {\n          this._loading = true;\n        }\n\n        for (let i = 0; i < queue.length; i++) {\n          const _key = this._cellCoordsToKey(queue[i]);\n          const _coords = this._keyToCellCoords(_key);\n          if (this._activeCells[_coords]) {\n            this._reuseCell(queue[i]);\n          } else {\n            this._createCell(queue[i]);\n          }\n        }\n      }\n    },\n\n    _isValidCell(coords) {\n      const crs = this._map.options.crs;\n\n      if (!crs.infinite) {\n        // don't load cell if it's out of bounds and not wrapped\n        const bounds = this._globalCellRange;\n        if (\n          (!crs.wrapLng &&\n            (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n          (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))\n        ) {\n          return false;\n        }\n      }\n\n      if (!this.options.bounds) {\n        return true;\n      }\n\n      // don't load cell if it doesn't intersect the bounds in options\n      const cellBounds = this._cellCoordsToBounds(coords);\n      return L.latLngBounds(this.options.bounds).overlaps(cellBounds);\n    },\n\n    _keyToBounds(key) {\n      return this._cellCoordsToBounds(this._keyToCellCoords(key));\n    },\n\n    _cellCoordsToNwSe(coords) {\n      const map = this._map;\n      const cellSize = this.getCellSize();\n      const nwPoint = coords.scaleBy(cellSize);\n      const sePoint = nwPoint.add(cellSize);\n      const nw = map.unproject(nwPoint, coords.z);\n      const se = map.unproject(sePoint, coords.z);\n\n      return [nw, se];\n    },\n\n    // converts cell coordinates to its geographical bounds\n    _cellCoordsToBounds(coords) {\n      const bp = this._cellCoordsToNwSe(coords);\n      let bounds = new L.LatLngBounds(bp[0], bp[1]);\n\n      if (!this.options.noWrap) {\n        bounds = this._map.wrapLatLngBounds(bounds);\n      }\n      return bounds;\n    },\n    // converts cell coordinates to key for the cell cache\n    _cellCoordsToKey(coords) {\n      return `${coords.x}:${coords.y}:${coords.z}`;\n    },\n\n    // converts cell cache key to coordinates\n    _keyToCellCoords(key) {\n      const k = key.split(\":\");\n      const coords = new L.Point(+k[0], +k[1]);\n\n      coords.z = +k[2];\n      return coords;\n    },\n\n    _removeCell(key) {\n      const cell = this._cells[key];\n\n      if (!cell) {\n        return;\n      }\n\n      const coords = this._keyToCellCoords(key);\n      const wrappedCoords = this._wrapCoords(coords);\n      const cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\n\n      cell.current = false;\n\n      delete this._cells[key];\n      this._activeCells[key] = cell;\n\n      this.cellLeave(cellBounds, wrappedCoords, key);\n\n      this.fire(\"cellleave\", {\n        key,\n        coords: wrappedCoords,\n        bounds: cellBounds,\n      });\n    },\n\n    _reuseCell(coords) {\n      const key = this._cellCoordsToKey(coords);\n\n      // save cell in cache\n      this._cells[key] = this._activeCells[key];\n      this._cells[key].current = true;\n\n      const wrappedCoords = this._wrapCoords(coords);\n      const cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\n\n      this.cellEnter(cellBounds, wrappedCoords, key);\n\n      this.fire(\"cellenter\", {\n        key,\n        coords: wrappedCoords,\n        bounds: cellBounds,\n      });\n    },\n\n    _createCell(coords) {\n      const key = this._cellCoordsToKey(coords);\n\n      const wrappedCoords = this._wrapCoords(coords);\n      const cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\n\n      this.createCell(cellBounds, wrappedCoords, key);\n\n      this.fire(\"cellcreate\", {\n        key,\n        coords: wrappedCoords,\n        bounds: cellBounds,\n      });\n\n      // save cell in cache\n      this._cells[key] = {\n        coords,\n        current: true,\n      };\n\n      L.Util.requestAnimFrame(this._pruneCells, this);\n    },\n\n    _cellReady(coords, err, cell) {\n      const key = this._cellCoordsToKey(coords);\n\n      cell = this._cells[key];\n\n      if (!cell) {\n        return;\n      }\n\n      cell.loaded = +new Date();\n\n      cell.active = true;\n    },\n\n    _getCellPos(coords) {\n      return coords.scaleBy(this.getCellSize());\n    },\n\n    _wrapCoords(coords) {\n      const newCoords = new L.Point(\n        this._wrapX ? L.Util.wrapNum(coords.x, this._wrapX) : coords.x,\n        this._wrapY ? L.Util.wrapNum(coords.y, this._wrapY) : coords.y,\n      );\n      newCoords.z = coords.z;\n      return newCoords;\n    },\n\n    _pxBoundsToCellRange(bounds) {\n      const cellSize = this.getCellSize();\n      return new L.Bounds(\n        bounds.min.unscaleBy(cellSize).floor(),\n        bounds.max.unscaleBy(cellSize).ceil().subtract([1, 1]),\n      );\n    },\n  });\n\n  function BinarySearchIndex (values) {\n    this.values = [].concat(values || []);\n  }\n\n  BinarySearchIndex.prototype.query = function (value) {\n    var index = this.getIndex(value);\n    return this.values[index];\n  };\n\n  BinarySearchIndex.prototype.getIndex = function getIndex (value) {\n    if (this.dirty) {\n      this.sort();\n    }\n\n    var minIndex = 0;\n    var maxIndex = this.values.length - 1;\n    var currentIndex;\n    var currentElement;\n\n    while (minIndex <= maxIndex) {\n      currentIndex = (minIndex + maxIndex) / 2 | 0;\n      currentElement = this.values[Math.round(currentIndex)];\n      if (+currentElement.value < +value) {\n        minIndex = currentIndex + 1;\n      } else if (+currentElement.value > +value) {\n        maxIndex = currentIndex - 1;\n      } else {\n        return currentIndex;\n      }\n    }\n\n    return Math.abs(~maxIndex);\n  };\n\n  BinarySearchIndex.prototype.between = function between (start, end) {\n    var startIndex = this.getIndex(start);\n    var endIndex = this.getIndex(end);\n\n    if (startIndex === 0 && endIndex === 0) {\n      return [];\n    }\n\n    while (this.values[startIndex - 1] && this.values[startIndex - 1].value === start) {\n      startIndex--;\n    }\n\n    while (this.values[endIndex + 1] && this.values[endIndex + 1].value === end) {\n      endIndex++;\n    }\n\n    if (this.values[endIndex] && this.values[endIndex].value === end && this.values[endIndex + 1]) {\n      endIndex++;\n    }\n\n    return this.values.slice(startIndex, endIndex);\n  };\n\n  BinarySearchIndex.prototype.insert = function insert (item) {\n    this.values.splice(this.getIndex(item.value), 0, item);\n    return this;\n  };\n\n  BinarySearchIndex.prototype.bulkAdd = function bulkAdd (items, sort) {\n    this.values = this.values.concat([].concat(items || []));\n\n    if (sort) {\n      this.sort();\n    } else {\n      this.dirty = true;\n    }\n\n    return this;\n  };\n\n  BinarySearchIndex.prototype.sort = function sort () {\n    this.values.sort(function (a, b) {\n      return +b.value - +a.value;\n    }).reverse();\n    this.dirty = false;\n    return this;\n  };\n\n  const FeatureManager = FeatureGrid.extend({\n    /**\n     * Options\n     */\n\n    options: {\n      attribution: null,\n      where: \"1=1\",\n      fields: [\"*\"],\n      from: false,\n      to: false,\n      timeField: false,\n      timeFilterMode: \"server\",\n      simplifyFactor: 0,\n      precision: 6,\n      fetchAllFeatures: false,\n    },\n\n    /**\n     * Constructor\n     */\n\n    initialize(options) {\n      FeatureGrid.prototype.initialize.call(this, options);\n\n      options = getUrlParams(options);\n      options = L.Util.setOptions(this, options);\n\n      this.service = featureLayerService(options);\n      this.service.addEventParent(this);\n\n      // use case insensitive regex to look for common fieldnames used for indexing\n      if (this.options.fields[0] !== \"*\") {\n        let oidCheck = false;\n        for (let i = 0; i < this.options.fields.length; i++) {\n          if (this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)) {\n            oidCheck = true;\n          }\n        }\n        if (oidCheck === false) {\n          warn(\n            \"no known esriFieldTypeOID field detected in fields Array.  Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.\",\n          );\n        }\n      }\n\n      if (this.options.timeField.start && this.options.timeField.end) {\n        this._startTimeIndex = new BinarySearchIndex();\n        this._endTimeIndex = new BinarySearchIndex();\n      } else if (this.options.timeField) {\n        this._timeIndex = new BinarySearchIndex();\n      }\n\n      this._cache = {};\n      this._currentSnapshot = []; // cache of what layers should be active\n      this._activeRequests = 0;\n    },\n\n    /**\n     * Layer Interface\n     */\n\n    onAdd(map) {\n      // include 'Powered by Esri' in map attribution\n      setEsriAttribution(map);\n\n      this.service.metadata(function (err, metadata) {\n        if (!err) {\n          const supportedFormats = metadata.supportedQueryFormats;\n\n          // Check if someone has requested that we don't use geoJSON, even if it's available\n          let forceJsonFormat = false;\n          if (\n            this.service.options.isModern === false ||\n            this.options.fetchAllFeatures\n          ) {\n            forceJsonFormat = true;\n          }\n\n          // Unless we've been told otherwise, check to see whether service can emit GeoJSON natively\n          if (\n            !forceJsonFormat &&\n            supportedFormats &&\n            supportedFormats.indexOf(\"geoJSON\") !== -1\n          ) {\n            this.service.options.isModern = true;\n          }\n\n          if (metadata.objectIdField) {\n            this.service.options.idAttribute = metadata.objectIdField;\n          }\n\n          // add copyright text listed in service metadata\n          if (\n            !this.options.attribution &&\n            map.attributionControl &&\n            metadata.copyrightText\n          ) {\n            this.options.attribution = metadata.copyrightText;\n            map.attributionControl.addAttribution(this.getAttribution());\n          }\n        }\n      }, this);\n\n      map.on(\"zoomend\", this._handleZoomChange, this);\n\n      return FeatureGrid.prototype.onAdd.call(this, map);\n    },\n\n    onRemove(map) {\n      removeEsriAttribution(map);\n      map.off(\"zoomend\", this._handleZoomChange, this);\n\n      return FeatureGrid.prototype.onRemove.call(this, map);\n    },\n\n    getAttribution() {\n      return this.options.attribution;\n    },\n\n    /**\n     * Feature Management\n     */\n\n    createCell(bounds, coords) {\n      // dont fetch features outside the scale range defined for the layer\n      if (this._visibleZoom()) {\n        this._requestFeatures(bounds, coords);\n      }\n    },\n\n    _requestFeatures(bounds, coords, callback, offset) {\n      this._activeRequests++;\n\n      // default param\n      offset = offset || 0;\n\n      const originalWhere = this.options.where;\n\n      // our first active request fires loading\n      if (this._activeRequests === 1) {\n        this.fire(\n          \"loading\",\n          {\n            bounds,\n          },\n          true,\n        );\n      }\n\n      return this._buildQuery(bounds, offset).run(function (\n        error,\n        featureCollection,\n        response,\n      ) {\n        if (response && response.exceededTransferLimit) {\n          this.fire(\"drawlimitexceeded\");\n        }\n\n        // the where changed while this request was being run so don't it.\n        if (this.options.where !== originalWhere) {\n          return;\n        }\n\n        // no error, features\n        if (!error && featureCollection && featureCollection.features.length) {\n          // schedule adding features until the next animation frame\n          L.Util.requestAnimFrame(\n            L.Util.bind(function () {\n              this._addFeatures(featureCollection.features, coords);\n              this._postProcessFeatures(bounds);\n            }, this),\n          );\n        }\n\n        // no error, no features\n        if (!error && featureCollection && !featureCollection.features.length) {\n          this._postProcessFeatures(bounds);\n        }\n\n        if (error) {\n          this._postProcessFeatures(bounds);\n        }\n\n        if (callback) {\n          callback.call(this, error, featureCollection);\n        }\n        if (\n          response &&\n          (response.exceededTransferLimit ||\n            (response.properties && response.properties.exceededTransferLimit)) &&\n          this.options.fetchAllFeatures\n        ) {\n          this._requestFeatures(\n            bounds,\n            coords,\n            callback,\n            offset + featureCollection.features.length,\n          );\n        }\n      }, this);\n    },\n\n    _postProcessFeatures(bounds) {\n      // deincrement the request counter now that we have processed features\n      this._activeRequests--;\n\n      // if there are no more active requests fire a load event for this view\n      if (this._activeRequests <= 0) {\n        this.fire(\"load\", {\n          bounds,\n        });\n      }\n    },\n\n    _cacheKey(coords) {\n      return `${coords.z}:${coords.x}:${coords.y}`;\n    },\n\n    _addFeatures(features, coords) {\n      // coords is optional - will be false if coming from addFeatures() function\n      let key;\n      if (coords) {\n        key = this._cacheKey(coords);\n        this._cache[key] = this._cache[key] || [];\n      }\n\n      for (let i = features.length - 1; i >= 0; i--) {\n        const id = features[i].id;\n\n        if (this._currentSnapshot.indexOf(id) === -1) {\n          this._currentSnapshot.push(id);\n        }\n        if (typeof key !== \"undefined\" && this._cache[key].indexOf(id) === -1) {\n          this._cache[key].push(id);\n        }\n      }\n\n      if (this.options.timeField) {\n        this._buildTimeIndexes(features);\n      }\n\n      this.createLayers(features);\n    },\n\n    _buildQuery(bounds, offset) {\n      let query = this.service\n        .query()\n        .intersects(bounds)\n        .where(this.options.where)\n        .fields(this.options.fields)\n        .precision(this.options.precision);\n\n      if (this.options.fetchAllFeatures && !isNaN(parseInt(offset))) {\n        query = query.offset(offset);\n      }\n\n      query.params[\"resultType\"] = \"tile\";\n\n      if (this.options.requestParams) {\n        L.Util.extend(query.params, this.options.requestParams);\n      }\n\n      if (this.options.simplifyFactor) {\n        query.simplify(this._map, this.options.simplifyFactor);\n      }\n\n      if (\n        this.options.timeFilterMode === \"server\" &&\n        this.options.from &&\n        this.options.to\n      ) {\n        query.between(this.options.from, this.options.to);\n      }\n\n      return query;\n    },\n\n    /**\n     * Where Methods\n     */\n\n    setWhere(where, callback, context) {\n      this.options.where = where && where.length ? where : \"1=1\";\n\n      const oldSnapshot = [];\n      const newSnapshot = [];\n      let pendingRequests = 0;\n      let requestError = null;\n      const requestCallback = L.Util.bind(function (error, featureCollection) {\n        if (error) {\n          requestError = error;\n        }\n\n        if (featureCollection) {\n          for (let i = featureCollection.features.length - 1; i >= 0; i--) {\n            newSnapshot.push(featureCollection.features[i].id);\n          }\n        }\n\n        pendingRequests--;\n\n        if (\n          pendingRequests <= 0 &&\n          this._visibleZoom() &&\n          where === this.options.where // the where is still the same so use this one\n        ) {\n          this._currentSnapshot = newSnapshot;\n          // schedule adding features for the next animation frame\n          L.Util.requestAnimFrame(\n            L.Util.bind(function () {\n              this.removeLayers(oldSnapshot);\n              this.addLayers(newSnapshot);\n              if (callback) {\n                callback.call(context, requestError);\n              }\n            }, this),\n          );\n        }\n      }, this);\n\n      for (let i = this._currentSnapshot.length - 1; i >= 0; i--) {\n        oldSnapshot.push(this._currentSnapshot[i]);\n      }\n\n      this._cache = {};\n\n      for (const key in this._cells) {\n        pendingRequests++;\n        const coords = this._keyToCellCoords(key);\n        const bounds = this._cellCoordsToBounds(coords);\n        this._requestFeatures(bounds, coords, requestCallback);\n      }\n\n      return this;\n    },\n\n    getWhere() {\n      return this.options.where;\n    },\n\n    /**\n     * Time Range Methods\n     */\n\n    getTimeRange() {\n      return [this.options.from, this.options.to];\n    },\n\n    setTimeRange(from, to, callback, context) {\n      const oldFrom = this.options.from;\n      const oldTo = this.options.to;\n      let pendingRequests = 0;\n      let requestError = null;\n      const requestCallback = L.Util.bind(function (error) {\n        if (error) {\n          requestError = error;\n        }\n        this._filterExistingFeatures(oldFrom, oldTo, from, to);\n\n        pendingRequests--;\n\n        if (callback && pendingRequests <= 0) {\n          callback.call(context, requestError);\n        }\n      }, this);\n\n      this.options.from = from;\n      this.options.to = to;\n\n      this._filterExistingFeatures(oldFrom, oldTo, from, to);\n\n      if (this.options.timeFilterMode === \"server\") {\n        for (const key in this._cells) {\n          pendingRequests++;\n          const coords = this._keyToCellCoords(key);\n          const bounds = this._cellCoordsToBounds(coords);\n          this._requestFeatures(bounds, coords, requestCallback);\n        }\n      }\n\n      return this;\n    },\n\n    refresh() {\n      this.setWhere(this.options.where);\n    },\n\n    _filterExistingFeatures(oldFrom, oldTo, newFrom, newTo) {\n      const layersToRemove =\n        oldFrom && oldTo\n          ? this._getFeaturesInTimeRange(oldFrom, oldTo)\n          : this._currentSnapshot;\n      const layersToAdd = this._getFeaturesInTimeRange(newFrom, newTo);\n\n      if (layersToAdd.indexOf) {\n        for (let i = 0; i < layersToAdd.length; i++) {\n          const shouldRemoveLayer = layersToRemove.indexOf(layersToAdd[i]);\n          if (shouldRemoveLayer >= 0) {\n            layersToRemove.splice(shouldRemoveLayer, 1);\n          }\n        }\n      }\n\n      // schedule adding features until the next animation frame\n      L.Util.requestAnimFrame(\n        L.Util.bind(function () {\n          this.removeLayers(layersToRemove);\n          this.addLayers(layersToAdd);\n        }, this),\n      );\n    },\n\n    _getFeaturesInTimeRange(start, end) {\n      const ids = [];\n      let search;\n\n      if (this.options.timeField.start && this.options.timeField.end) {\n        const startTimes = this._startTimeIndex.between(start, end);\n        const endTimes = this._endTimeIndex.between(start, end);\n        search = startTimes.concat(endTimes);\n      } else if (this._timeIndex) {\n        search = this._timeIndex.between(start, end);\n      } else {\n        warn(\n          \"You must set timeField in the layer constructor in order to manipulate the start and end time filter.\",\n        );\n        return [];\n      }\n\n      for (let i = search.length - 1; i >= 0; i--) {\n        ids.push(search[i].id);\n      }\n\n      return ids;\n    },\n\n    _buildTimeIndexes(geojson) {\n      let i;\n      let feature;\n      if (this.options.timeField.start && this.options.timeField.end) {\n        const startTimeEntries = [];\n        const endTimeEntries = [];\n        for (i = geojson.length - 1; i >= 0; i--) {\n          feature = geojson[i];\n          startTimeEntries.push({\n            id: feature.id,\n            value: new Date(feature.properties[this.options.timeField.start]),\n          });\n          endTimeEntries.push({\n            id: feature.id,\n            value: new Date(feature.properties[this.options.timeField.end]),\n          });\n        }\n        this._startTimeIndex.bulkAdd(startTimeEntries);\n        this._endTimeIndex.bulkAdd(endTimeEntries);\n      } else {\n        const timeEntries = [];\n        for (i = geojson.length - 1; i >= 0; i--) {\n          feature = geojson[i];\n          timeEntries.push({\n            id: feature.id,\n            value: new Date(feature.properties[this.options.timeField]),\n          });\n        }\n\n        this._timeIndex.bulkAdd(timeEntries);\n      }\n    },\n\n    _featureWithinTimeRange(feature) {\n      if (!this.options.from || !this.options.to) {\n        return true;\n      }\n\n      const from = +this.options.from.valueOf();\n      const to = +this.options.to.valueOf();\n\n      if (typeof this.options.timeField === \"string\") {\n        const date = +feature.properties[this.options.timeField];\n        return date >= from && date <= to;\n      }\n\n      if (this.options.timeField.start && this.options.timeField.end) {\n        const startDate = +feature.properties[this.options.timeField.start];\n        const endDate = +feature.properties[this.options.timeField.end];\n        return (\n          (startDate >= from && startDate <= to) ||\n          (endDate >= from && endDate <= to) ||\n          (startDate <= from && endDate >= to)\n        );\n      }\n    },\n\n    _visibleZoom() {\n      // check to see whether the current zoom level of the map is within the optional limit defined for the FeatureLayer\n      if (!this._map) {\n        return false;\n      }\n      const zoom = this._map.getZoom();\n      if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\n        return false;\n      }\n      return true;\n    },\n\n    _handleZoomChange() {\n      if (!this._visibleZoom()) {\n        // if we have moved outside the visible zoom range clear the current snapshot, no layers should be active\n        this.removeLayers(this._currentSnapshot);\n        this._currentSnapshot = [];\n      } else {\n        /*\n        for every cell in this._cells\n          1. Get the cache key for the coords of the cell\n          2. If this._cache[key] exists it will be an array of feature IDs.\n          3. Call this.addLayers(this._cache[key]) to instruct the feature layer to add the layers back.\n        */\n        for (const i in this._cells) {\n          const coords = this._cells[i].coords;\n          const key = this._cacheKey(coords);\n          if (this._cache[key]) {\n            this.addLayers(this._cache[key]);\n          }\n        }\n      }\n    },\n\n    /**\n     * Service Methods\n     */\n\n    authenticate(token) {\n      this.service.authenticate(token);\n      return this;\n    },\n\n    metadata(callback, context) {\n      this.service.metadata(callback, context);\n      return this;\n    },\n\n    query() {\n      return this.service.query();\n    },\n\n    _getMetadata(callback) {\n      if (this._metadata) {\n        let error;\n        callback(error, this._metadata);\n      } else {\n        this.metadata(\n          L.Util.bind(function (error, response) {\n            this._metadata = response;\n            callback(error, this._metadata);\n          }, this),\n        );\n      }\n    },\n\n    addFeature(feature, callback, context) {\n      this.addFeatures(feature, callback, context);\n    },\n\n    addFeatures(features, callback, context) {\n      this._getMetadata(\n        L.Util.bind(function (error, metadata) {\n          if (error) {\n            if (callback) {\n              callback.call(this, error, null);\n            }\n            return;\n          }\n          // GeoJSON featureCollection or simple feature\n          const featuresArray = features.features\n            ? features.features\n            : [features];\n\n          this.service.addFeatures(\n            features,\n            L.Util.bind(function (error, response) {\n              if (!error) {\n                for (let i = featuresArray.length - 1; i >= 0; i--) {\n                  // assign ID from result to appropriate objectid field from service metadata\n                  featuresArray[i].properties[metadata.objectIdField] =\n                    featuresArray.length > 1\n                      ? response[i].objectId\n                      : response.objectId;\n                  // we also need to update the geojson id for createLayers() to function\n                  featuresArray[i].id =\n                    featuresArray.length > 1\n                      ? response[i].objectId\n                      : response.objectId;\n                }\n                this._addFeatures(featuresArray);\n              }\n\n              if (callback) {\n                callback.call(context, error, response);\n              }\n            }, this),\n          );\n        }, this),\n      );\n    },\n\n    updateFeature(feature, callback, context) {\n      this.updateFeatures(feature, callback, context);\n    },\n\n    updateFeatures(features, callback, context) {\n      // GeoJSON featureCollection or simple feature\n      const featuresArray = features.features ? features.features : [features];\n      this.service.updateFeatures(\n        features,\n        function (error, response) {\n          if (!error) {\n            for (let i = featuresArray.length - 1; i >= 0; i--) {\n              this.removeLayers([featuresArray[i].id], true);\n            }\n            this._addFeatures(featuresArray);\n          }\n\n          if (callback) {\n            callback.call(context, error, response);\n          }\n        },\n        this,\n      );\n    },\n\n    deleteFeature(id, callback, context) {\n      this.deleteFeatures(id, callback, context);\n    },\n\n    deleteFeatures(ids, callback, context) {\n      return this.service.deleteFeatures(\n        ids,\n        function (error, response) {\n          const responseArray = response.length ? response : [response];\n          if (!error && responseArray.length > 0) {\n            for (let i = responseArray.length - 1; i >= 0; i--) {\n              this.removeLayers([responseArray[i].objectId], true);\n            }\n          }\n          if (callback) {\n            callback.call(context, error, response);\n          }\n        },\n        this,\n      );\n    },\n  });\n\n  const FeatureLayer = FeatureManager.extend({\n    options: {\n      cacheLayers: true,\n    },\n\n    /**\n     * Constructor\n     */\n    initialize(options) {\n      if (options.apikey) {\n        options.token = options.apikey;\n      }\n      FeatureManager.prototype.initialize.call(this, options);\n      this._originalStyle = this.options.style;\n      this._layers = {};\n    },\n\n    /**\n     * Layer Interface\n     */\n\n    onRemove(map) {\n      for (const i in this._layers) {\n        map.removeLayer(this._layers[i]);\n        // trigger the event when the entire featureLayer is removed from the map\n        this.fire(\n          \"removefeature\",\n          {\n            feature: this._layers[i].feature,\n            permanent: false,\n          },\n          true,\n        );\n      }\n\n      return FeatureManager.prototype.onRemove.call(this, map);\n    },\n\n    createNewLayer(geojson) {\n      const layer = L.GeoJSON.geometryToLayer(geojson, this.options);\n      // trap for GeoJSON without geometry\n      if (layer) {\n        layer.defaultOptions = layer.options;\n      }\n      return layer;\n    },\n\n    _updateLayer(layer, geojson) {\n      // convert the geojson coordinates into a Leaflet LatLng array/nested arrays\n      // pass it to setLatLngs to update layer geometries\n      let latlngs = [];\n      const coordsToLatLng =\n        this.options.coordsToLatLng || L.GeoJSON.coordsToLatLng;\n\n      // copy new attributes, if present\n      if (geojson.properties) {\n        layer.feature.properties = geojson.properties;\n      }\n\n      switch (geojson.geometry.type) {\n        case \"Point\":\n          latlngs = L.GeoJSON.coordsToLatLng(geojson.geometry.coordinates);\n          layer.setLatLng(latlngs);\n          break;\n        case \"LineString\":\n          latlngs = L.GeoJSON.coordsToLatLngs(\n            geojson.geometry.coordinates,\n            0,\n            coordsToLatLng,\n          );\n          layer.setLatLngs(latlngs);\n          break;\n        case \"MultiLineString\":\n          latlngs = L.GeoJSON.coordsToLatLngs(\n            geojson.geometry.coordinates,\n            1,\n            coordsToLatLng,\n          );\n          layer.setLatLngs(latlngs);\n          break;\n        case \"Polygon\":\n          latlngs = L.GeoJSON.coordsToLatLngs(\n            geojson.geometry.coordinates,\n            1,\n            coordsToLatLng,\n          );\n          layer.setLatLngs(latlngs);\n          break;\n        case \"MultiPolygon\":\n          latlngs = L.GeoJSON.coordsToLatLngs(\n            geojson.geometry.coordinates,\n            2,\n            coordsToLatLng,\n          );\n          layer.setLatLngs(latlngs);\n          break;\n      }\n\n      // update symbol/style\n      this.redraw(layer.feature.id);\n    },\n\n    /**\n     * Feature Management Methods\n     */\n\n    createLayers(features) {\n      for (let i = features.length - 1; i >= 0; i--) {\n        const geojson = features[i];\n\n        const layer = this._layers[geojson.id];\n        let newLayer;\n\n        if (\n          this._visibleZoom() &&\n          layer &&\n          !this._map.hasLayer(layer) &&\n          (!this.options.timeField || this._featureWithinTimeRange(geojson))\n        ) {\n          this._map.addLayer(layer);\n          this.fire(\n            \"addfeature\",\n            {\n              feature: layer.feature,\n            },\n            true,\n          );\n        }\n\n        // update geometry if the layer already existed.\n        if (layer && (layer.setLatLngs || layer.setLatLng)) {\n          this._updateLayer(layer, geojson);\n        }\n\n        if (!layer) {\n          newLayer = this.createNewLayer(geojson);\n\n          if (!newLayer) {\n            warn(\"invalid GeoJSON encountered\");\n          } else {\n            newLayer.feature = geojson;\n\n            // bubble events from individual layers to the feature layer\n            newLayer.addEventParent(this);\n\n            if (this.options.onEachFeature) {\n              this.options.onEachFeature(newLayer.feature, newLayer);\n            }\n\n            // cache the layer\n            this._layers[newLayer.feature.id] = newLayer;\n\n            // style the layer\n            this.setFeatureStyle(newLayer.feature.id, this.options.style);\n\n            this.fire(\n              \"createfeature\",\n              {\n                feature: newLayer.feature,\n              },\n              true,\n            );\n\n            // add the layer if the current zoom level is inside the range defined for the layer, it is within the current time bounds or our layer is not time enabled\n            if (\n              this._visibleZoom() &&\n              (!this.options.timeField ||\n                (this.options.timeField && this._featureWithinTimeRange(geojson)))\n            ) {\n              this._map.addLayer(newLayer);\n            }\n          }\n        }\n      }\n    },\n\n    addLayers(ids) {\n      for (let i = ids.length - 1; i >= 0; i--) {\n        const layer = this._layers[ids[i]];\n        if (\n          layer &&\n          (!this.options.timeField || this._featureWithinTimeRange(layer.feature))\n        ) {\n          this._map.addLayer(layer);\n          this.fire(\n            \"addfeature\",\n            {\n              feature: layer.feature,\n            },\n            true,\n          );\n        }\n      }\n    },\n\n    removeLayers(ids, permanent) {\n      for (let i = ids.length - 1; i >= 0; i--) {\n        const id = ids[i];\n        const layer = this._layers[id];\n        if (layer) {\n          this.fire(\n            \"removefeature\",\n            {\n              feature: layer.feature,\n              permanent,\n            },\n            true,\n          );\n          this._map.removeLayer(layer);\n        }\n        if (layer && permanent) {\n          delete this._layers[id];\n        }\n      }\n    },\n\n    cellEnter(bounds, coords) {\n      if (this._visibleZoom() && !this._zooming && this._map) {\n        L.Util.requestAnimFrame(\n          L.Util.bind(function () {\n            const cacheKey = this._cacheKey(coords);\n            const cellKey = this._cellCoordsToKey(coords);\n            const layers = this._cache[cacheKey];\n            if (this._activeCells[cellKey] && layers) {\n              this.addLayers(layers);\n            }\n          }, this),\n        );\n      }\n    },\n\n    cellLeave(bounds, coords) {\n      if (!this._zooming) {\n        L.Util.requestAnimFrame(\n          L.Util.bind(function () {\n            if (this._map) {\n              const cacheKey = this._cacheKey(coords);\n              const cellKey = this._cellCoordsToKey(coords);\n              const layers = this._cache[cacheKey];\n              const mapBounds = this._map.getBounds();\n              if (!this._activeCells[cellKey] && layers) {\n                let removable = true;\n\n                for (let i = 0; i < layers.length; i++) {\n                  const layer = this._layers[layers[i]];\n                  if (\n                    layer &&\n                    layer.getBounds &&\n                    mapBounds.intersects(layer.getBounds())\n                  ) {\n                    removable = false;\n                  }\n                }\n\n                if (removable) {\n                  this.removeLayers(layers, !this.options.cacheLayers);\n                }\n\n                if (!this.options.cacheLayers && removable) {\n                  delete this._cache[cacheKey];\n                  delete this._cells[cellKey];\n                  delete this._activeCells[cellKey];\n                }\n              }\n            }\n          }, this),\n        );\n      }\n    },\n\n    /**\n     * Styling Methods\n     */\n\n    resetStyle() {\n      this.options.style = this._originalStyle;\n      this.eachFeature(function (layer) {\n        this.resetFeatureStyle(layer.feature.id);\n      }, this);\n      return this;\n    },\n\n    setStyle(style) {\n      this.options.style = style;\n      this.eachFeature(function (layer) {\n        this.setFeatureStyle(layer.feature.id, style);\n      }, this);\n      return this;\n    },\n\n    resetFeatureStyle(id) {\n      const layer = this._layers[id];\n      const style = this._originalStyle || L.Path.prototype.options;\n      if (layer) {\n        L.Util.extend(layer.options, layer.defaultOptions);\n        this.setFeatureStyle(id, style);\n      }\n      return this;\n    },\n\n    setFeatureStyle(id, style) {\n      const layer = this._layers[id];\n      if (typeof style === \"function\") {\n        style = style(layer.feature);\n      }\n      if (layer.setStyle) {\n        layer.setStyle(style);\n      }\n      return this;\n    },\n\n    /**\n     * Utility Methods\n     */\n\n    eachActiveFeature(fn, context) {\n      // figure out (roughly) which layers are in view\n      if (this._map) {\n        const activeBounds = this._map.getBounds();\n        for (const i in this._layers) {\n          if (this._currentSnapshot.indexOf(this._layers[i].feature.id) !== -1) {\n            // a simple point in poly test for point geometries\n            if (\n              typeof this._layers[i].getLatLng === \"function\" &&\n              activeBounds.contains(this._layers[i].getLatLng())\n            ) {\n              fn.call(context, this._layers[i]);\n            } else if (\n              typeof this._layers[i].getBounds === \"function\" &&\n              activeBounds.intersects(this._layers[i].getBounds())\n            ) {\n              // intersecting bounds check for polyline and polygon geometries\n              fn.call(context, this._layers[i]);\n            }\n          }\n        }\n      }\n      return this;\n    },\n\n    eachFeature(fn, context) {\n      for (const i in this._layers) {\n        fn.call(context, this._layers[i]);\n      }\n      return this;\n    },\n\n    getFeature(id) {\n      return this._layers[id];\n    },\n\n    bringToBack() {\n      this.eachFeature((layer) => {\n        if (layer.bringToBack) {\n          layer.bringToBack();\n        }\n      });\n    },\n\n    bringToFront() {\n      this.eachFeature((layer) => {\n        if (layer.bringToFront) {\n          layer.bringToFront();\n        }\n      });\n    },\n\n    redraw(id) {\n      if (id) {\n        this._redraw(id);\n      }\n      return this;\n    },\n\n    _redraw(id) {\n      const layer = this._layers[id];\n      const geojson = layer.feature;\n\n      // if this looks like a marker\n      if (layer && layer.setIcon && this.options.pointToLayer) {\n        // update custom symbology, if necessary\n        if (this.options.pointToLayer) {\n          const getIcon = this.options.pointToLayer(\n            geojson,\n            L.latLng(\n              geojson.geometry.coordinates[1],\n              geojson.geometry.coordinates[0],\n            ),\n          );\n          const updatedIcon = getIcon.options.icon;\n          layer.setIcon(updatedIcon);\n        }\n      }\n\n      // looks like a vector marker (circleMarker)\n      if (layer && layer.setStyle && this.options.pointToLayer) {\n        const getStyle = this.options.pointToLayer(\n          geojson,\n          L.latLng(\n            geojson.geometry.coordinates[1],\n            geojson.geometry.coordinates[0],\n          ),\n        );\n        const updatedStyle = getStyle.options;\n        this.setFeatureStyle(geojson.id, updatedStyle);\n      }\n\n      // looks like a path (polygon/polyline)\n      if (layer && layer.setStyle && this.options.style) {\n        this.resetFeatureStyle(geojson.id);\n      }\n    },\n\n    // This is the same as the Layer.openPopup method except it excludes the `FeatureGroup`\n    // logic to work around https://github.com/Leaflet/Leaflet/issues/8761\n    openPopup(latlng) {\n      if (this._popup) {\n        if (this._popup._prepareOpen(latlng || this._latlng)) {\n          // open the popup on the map\n          this._popup.openOn(this._map);\n        }\n      }\n      return this;\n    },\n\n    // This is the same as the `Layer.openTooltip` method except it excludes the `FeatureGroup`\n    // logic to work around https://github.com/Leaflet/Leaflet/issues/8761\n    openTooltip(latlng) {\n      if (this._tooltip) {\n        if (this._tooltip._prepareOpen(latlng)) {\n          // open the tooltip on the map\n          this._tooltip.openOn(this._map);\n\n          if (this.getElement) {\n            this._setAriaDescribedByOnLayer(this);\n          } else if (this.eachLayer) {\n            this.eachLayer(this._setAriaDescribedByOnLayer, this);\n          }\n        }\n      }\n      return this;\n    },\n  });\n\n  function featureLayer(options) {\n    return new FeatureLayer(options);\n  }\n\n  // export version\n  const version$1 = packageInfo.version;\n\n  var LEsri = {\n    __proto__: null,\n    VERSION: version$1,\n    Support: Support,\n    options: options,\n    Util: EsriUtil,\n    get: get,\n    post: xmlHttpPost,\n    request: request,\n    Task: Task,\n    task: task,\n    Query: Query,\n    query: query,\n    Find: Find,\n    find: find,\n    Identify: Identify,\n    identify: identify,\n    IdentifyFeatures: IdentifyFeatures,\n    identifyFeatures: identifyFeatures,\n    IdentifyImage: IdentifyImage,\n    identifyImage: identifyImage,\n    Service: Service,\n    service: service,\n    MapService: MapService,\n    mapService: mapService,\n    ImageService: ImageService,\n    imageService: imageService,\n    FeatureLayerService: FeatureLayerService,\n    featureLayerService: featureLayerService,\n    BasemapLayer: BasemapLayer,\n    basemapLayer: basemapLayer,\n    TiledMapLayer: TiledMapLayer,\n    tiledMapLayer: tiledMapLayer,\n    RasterLayer: RasterLayer,\n    ImageMapLayer: ImageMapLayer,\n    imageMapLayer: imageMapLayer,\n    DynamicMapLayer: DynamicMapLayer,\n    dynamicMapLayer: dynamicMapLayer,\n    FeatureManager: FeatureManager,\n    FeatureLayer: FeatureLayer,\n    featureLayer: featureLayer\n  };\n\n  const version = \"3.3.7\";\n  const buildTime = \"2025-12-31 16:27\";\n\n  /**\n   * @typedef {Object} ArcGisImageLayer.EventType\n   * 当前类支持的{@link EventType}事件类型（包括自定义字符串事件名）\n   *\n   * @property {String} loading 当新功能开始加载时触发。\n   * @property {String} load 当地图当前边界中的所有要素都已加载时触发。\n   *\n   * @property {String} requeststart 当对服务的请求开始时触发。\n   * @property {String} requestend 当对服务的请求结束时触发。\n   * @property {String} requestsuccess 当对服务的请求成功时触发。\n   * @property {String} requesterror 当对服务的请求响应错误时触发。\n   * @property {String} authenticationrequired 当对服务的请求失败并需要身份验证时，这将被触发。\n   *\n   *\n   * @example\n   * //绑定监听事件\n  tileLayer.on('load', function (event) {\n    console.log('触发了事件',event)\n  });\n   * @see BaseClass#on\n   * @see BaseClass#off\n   */\n\n  /**\n   *\n   * ArcGIS Server Image服务图层，\n   * 【需要引入mars2d-esri 插件库】\n   *\n   * @param {Object} options 参数对象，包括以下：\n   * @param {String} options.url ArcGIS Server服务地址,比如：'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/MODIS/ImageServer'\n   * @param {String} [options.format='jpegpng'] 图像的输出格式\n   * @param {Number} [options.opacity=1] 图层的不透明度。应该是介于0(完全透明)和1(完全不透明)之间的值。\n   * @param {String} [options.bandIds] 如果有多个波段，您可以指定要导出的波段。\n   * @param {Number} [options.noData] 代表无信息的像素值。\n   * @param {String} [options.noDataInterpretation] noData设置的解释。\n   * @param {String} [options.pixelType] 除非需要，否则在大多数 exportImage 用例中保留pixelType未指定或。\n   *\n   * @param {Number} [options.minZoom] 图层将显示在地图上的最远缩放级别。\n   * @param {Number} [options.maxZoom] 图层将显示在地图上的最近缩放级别。\n   * @param {Number} [options.zIndex] 用于图层间排序\n   * @param {String} [options.token] 如果您在服务需要传递令牌，它将包含在对服务的所有请求中。\n   * @param {String} [options.proxy]  代理服务URL\n   * @param {Boolean} [options.useCors=true] 如果此服务在发出 GET 请求时应使用 CORS。\n   * @param {String|Number} [options.id = createGuid()] 图层id标识\n   * @param {String|Number} [options.pid = -1] 图层父级的id，一般图层管理中使用\n   * @param {String} [options.name = ''] 图层名称\n   * @param {String} [options.pane = 'tilePane'] 指定图层添加到地图的哪个pane的DIV中，用于控制不同层级显示的，优先级高于zIndex。\n   * @export\n   * @class ArcGisImageLayer\n   * @extends {L.esri.ImageMapLayer}\n   * @see [支持的事件类型]{@link ArcGisImageLayer.EventType}\n   * @see [更多请参考L.esri.ImageMapLayer类API]{@link http://esri.github.io/esri-leaflet/api-reference/layers/image-map-layer.html}\n   * @example\n  let arcGisImageLayer = new ArcGisImageLayer({\n    url: 'https://ihttmagery.oregonexplorer.info/arcgis/rest/services/NAIP_2011/NAIP_2011_Dynamic/ImageServer'\n  })\n  arcGisImageLayer.setBandIds('3,0,1').addTo(map);\n   */\n  class ArcGisImageLayer extends ImageMapLayer {\n    initialize(options) {\n      var _options$pane, _this$options$id, _this$options$pid, _this$options$show;\n      options.pane = (_options$pane = options.pane) !== null && _options$pane !== void 0 ? _options$pane : \"tilePane\";\n      this.options.id = (_this$options$id = this.options.id) !== null && _this$options$id !== void 0 ? _this$options$id : mars2d__namespace.Util.createGuid();\n      this.options.pid = (_this$options$pid = this.options.pid) !== null && _this$options$pid !== void 0 ? _this$options$pid : -1;\n      this.options.show = (_this$options$show = this.options.show) !== null && _this$options$show !== void 0 ? _this$options$show : true;\n      super.initialize(options);\n    }\n\n    /**\n     * 是否已添加到地图\n     *\n     * @type {Boolean}\n     * @readonly\n     *\n     */\n    get isAdded() {\n      return this._map && this._map.hasLayer(this);\n    }\n\n    /**\n     * 对象的pid标识\n     *\n     * @type {String|Number}\n     */\n    get pid() {\n      return this.options.pid;\n    }\n    set pid(pid) {\n      this.options.pid = pid;\n    }\n\n    /**\n     * 对象的id标识\n     *\n     * @type {String|Number}\n     */\n    get id() {\n      return this.options.id;\n    }\n    set id(id) {\n      this.options.id = id;\n    }\n\n    /**\n     * 名称 标识\n     *\n     * @type {String}\n     */\n    get name() {\n      return this.options.name;\n    }\n    set name(name) {\n      this.options.name = name;\n    }\n\n    /**\n     * 透明度\n     *\n     * @type {Number}\n     */\n    get opacity() {\n      return this.options.opacity;\n    }\n    set opacity(value) {\n      this.options.opacity = value;\n      this.setOpacity(value);\n    }\n\n    /**\n     * 是否可以调整透明度\n     * @type {boolean}\n     * @readonly\n     */\n    get hasOpacity() {\n      return true;\n    }\n\n    /**\n     * 波段值\n     * @type {String|Number[]}\n     */\n    get bandIds() {\n      return this.getBandIds();\n    }\n    set bandIds(value) {\n      this.setBandIds(value);\n    } /**\n      * 显示隐藏状态\n      *\n      * @type {Boolean}\n      */\n\n    get show() {\n      return this.options.show;\n    }\n    set show(show) {\n      if (this.options.show === show) {\n        return;\n      }\n      this.options.show = show;\n      if (show) {\n        if (this._map) {\n          this.addTo(this._map);\n        }\n      } else {\n        const map = this._map;\n        this.remove();\n        this._map = map;\n      }\n    }\n  }\n  mars2d__namespace.layer.ArcGisImageLayer = ArcGisImageLayer;\n\n  // 注册下\n  mars2d__namespace.LayerUtil.register(\"arcgis_image\", ArcGisImageLayer);\n\n  // 以下是leaflet的内部方法，mars2d集成直接使用的，编写注释形成API文档\n\n  /**\n   * 在所有其他叠加层下方重绘此层。\n   * @return {ArcGisImageLayer} 当前对象本身,可以链式调用\n   *\n   * @function bringToBack\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 在所有其他叠加层之上重绘此层。\n   * @return {ArcGisImageLayer} 当前对象本身,可以链式调用\n   *\n   * @function bringToFront\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 绑定Popup弹窗配置\n   * @param {Function} content Popup弹窗回调方法\n   * @param {Map.PopupOptions|Object} [options] Popup弹窗参数\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   * @example\n  imageMapLayer.bindPopup(function(err, identifyResults, response){\n      var value = results.pixel.properties.value;\n      return (value) ? 'Pixel value: ' + value : false;\n    });\n   *\n   * @function bindPopup\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 解除绑定Popup弹窗配置\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function unbindPopup\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回当前波段值。\n   * @return {String} 波段值\n   *\n   * @function getBandIds\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 指定要导出的单个波段，或者您可以通过指定波段编号来更改波段组合（红色、绿色、蓝色）。\n   * @param {String|Number[]} bandIds 波段值\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function setBandIds\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回当前无数据值。\n   * @return {String} 无数据值\n   *\n   * @function getNoData\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 指定单个值或一组值以将其视为无数据。没有数据将值呈现为透明。\n   *\n   * @param {Number|Number[]} noData 无数据值\n   * @param {String} [noDataInterpretation] 可以是esriNoDataMatchAny| esriNoDataMatchAll.\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function setNoData\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回当前像素类型。\n   * @return {String} 像素类型也称为数据类型\n   *\n   * @function getPixelType\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 像素类型也称为数据类型，与存储在栅格中的值的类型有关，例如有符号整数、无符号整数或浮点数。可能的值：C128、C64、F32、F64、S16、S32、S8、U1、U16、U2、U32、U4、U8、UNKNOWN。\n   *\n   * @param {String} pixelType 像素类型也称为数据类型\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function setPixelType\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 请求有关此要素图层的元数据。将使用error和调用回调metadata。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   * @example\n  featureLayer.metadata(function(error, metadata){\n    console.log(metadata);\n  });\n   * @function metadata\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回L.esri.Query可用于查询此服务的新对象。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.Query对象]{@link http://esri.github.io/esri-leaflet/api-reference/tasks/query.html}\n   * @example\n  imageService.query()\n    .within(latlngbounds)\n    .run(function(error, featureCollection, response){\n      console.log(featureCollection);\n  });\n   * @function query\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回图层的当前渲染规则。\n   * @return {Object} 当前渲染规则\n   *\n   * @function getRenderingRule\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 使用传递的渲染规则重绘图层。\n   * @param {Object} renderingRule 当前渲染规则\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function setRenderingRule\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 返回图层的当前镶嵌规则。\n   * @return {Object} 镶嵌规则\n   *\n   * @function getMosaicRule\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 使用传递的镶嵌规则重绘图层。\n   * @param {Object} mosaicRule 镶嵌规则\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function setMosaicRule\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 用于向服务发出新请求并绘制响应。\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function redraw\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 将图层添加到地图\n   * @param {Map} map  地图对象\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function addTo\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * 将图层从地图上移除\n   * @return {ArcGisImageLayer} 当前对象本身，可以链式调用\n   *\n   * @function remove\n   * @memberof ArcGisImageLayer\n   * @instance\n   */\n\n  /**\n   * ArcGIS Server 瓦片地图服务图层，\n   * 【需要引入mars2d-esri 插件库】\n   *\n   * @param {Object} options 参数对象，包括以下：\n   * @param {String} options.url ArcGIS Server服务地址,比如：'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/MODIS/ImageServer'\n   * @param {Number} [options.zoomOffsetAllowance=0.1] 如果启用correctZoomLevels，这将控制重新映射贴图级别的每个缩放级别上的差异的容错量。\n   *\n   * @param {String} [options.token] 如果您在服务需要传递令牌，它将包含在对服务的所有请求中。\n   * @param {String} [options.proxy]  代理服务URL\n   * @param {Boolean} [options.useCors=true] 如果此服务在发出 GET 请求时应使用 CORS。\n   *\n   * @param {Number} [options.opacity=1] 瓦片的不透明度。\n   * @param {Number} [options.minZoom=0] 最小的缩放级别\n   * @param {Number} [options.maxZoom=18] 最大的缩放级别\n   * @param {Number} [options.maxNativeZoom] 瓦片来源可用的最大缩放倍数。如果指定，则所有缩放级别上的图块maxNativeZoom将高于将从maxNativeZoom级别加载并自动缩放。\n   * @param {Number} [options.minNativeZoom] 瓦片来源可用的最小缩放数。如果指定，所有缩放级别上的图块minNativeZoom将从minNativeZoom级别加载并自动缩放。\n   * @param {Number} [options.zIndex=1] 瓦片层的显式zIndex\n   * @param {L.LatLngBounds} [options.bounds] 自定义加载的瓦片矩形范围\n   * @param {String} [options.errorTileUrl] 显示加载瓦片失败时，显示的图片的url\n   * @param {Boolean} [options.tms] 如果此值为true，反转切片Y轴的编号（对于TMS服务需将此项打开）\n   * @param {Boolean} [options.zoomReverse=false] 如果设置为true，则URL网址中使用的缩放z数字将被颠倒（maxZoom - zoom而不是zoom）\n   * @param {Number} [options.xOffset] 对URL中地图的缩放级别x值加上xOffset值\n   * @param {Number} [options.yOffset] 对URL中地图的缩放级别y值加上yOffset值\n   * @param {Number} [options.zOffset] 对URL中地图的缩放级别z值加上zOffset值\n   * @param {Function} [options.customTags] 自定义对瓦片请求参数处理\n   * @param {Number|L.Point} [options.tileSize=256] 网格中瓦片的宽度和高度。如果宽度和高度相等，则使用数字，否则L.point(width, height)。\n   * @param {String} [options.className] 要分配给瓦片图层的自定义类名称\n   * @param {Number} [options.keepBuffer=2] 当平移地图时，在卸载它们之前，先保留许多行和列的数据块。\n   * @param {Boolean} [options.detectRetina=false] 如果此项为true，并且用户是视网膜显示模式，会请求规定大小一般的四个切片和一个地区内一个更大的缩放级别来利用高分辨率.\n   * @param {Boolean} [options.crossOrigin=false] 如果为true，则所有图块将其crossOrigin属性设置为“*”。如果要访问像素数据，则需要这样做。\n   * @param {Number} [options.updateInterval=200] 当平移时，updateInterval毫秒不会更新一次瓦片。\n   * @param {Boolean} [options.updateWhenZooming=true] 默认情况下，平滑缩放动画（touch zoom 或flyTo()） 会在整个缩放级别更新网格图层。设置此选项false将仅在平滑动画结束时更新网格层。\n   * @param {Boolean} [options.noWrap=false] 该层是否在子午线断面。 如果为true，GridLayer只能在低缩放级别显示一次。当地图CRS 不包围时，没有任何效果。 可以结合使用bounds 以防止在CRS限制之外请求瓦片。\n   * @param {ChinaCRS} [options.chinaCRS] 标识瓦片的国内坐标系（用于自动纠偏或加偏），自动将瓦片转为map对应的chinaCRS类型坐标系。\n   *\n   * @param {String|Number} [options.id = createGuid()] 图层id标识\n   * @param {String|Number} [options.pid = -1] 图层父级的id，一般图层管理中使用\n   * @param {String} [options.name = ''] 图层名称\n   * @param {String} [options.pane = 'tilePane'] 指定图层添加到地图的哪个pane的DIV中，用于控制不同层级显示的，优先级高于zIndex。\n   * @export\n   * @class ArcGisTileLayer\n   * @extends {L.esri.TiledMapLayer}\n   * @see [支持的事件类型]{@link TileLayer.EventType}\n   * @see [更多请参考L.esri.TiledMapLayer类API]{@link http://esri.github.io/esri-leaflet/api-reference/layers/tiled-map-layer.html}\n   */\n  class ArcGisTileLayer extends TiledMapLayer {\n    initialize(options) {\n      var _this$options$id, _this$options$pid, _this$options$show;\n      super.initialize(options);\n      this.options.id = (_this$options$id = this.options.id) !== null && _this$options$id !== void 0 ? _this$options$id : mars2d__namespace.Util.createGuid();\n      this.options.pid = (_this$options$pid = this.options.pid) !== null && _this$options$pid !== void 0 ? _this$options$pid : -1;\n      this.options.show = (_this$options$show = this.options.show) !== null && _this$options$show !== void 0 ? _this$options$show : true;\n    }\n\n    /**\n     * 是否已添加到地图\n     *\n     * @type {Boolean}\n     * @readonly\n     *\n     */\n    get isAdded() {\n      return this._map && this._map.hasLayer(this);\n    }\n\n    /**\n     * 对象的pid标识\n     *\n     * @type {String|Number}\n     */\n    get pid() {\n      return this.options.pid;\n    }\n    set pid(pid) {\n      this.options.pid = pid;\n    }\n\n    /**\n     * 对象的id标识\n     *\n     * @type {String|Number}\n     */\n    get id() {\n      return this.options.id;\n    }\n    set id(id) {\n      this.options.id = id;\n    }\n\n    /**\n     * 名称 标识\n     *\n     * @type {String}\n     */\n    get name() {\n      return this.options.name;\n    }\n    set name(name) {\n      this.options.name = name;\n    }\n\n    /**\n     * 显示隐藏状态\n     *\n     * @type {Boolean}\n     */\n\n    get show() {\n      return this.options.show;\n    }\n    set show(show) {\n      if (this.options.show === show) {\n        return;\n      }\n      this.options.show = show;\n      if (show) {\n        if (this._map) {\n          this.addTo(this._map);\n        }\n      } else {\n        const map = this._map;\n        this.remove();\n        this._map = map;\n      }\n    }\n\n    /**\n     * 透明度\n     *\n     * @type {Number}\n     */\n    get opacity() {\n      return this.options.opacity;\n    }\n    set opacity(value) {\n      this.options.opacity = value;\n      this.setOpacity(value);\n    }\n\n    /**\n     * 是否可以调整透明度\n     * @type {boolean}\n     * @readonly\n     */\n    get hasOpacity() {\n      return true;\n    }\n    getTileUrl(tilePoint) {\n      const zoom = this._getZoomForUrl();\n      const data = {\n        s: this._getSubdomain(tilePoint),\n        x: tilePoint.x,\n        y: tilePoint.y,\n        z: zoom\n      };\n      return L__default[\"default\"].Util.template(this.tileUrl, L__default[\"default\"].Util.extend(data, this.options));\n    }\n  }\n  mars2d__namespace.layer.ArcGisTileLayer = ArcGisTileLayer;\n\n  // 注册下\n  mars2d__namespace.LayerUtil.register(\"arcgis_tile\", ArcGisTileLayer);\n\n  // 以下是leaflet的内部方法，mars2d集成直接使用的，编写注释形成API文档\n\n  /**\n   * 请求有关此要素图层的元数据。将使用error和调用回调metadata。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisTileLayer} 当前对象本身，可以链式调用\n   * @example\n  dynamicMapLayer.metadata(function(error, metadata){\n    console.log(metadata);\n  });\n   * @function metadata\n   * @memberof ArcGisTileLayer\n   * @instance\n   */\n\n  /**\n   * 返回一个IdentifyFeatures新对象，可用于识别该图层上的要素。您的回调函数将传递一个带有结果或错误的GeoJSON。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.services.IdentifyFeatures对象]{@link http://esri.github.io/esri-leaflet/api-reference/tasks/identify-features.html}\n   * @example\n  dynamicMapLayer.identify()\n    .at(latlng)\n    .run(function(error, featureCollection){\n      console.log(featureCollection);\n    });\n   * @function identify\n   * @memberof ArcGisTileLayer\n   * @instance\n   */\n\n  /**\n   * 将图层添加到地图\n   * @param {Map} map  地图对象\n   * @return {ArcGisTileLayer} 当前对象本身，可以链式调用\n   *\n   * @function addTo\n   * @memberof ArcGisTileLayer\n   * @instance\n   */\n\n  /**\n   * 将图层从地图上移除\n   * @return {ArcGisTileLayer} 当前对象本身，可以链式调用\n   *\n   * @function remove\n   * @memberof ArcGisTileLayer\n   * @instance\n   */\n\n  /**\n   * @typedef {Object} ArcGisDynamicLayer.EventType\n   * 当前类支持的{@link EventType}事件类型（包括自定义字符串事件名）\n   *\n   * @property {String} loading 当新功能开始加载时触发。\n   * @property {String} load 当地图当前边界中的所有要素都已加载时触发。\n   *\n   * @property {String} requeststart 当对服务的请求开始时触发。\n   * @property {String} requestend 当对服务的请求结束时触发。\n   * @property {String} requestsuccess 当对服务的请求成功时触发。\n   * @property {String} requesterror 当对服务的请求响应错误时触发。\n   * @property {String} authenticationrequired 当对服务的请求失败并需要身份验证时，这将被触发。\n   *\n   *\n   * @example\n   * //绑定监听事件\n  tileLayer.on('load', function (event) {\n    console.log('触发了事件',event)\n  });\n   * @see BaseClass#on\n   * @see BaseClass#off\n   */\n\n  /**\n   *\n   * ArcGIS Server 动态服务图层，\n   * 【需要引入mars2d-esri 插件库】\n   *\n   * @param {Object} options 参数对象，包括以下：\n   * @param {String} options.url ArcGIS Server服务地址，如：https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/\n   * @param {String[]} [options.layers] 一个层id的数组，显示服务中的指定图层集合。\n   * @param {Object} [options.layerDefs] SQL筛选器，以定义服务呈现的图像中包含哪些特性。对象与键一起使用，将每个查询映射到其各自的层。{ 3: \"STATE_NAME='Kansas'\", 9: \"POP2007>25000\" }\n   * @param {String} [options.format='png24'] 图像的输出格式\n   * @param {Boolean} [options.transparent=true] 是否允许服务器产生透明的图像。\n   * @param {Number} [options.opacity=1] 图层的不透明度。应该是介于0(完全透明)和1(完全不透明)之间的值。\n   * @param {Object} [options.dynamicLayers] 用于覆盖服务定义的图层符号系统的一个或多个 JSON 对象的数组。需要哪些支持10.1+地图服务请求。\n   * @param {Boolean} [options.disableCache=false] 如果启用，将时间戳附加到每个请求以确保在服务器端创建新图像。\n   *\n   * @param {Number} [options.minZoom] 图层将显示在地图上的最远缩放级别。\n   * @param {Number} [options.maxZoom] 图层将显示在地图上的最近缩放级别。\n   * @param {String} [options.token] 如果您在服务需要传递令牌，它将包含在对服务的所有请求中。\n   * @param {String} [options.proxy]  代理服务URL\n   * @param {Boolean} [options.useCors=true] 如果此服务在发出 GET 请求时应使用 CORS。\n   * @param {Number} [options.zIndex] 用于图层间排序\n   *\n   * @param {String|Globe.getTemplateHtml_template[]|Function} [options.popup]  绑定的popup弹窗值，也可以bindPopup方法绑定，支持：'all'、数组、字符串模板\n   * @param {Map.PopupOptions} [options.popupOptions] popup弹窗时的配置参数\n   * @param {object} [highlight] 鼠标移单击后高亮对应的矢量对象的样式\n   *\n   * @param {String|Number} [options.id = createGuid()] 图层id标识\n   * @param {String|Number} [options.pid = -1] 图层父级的id，一般图层管理中使用\n   * @param {String} [options.name = ''] 图层名称\n   * @param {String} [options.pane = 'tilePane'] 指定图层添加到地图的哪个pane的DIV中，用于控制不同层级显示的，优先级高于zIndex。\n   * @export\n   * @class ArcGisDynamicLayer\n   * @extends {L.esri.DynamicMapLayer}\n   * @see [支持的事件类型]{@link ArcGisDynamicLayer.EventType}\n   * @see [更多请参考L.esri.DynamicMapLayer类API]{@link http://esri.github.io/esri-leaflet/api-reference/layers/dynamic-map-layer.html}\n   */\n  class ArcGisDynamicLayer extends DynamicMapLayer {\n    /**\n     * 是否已添加到地图\n     *\n     * @type {Boolean}\n     * @readonly\n     *\n     */\n    get isAdded() {\n      return this._map && this._map.hasLayer(this);\n    }\n\n    /**\n     * 对象的pid标识\n     *\n     * @type {String|Number}\n     */\n    get pid() {\n      return this.options.pid;\n    }\n    set pid(pid) {\n      this.options.pid = pid;\n    }\n\n    /**\n     * 对象的id标识\n     *\n     * @type {String|Number}\n     */\n    get id() {\n      return this.options.id;\n    }\n    set id(id) {\n      this.options.id = id;\n    }\n\n    /**\n     * 名称 标识\n     *\n     * @type {String}\n     */\n    get name() {\n      return this.options.name;\n    }\n    set name(name) {\n      this.options.name = name;\n    }\n\n    /**\n     * 透明度\n     *\n     * @type {Number}\n     */\n    get opacity() {\n      return this.options.opacity;\n    }\n    set opacity(value) {\n      this.options.opacity = value;\n      this.setOpacity(value);\n    }\n\n    /**\n     * 是否可以调整透明度\n     * @type {boolean}\n     * @readonly\n     */\n    get hasOpacity() {\n      return true;\n    }\n\n    /**\n     * 显示隐藏状态\n     *\n     * @type {Boolean}\n     */\n    get show() {\n      return this.options.show;\n    }\n    set show(show) {\n      if (this.options.show === show) {\n        return;\n      }\n      this.options.show = show;\n      if (show) {\n        if (this._map) {\n          this.addTo(this._map);\n        }\n      } else {\n        const map = this._map;\n        this.remove();\n        this._map = map;\n      }\n    }\n    initialize(options) {\n      var _options$pane, _this$options$id, _this$options$pid;\n      let popupConifg;\n      if (options.popup) {\n        popupConifg = options.popup;\n        delete options.popup;\n      }\n      options.pane = (_options$pane = options.pane) !== null && _options$pane !== void 0 ? _options$pane : \"tilePane\";\n      // options.show = options.show ?? true\n\n      super.initialize(options);\n      L__default[\"default\"].Util.stamp(this);\n      this.options.id = (_this$options$id = this.options.id) !== null && _this$options$id !== void 0 ? _this$options$id : mars2d__namespace.Util.createGuid();\n      this.options.pid = (_this$options$pid = this.options.pid) !== null && _this$options$pid !== void 0 ? _this$options$pid : -1;\n      if (popupConifg) {\n        const popupOptions = this.options.popupOptions || {};\n        this.bindPopup((error, data, response) => {\n          if (error != null && error.code > 0) {\n            mars2d__namespace.Util.msg(error.message);\n            return false;\n          }\n          const graphic = data.graphic;\n          if (!graphic) {\n            return false;\n          }\n          const attr = graphic.attr;\n          let title = this.name;\n          if (popupOptions.noTitle) {\n            title = null;\n          } else if (popupOptions.title) {\n            title = popupOptions.title;\n          } else if (popupOptions.titleField) {\n            title = attr[popupOptions.titleField];\n          }\n          return mars2d__namespace.Util.getTemplateHtml({\n            title: title,\n            template: popupConifg,\n            attr: attr\n          });\n        }, {\n          maxWidth: 600\n        });\n      }\n    }\n    onAdd(map) {\n      super.onAdd(map);\n      setTimeout(() => {\n        if (this._map && !this._popup && (this.highlight || this.listens(\"click\"))) {\n          this._map.on(\"click\", this._getPopupData, this);\n          this._map.on(\"dblclick\", this._resetPopupState, this);\n        }\n      }, 1000);\n    }\n    _renderPopup(latlng, error, results, response) {\n      var _this$options;\n      const highlightStyle = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.highlight;\n      const graphicsOptions = mars2d__namespace.Util.geoJsonToGraphics(results, {\n        type: highlightStyle === null || highlightStyle === void 0 ? void 0 : highlightStyle.type,\n        style: highlightStyle\n      });\n      const data = {\n        layer: this,\n        graphic: graphicsOptions.length > 0 ? graphicsOptions[0] : null,\n        graphics: graphicsOptions,\n        geojson: results,\n        latlng: latlng\n      };\n      if (this._popup) {\n        super._renderPopup(latlng, error, data, response);\n      }\n      if (graphicsOptions && highlightStyle) {\n        if (!this._graphicLayer) {\n          this._graphicLayer = new mars2d__namespace.layer.GraphicLayer({\n            name: \"高亮对象图层\",\n            isPrivate: true\n          });\n          this._map.addLayer(this._graphicLayer);\n        }\n        this._graphicLayer.clear();\n        this._graphicLayer.addGraphic(graphicsOptions);\n        if (this._popup) {\n          this._popup._source = this;\n          this.once(mars2d__namespace.EventType.popupclose, e => {\n            this._graphicLayer.clear();\n          });\n        }\n      }\n      if (this.listens(\"click\")) {\n        this.fire(mars2d__namespace.EventType.click, data);\n      }\n    }\n  }\n  mars2d__namespace.layer.ArcGisDynamicLayer = ArcGisDynamicLayer;\n\n  // 注册下\n  mars2d__namespace.LayerUtil.register(\"arcgis_dynamic\", ArcGisDynamicLayer);\n\n  // 以下是leaflet的内部方法，mars2d集成直接使用的，编写注释形成API文档\n\n  /**\n   * 在所有其他叠加层下方重绘此层。\n   * @return {ArcGisDynamicLayer} 当前对象本身,可以链式调用\n   *\n   * @function bringToBack\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 在所有其他叠加层之上重绘此层。\n   * @return {ArcGisDynamicLayer} 当前对象本身,可以链式调用\n   *\n   * @function bringToFront\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 绑定Popup弹窗配置\n   * @param {Function} content Popup弹窗回调方法\n   * @param {Map.PopupOptions|Object} [options] Popup弹窗参数\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   * @example\n  dynamicMapLayer.bindPopup(function(err, featureCollection, response){\n      var count = featureCollection.features.length;\n      return (count) ? count + ' features' : false;\n  });\n   *\n   * @function bindPopup\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 解除绑定Popup弹窗配置\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function unbindPopup\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回层构造函数中指定的可见层数组。\n   * @return {String[]} 可见层数组\n   *\n   * @function getLayers\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 重绘图层以显示传递的图层 id 数组。\n   * @param {String[]} layers 可见层数组\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function setLayers\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回用于渲染的当前层SQL筛选器。\n   * @return {Object} SQL筛选器\n   *\n   * @function getLayerDefs\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 使用SQL筛选器新图层定义重绘图层, [layerDefs]{@link https://developers.arcgis.com/rest/services-reference/enterprise/export-map.htm}选项。\n   * @param {Object} layerDefs SQL筛选器\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function setLayerDefs\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回一组 JSON 对象，表示从地图服务请求的修改后的图层符号系统。\n   * @return {Object[]} SQL筛选器\n   *\n   * @function getDynamicLayers\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 在您想要修改服务本身中定义的图层符号系统的情况下，用于以数组形式插入原始 dynamicLayers JSON。\n   * @param {Object[]} dynamicLayers SQL筛选器\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function setDynamicLayers\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 请求有关此要素图层的元数据。将使用error和调用回调metadata。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   * @example\n  dynamicMapLayer.metadata(function(error, metadata){\n    console.log(metadata);\n  });\n   * @function metadata\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回一个IdentifyFeatures新对象，可用于识别该图层上的要素。您的回调函数将传递一个带有结果或错误的GeoJSON。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.services.IdentifyFeatures对象]{@link http://esri.github.io/esri-leaflet/api-reference/tasks/identify-features.html}\n   * @example\n  dynamicMapLayer.identify()\n    .at(latlng)\n    .run(function(error, featureCollection){\n      console.log(featureCollection);\n    });\n   * @function identify\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回IdentifyFeatures可用于查找特征的新对象。您的回调函数将传递一个带有结果或错误的GeoJSON。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.Find对象]{@link http://esri.github.io/esri-leaflet//api-reference/tasks/find.html}\n   * @example\n  dynamicMapLayer.find()\n    .layers('18')\n    .text('Colorado')\n    .run(function(error, featureCollection){\n      console.log(featureCollection);\n    });\n   * @function find\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 返回L.esri.Query可用于查询此服务的新对象。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.Query对象]{@link http://esri.github.io/esri-leaflet/api-reference/tasks/query.html}\n   * @example\n  mapService.query()\n    .layer(0)\n    .within(latlngbounds)\n    .run(function(error, featureCollection, response){\n      console.log(featureCollection);\n    });\n   * @function query\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 用于向服务发出新请求并绘制响应。\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function redraw\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 将图层添加到地图\n   * @param {Map} map  地图对象\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function addTo\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 将图层从地图上移除\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function remove\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * @typedef {Object} ArcGisFeatureLayer.EventType\n   * 当前类支持的{@link EventType}事件类型（包括自定义字符串事件名）\n   *\n   * @property {String} loading 当新功能开始加载时触发。\n   * @property {String} load 当地图当前边界中的所有要素都已加载时触发。\n   *\n   * @property {String} createfeature 首次加载要素图层中的要素时触发\n   * @property {String} removefeature 当图层上的要素从地图中移除时触发\n   * @property {String} addfeature 当先前删除的要素添加回地图时触发\n   *\n   * @property {String} click 当用户单击（or taps）地图时触发\n   * @property {String} dblclick 当用户双击（or double-taps）地图时触发\n   * @property {String} mousedown 当用户在图层上按下鼠标按钮时触发\n   * @property {String} mouseover 当鼠标进入图层时触发\n   * @property {String} mouseout 当鼠标离开图层时触发\n   * @property {String} popupopen 当绑定到当前图层的Popup弹窗打开时触发\n   * @property {String} popupclose 当绑定到当前图层的Popup弹窗关闭时触发\n   *\n   * @property {String} requeststart 当对服务的请求开始时触发。\n   * @property {String} requestend 当对服务的请求结束时触发。\n   * @property {String} requestsuccess 当对服务的请求成功时触发。\n   * @property {String} requesterror 当对服务的请求响应错误时触发。\n   * @property {String} authenticationrequired 当对服务的请求失败并需要身份验证时，这将被触发。\n   *\n   *\n   * @example\n   * //绑定监听事件\n  tileLayer.on('load', function (event) {\n    console.log('触发了事件',event)\n  });\n   * @see BaseClass#on\n   * @see BaseClass#off\n   */\n\n  /**\n   * ArcGIS Server WFS矢量服务图层，\n   * 【需要引入mars2d-esri 插件库】\n   *\n   * @param {Object} options 参数对象，包括以下：\n   * @param {String} options.url ArcGIS Server服务地址,如：https://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer\n   * @param {String} [options.where] 用于过滤服务器端的特性的可选表达式。字符串值应该用单引号表示，即:\"FIELDNAME = '字段值'\";可以找到有关有效SQL语法的更多信息。\n   *\n   * @param {Number} [options.minZoom] 图层将显示在地图上的最远缩放级别。\n   * @param {Number} [options.maxZoom] 图层将显示在地图上的最近缩放级别。\n   * @param {String} [options.token] 如果您在服务需要传递令牌，它将包含在对服务的所有请求中。\n   * @param {String} [options.proxy]  代理服务URL\n   * @param {Boolean} [options.useCors=true] 如果此服务在发出 GET 请求时应使用 CORS。\n   * @param {Function} [options.onEachFeature] 提供了一个机会来内省图层中的各个 GeoJSON 功能。\n   *\n   * @param {Object|Function} [options.symbol] 矢量数据的style样式,为Function时是完全自定义的回调处理 symbol(attr, style, feature)\n   * @param {GraphicType|String} [options.symbol.type] 标识数据类型，默认是根据数据生成 point、polyline、polygon\n   * @param {Object} options.symbol.styleOptions Style样式，每种不同类型数据都有不同的样式，具体见各{@link GraphicType}矢量数据的style参数。\n   * @param {String} [options.symbol.styleField] 按 styleField 属性设置不同样式。\n   * @param {Object} [options.symbol.styleFieldOptions] 按styleField值与对应style样式的键值对象。\n   * @param {Function} [options.symbol.callback] 自定义判断处理返回style ，示例：callback: function (attr, styleOpt){  return { color: \"#ff0000\" };  }\n   *\n   * @param {String|Globe.getTemplateHtml_template[]|Function} [options.popup]  绑定的popup弹窗值，也可以bindPopup方法绑定，支持：'all'、数组、字符串模板\n   * @param {Map.PopupOptions} [options.popupOptions] popup弹窗时的配置参数\n   *\n   * @param {String|Number} [options.id = createGuid()] 图层id标识\n   * @param {String|Number} [options.pid = -1] 图层父级的id，一般图层管理中使用\n   * @param {String} [options.name = ''] 图层名称\n   * @param {String} [options.pane = 'overlayPane'] 指定图层添加到地图的哪个pane的DIV中，用于控制不同层级显示的，优先级高于zIndex。\n   * @export\n   * @class ArcGisFeatureLayer\n   * @extends {L.esri.FeatureLayer}\n   * @see [支持的事件类型]{@link ArcGisFeatureLayer.EventType}\n   * @see [更多请参考L.esri.FeatureLayer类API]{@link http://esri.github.io/esri-leaflet/api-reference/layers/feature-layer.html}\n   */\n  class ArcGisFeatureLayer extends FeatureLayer {\n    /**\n     * 是否已添加到地图\n     *\n     * @type {Boolean}\n     * @readonly\n     *\n     */\n    get isAdded() {\n      return this._map && this._map.hasLayer(this);\n    }\n\n    /**\n     * 对象的pid标识\n     *\n     * @type {String|Number}\n     */\n    get pid() {\n      return this.options.pid;\n    }\n    set pid(pid) {\n      this.options.pid = pid;\n    }\n\n    /**\n     * 对象的id标识\n     *\n     * @type {String|Number}\n     */\n    get id() {\n      return this.options.id;\n    }\n    set id(id) {\n      this.options.id = id;\n    }\n\n    /**\n     * 名称 标识\n     *\n     * @type {String}\n     */\n    get name() {\n      return this.options.name;\n    }\n    set name(name) {\n      this.options.name = name;\n    }\n\n    /**\n     * 显示隐藏状态\n     *\n     * @type {Boolean}\n     */\n    get show() {\n      return this.options.show;\n    }\n    set show(show) {\n      if (this.options.show === show) {\n        return;\n      }\n      this.options.show = show;\n      if (show) {\n        if (this._map) {\n          this.addTo(this._map);\n        }\n      } else {\n        const map = this._map;\n        this.remove();\n        this._map = map;\n      }\n    }\n\n    /**\n     * 透明度\n     * @type {Number}\n     */\n    get opacity() {\n      return this.options.opacity;\n    }\n    set opacity(value) {\n      this.options.opacity = value;\n      this.setOpacity(value);\n    }\n\n    /**\n     * 是否可以调整透明度\n     * @type {boolean}\n     * @readonly\n     */\n    get hasOpacity() {\n      return true;\n    }\n    initialize(options) {\n      var _this$options$id, _this$options$pid, _this$options$show;\n      let popupConifg;\n      if (options.popup) {\n        popupConifg = options.popup;\n        delete options.popup;\n      }\n      let tooltipConifg;\n      if (options.tooltip) {\n        tooltipConifg = options.tooltip;\n        delete options.tooltip;\n      }\n      super.initialize(conventGeojsonOptions(options));\n      L__default[\"default\"].Util.stamp(this);\n      this.options.id = (_this$options$id = this.options.id) !== null && _this$options$id !== void 0 ? _this$options$id : mars2d__namespace.Util.createGuid();\n      this.options.pid = (_this$options$pid = this.options.pid) !== null && _this$options$pid !== void 0 ? _this$options$pid : -1;\n      this.options.show = (_this$options$show = this.options.show) !== null && _this$options$show !== void 0 ? _this$options$show : true;\n      if (popupConifg) {\n        const popupOptions = this.options.popupOptions || {};\n        this.bindPopup(evt => {\n          var _evt$feature;\n          // if (layer.hasOwnProperty(\"isPopup\") && !layer.isPopup) {\n          //   return;\n          // }\n\n          // if (_calbackClickFeature) {\n          //   _calbackClickFeature(\"arcgis_feature\", evt);\n          // }\n\n          const attr = (_evt$feature = evt.feature) === null || _evt$feature === void 0 ? void 0 : _evt$feature.properties;\n          if (!attr) {\n            return \"\";\n          }\n          let title = this.name;\n          if (popupOptions.noTitle) {\n            title = null;\n          } else if (popupOptions.title) {\n            title = popupOptions.title;\n          } else if (popupOptions.titleField) {\n            title = attr[popupOptions.titleField];\n          }\n          return mars2d__namespace.Util.getTemplateHtml({\n            title: title,\n            template: popupConifg,\n            attr: attr\n          });\n        }, {\n          maxWidth: 600\n        });\n      }\n      if (tooltipConifg) {\n        const popupOptions = this.options.tooltipOptions || {};\n        this.bindTooltip(evt => {\n          var _evt$feature2;\n          const attr = (_evt$feature2 = evt.feature) === null || _evt$feature2 === void 0 ? void 0 : _evt$feature2.properties;\n          if (!attr) {\n            return \"\";\n          }\n          let title = this.name;\n          if (popupOptions.noTitle) {\n            title = null;\n          } else if (popupOptions.title) {\n            title = popupOptions.title;\n          } else if (popupOptions.titleField) {\n            title = attr[popupOptions.titleField];\n          }\n          return mars2d__namespace.Util.getTemplateHtml({\n            title: title,\n            template: tooltipConifg,\n            attr: attr\n          });\n        }, {\n          direction: \"top\"\n        });\n      }\n    }\n    createNewLayer(options) {\n      const layer = super.createNewLayer(options); // GeoJSON.geometryToLayer(geojson, this.options)\n      if (layer) {\n        layer.parent = this;\n      }\n      return layer;\n    }\n\n    /**\n     * 遍历所有矢量数据并将其作为参数传递给回调函数\n     *\n     * @param {Function} method 回调方法\n     * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n     * @return {GraphicLayer} 当前对象本身,可以链式调用\n     * @example\n     *\n    fl.on('load', function  () {\n    fl.eachGraphic(function(layer) {\n      console.log(layer.feature);\n    });\n    }\n     */\n    eachGraphic(method, context) {\n      return this.eachFeature(method, context);\n    }\n\n    /**\n     * 根据Feature 的 id取矢量数据对象\n     *\n     * @param {String|Number} id  Feature 的 id\n     * @return {L.Layer} 矢量数据对象\n     */\n    getGraphicById(id) {\n      return this.getFeature(id);\n    }\n\n    /**\n     *\n     * 设置覆盖的透明度\n     * @param {Number} opacity  透明度，取值范围 0-1\n     * @return {ArcGisFeatureLayer} 当前对象本身,可以链式调用\n     */\n    setOpacity(opacity) {\n      if (opacity === 0) {\n        opacity = 0.001;\n      }\n      this.options.opacity = opacity;\n      const newStyle = {\n        opacity: this.options.opacity,\n        fillOpacity: this.options.opacity\n      };\n      this.eachGraphic(function (graphic) {\n        if (graphic.setOpacity) {\n          graphic.setOpacity(opacity);\n        } else if (graphic.setStyle) {\n          graphic.setStyle(newStyle);\n        }\n      }, this);\n      return this;\n    }\n\n    /**\n     * 获取图层矩形边界\n     * @return {L.LatLngBounds} 矩形边界\n     */\n    getBounds() {\n      let bounds;\n      this.eachFeature(function (layer) {\n        if (layer.getBounds) {\n          var _bounds;\n          const thisBounds = layer.getBounds();\n          if ((_bounds = bounds) !== null && _bounds !== void 0 && _bounds._northEast) {\n            bounds = bounds.extend(thisBounds);\n          } else {\n            bounds = thisBounds;\n          }\n        } else if (layer.getLatLng) {\n          var _bounds2;\n          const thisLatlng = layer.getLatLng();\n          if ((_bounds2 = bounds) !== null && _bounds2 !== void 0 && _bounds2._northEast) {\n            bounds = bounds.extend(thisLatlng);\n          } else {\n            bounds = L__default[\"default\"].latLngBounds(thisLatlng, thisLatlng);\n          }\n        }\n      }, this);\n      return bounds;\n    }\n\n    /**\n     * 定位地图至当前图层数据区域\n     *\n     * @param {Object} [options] 定位参数，包括:\n     * @param {L.Point|Number[]} [options.paddingTopLeft] 设置在将视图设置为适合边界时不应考虑的地图容器左上角的填充量。如果您在地图上有一些控件重叠式（如侧边栏），而且您不希望它们遮挡您正在缩放的对象，则很有用。\n     * @param {L.Point|Number[]} [options.paddingBottomRight] 同上，不考虑地图容器右下角时使用。\n     * @param {L.Point|Number[]} [options.padding] 相当于将左上和右下填充设置为相同的值。\n     * @param {Number} [options.maxZoom] 最大层级\n     * @param {Boolean} [options.animate=true] 是否进行动画缩放。false时始终重置视图完全没有动画。\n     * @param {Number} [options.duration=0.25] 动画平移的持续时间，以秒为单位。\n     * @param {Number} [options.easeLinearity=0.25] 平移动画宽松的曲率因子 [Cubic Bezier curve曲线]{@link https://cubic-bezier.com/}的第三个参数。1.0表示线性动画，而这个数字越小，曲线越鞠躬。\n     * @param {Boolean} [options.noMoveStart=false] 如果true，平移不会movestart在启动时触发事件（内部用于平移惯性）。\n     * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n     */\n    flyTo(options) {\n      if (this._map) {\n        const bounds = this.getBounds();\n        if (bounds !== null && bounds !== void 0 && bounds._northEast) {\n          this._map.flyToBounds(bounds, options);\n        }\n      }\n      return this;\n    }\n  }\n  mars2d__namespace.layer.ArcGisFeatureLayer = ArcGisFeatureLayer;\n\n  // 注册下\n  mars2d__namespace.LayerUtil.register(\"arcgis_feature\", ArcGisFeatureLayer);\n  function conventGeojsonOptions(options) {\n    var _options$symbol;\n    if (!options.symbol) {\n      return options;\n    }\n    const newopts = {\n      ...options\n    };\n    if ((_options$symbol = options.symbol) !== null && _options$symbol !== void 0 && _options$symbol.styleOptions) {\n      // 点图层\n      newopts.pointToLayer = function (geojson, latlng) {\n        const attr = geojson.properties;\n        const markopt = getMarkerSymbolStyle(options.symbol, attr);\n        return L__default[\"default\"].marker(latlng, markopt);\n      };\n      // 线面图层\n      newopts.style = function (geojson) {\n        const attr = geojson.properties;\n        const styleOpt = mars2d__namespace.Util.getSymbolStyle(options.symbol, attr);\n        return mars2d__namespace.PolygonStyleConver.toLeafletVal(styleOpt);\n      };\n      if (mars2d__namespace.Util.defined(options.symbol.type)) {\n        if (mars2d__namespace.GraphicUtil.isPointType(options.symbol.type)) {\n          delete newopts.style;\n        } else {\n          delete newopts.pointToLayer;\n        }\n      }\n    }\n    return newopts;\n  }\n\n  // /**\n  //  * 根据symbol样式配置获取Marker点的构造参数\n  //  *\n  //  * @export\n  //  * @param {Object} symbol 样式配置信息\n  //  * @param {Object} symbol.styleOptions 样式信息\n  //  * @param {String} [symbol.styleField] 分类字段名称\n  //  * @param {Object} [symbol.styleFieldOptions] 分类字段值对应的样式\n  //  * @param {Object} [attr] 属性信息\n  //  * @param {Boolean} [isselected] 是否选中\n  //  * @return {Object} Marker构造参数\n  //  */\n  function getMarkerSymbolStyle(symbol, attr, isselected) {\n    if (!symbol) {\n      return {};\n    }\n    let icoOpt = {\n      ...symbol.styleOptions\n    };\n    if (symbol.styleField && attr) {\n      // 存在多个symbol，按iconField进行分类\n      const iconFieldVal = attr[symbol.styleField];\n      const icoOptField = symbol.styleFieldOptions[iconFieldVal];\n      if (icoOptField != null) {\n        icoOpt = {\n          ...icoOpt,\n          ...icoOptField\n        };\n      }\n    }\n    if (isselected && icoOpt.iconUrlForSelect) {\n      icoOpt.iconUrl = icoOpt.iconUrlForSelect;\n    }\n    if (icoOpt.hasOwnProperty(\"image\")) {\n      symbol.icon = L__default[\"default\"].icon({\n        iconUrl: icoOpt.image,\n        ...icoOpt\n      });\n    } else if (icoOpt.hasOwnProperty(\"iconUrl\")) {\n      symbol.icon = L__default[\"default\"].icon(icoOpt);\n    } else if (icoOpt.hasOwnProperty(\"iconFont\")) {\n      let fontsize = 20;\n      if (icoOpt.hasOwnProperty(\"iconSize\")) {\n        fontsize = icoOpt.iconSize[0];\n      }\n      const color = icoOpt.color || \"#000000\";\n      icoOpt.className = \"\";\n      icoOpt.html = '<i class=\"' + icoOpt.iconFont + '\" style=\"color:' + color + \";font-size:\" + fontsize + 'px;\"></i> ';\n      symbol.icon = L__default[\"default\"].divIcon(icoOpt);\n    } else {\n      const color = icoOpt.color || \"#0f89f5\";\n      let inhtml = '<div class=\"centerat_animation\" style=\"color:' + color + ';\"><p></p></div>';\n      if (symbol.nameField) {\n        const name = attr[symbol.nameField];\n        inhtml += ' <div class=\"layer_divicon_name\" style=\"top: 2px;left: 25px;\" >' + name + \"</div>\";\n      }\n      symbol.icon = L__default[\"default\"].divIcon({\n        className: \"\",\n        iconSize: [10, 10],\n        iconAnchor: [5, 5],\n        popupAnchor: [5, -5],\n        tooltipAnchor: [5, -5],\n        html: inhtml\n      });\n    }\n    return symbol;\n  }\n\n  // 以下是leaflet的内部方法，mars2d集成直接使用的，编写注释形成API文档\n\n  /**\n   * 返回当前where设置\n   * @return {String} where设置\n   *\n   * @function getWhere\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 设置新where选项并刷新图层以反映新where过滤器。\n   * @param {String} where where设置\n   * @param {Function} [callback] 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   *\n   * @function setWhere\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 请求有关此要素图层的元数据。将使用error和调用回调metadata。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   * @example\n  featureLayer.metadata(function(error, metadata){\n    console.log(metadata);\n  });\n   * @function metadata\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 返回L.esri.Query可用于查询此服务的新对象。\n   * @param {Function} callback 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {Object} [L.esri.Query对象]{@link http://esri.github.io/esri-leaflet/api-reference/tasks/query.html}\n   * @example\n  featureLayer.query()\n    .within(latlngbounds)\n    .where(\"Direction = 'WEST'\")\n    .run(function(error, featureCollection){\n      console.log(featureCollection);\n    });\n   * @function query\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 向要素图层添加新要素。如果创建成功，这也会将该功能添加到地图中。\n   * <ul>\n   * <li>需要以有权在 ArcGIS Online 中编辑服务的用户或创建服务的用户身份进行身份验证。</li>\n   * <li>需要Create在服务上启用该功能。您可以通过在功能下检查服务的元数据来检查创建是否存在。</li>\n   * </ul>\n   * @param {Object} feature GeoJSON Feature对象\n   * @param {Function} [callback] 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   *\n   * @function addFeature\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 更新要素图层上提供的要素。这也会更新地图上的要素。\n   * <ul>\n   * <li>需要以有权在 ArcGIS Online 中编辑服务的用户或创建服务的用户身份进行身份验证。</li>\n   * <li>需要Create在服务上启用该功能。您可以通过在功能下检查服务的元数据来检查创建是否存在。</li>\n   * </ul>\n   * @param {Object} feature GeoJSON Feature对象\n   * @param {Function} [callback] 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   *\n   * @function updateFeature\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 从要素图层中删除具有提供的 id 的要素。如果该要素存在，这也会从地图中删除该要素。\n   * <ul>\n   * <li>需要以有权在 ArcGIS Online 中编辑服务的用户或创建服务的用户身份进行身份验证。</li>\n   * <li>需要Create在服务上启用该功能。您可以通过在功能下检查服务的元数据来检查创建是否存在。</li>\n   * </ul>\n   * @param {String|Number} id 要素的 id\n   * @param {Function} [callback] 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   *\n   * @function deleteFeature\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 从要素层中删除具有提供的 id 的要素数组。这也会从地图中删除特征（如果存在）。\n   * <ul>\n   * <li>需要以有权在 ArcGIS Online 中编辑服务的用户或创建服务的用户身份进行身份验证。</li>\n   * <li>需要Create在服务上启用该功能。您可以通过在功能下检查服务的元数据来检查创建是否存在。</li>\n   * </ul>\n   * @param {String[]|Number[]} ids 要素的id数组\n   * @param {Function} [callback] 回调方法\n   * @param {Object} [context]  侦听器的上下文(this关键字将指向的对象)。\n   * @return {ArcGisFeatureLayer} 当前对象本身，可以链式调用\n   *\n   * @function deleteFeatures\n   * @memberof ArcGisFeatureLayer\n   * @instance\n   */\n\n  /**\n   * 从要素层使用提供的 id 重绘要素。\n   * @param {String|Number} id 要素的 id\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function redraw\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 从地图上存在的要素图层重新绘制所有要素。\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function refresh\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 将图层添加到地图\n   * @param {Map} map  地图对象\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function addTo\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  /**\n   * 将图层从地图上移除\n   * @return {ArcGisDynamicLayer} 当前对象本身，可以链式调用\n   *\n   * @function remove\n   * @memberof ArcGisDynamicLayer\n   * @instance\n   */\n\n  L__default[\"default\"].esri = LEsri;\n  // eslint-disable-next-line no-import-assign\n  mars2d__namespace.esri = LEsri;\n  mars2d__namespace.Log.logInfo(`mars2d-esri插件注册成功     版本：${version}    编译日期：${buildTime}`);\n\n  exports.ArcGisDynamicLayer = ArcGisDynamicLayer;\n  exports.ArcGisFeatureLayer = ArcGisFeatureLayer;\n  exports.ArcGisImageLayer = ArcGisImageLayer;\n  exports.ArcGisTileLayer = ArcGisTileLayer;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n"]}