module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "lib/mapboxgl/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 420);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/interopRequireDefault");

/***/ }),

/***/ 118:
/***/ (function(module, exports) {

module.exports = require("xml-js");

/***/ }),

/***/ 119:
/***/ (function(module, exports) {

module.exports = require("lodash.max");

/***/ }),

/***/ 12:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_utils/util.js");

/***/ }),

/***/ 3:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/inheritsLoose");

/***/ }),

/***/ 36:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/regenerator");

/***/ }),

/***/ 420:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(0);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(36));
var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(3));
var _Events2 = __webpack_require__(47);
var _util = __webpack_require__(12);
var convert = _interopRequireWildcard(__webpack_require__(118));
var _lodash = _interopRequireDefault(__webpack_require__(119));
var _lodash2 = _interopRequireDefault(__webpack_require__(421));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
  function adopt(value) {
    return value instanceof P ? value : new P(function (resolve) {
      resolve(value);
    });
  }
  return new (P || (P = Promise))(function (resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e) {
        reject(e);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, _arguments || [])).next());
  });
};
var DEFAULT_WELLKNOWNSCALESET = ['GoogleCRS84Quad', 'GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible', 'urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad'];
var MB_SCALEDENOMINATOR_3857 = [559082264.0287178, 279541132.0143589, 139770566.00717944, 69885283.00358972, 34942641.50179486, 17471320.75089743, 8735660.375448715, 4367830.1877243575, 2183915.0938621787, 1091957.5469310894, 545978.7734655447, 272989.38673277234, 136494.69336638617, 68247.34668319309, 34123.67334159654, 17061.83667079827, 8530.918335399136, 4265.459167699568, 2132.729583849784, 1066.364791924892, 533.182395962446, 266.591197981223, 133.2955989906115];
var MB_SCALEDENOMINATOR_4326 = [559082264.0287176, 279541132.0143588, 139770566.0071794, 69885283.0035897, 34942641.50179485, 17471320.750897426, 8735660.375448713, 4367830.187724357, 2183915.0938621783, 1091957.5469310891, 545978.7734655446, 272989.3867327723, 136494.69336638614, 68247.34668319307, 34123.673341596535, 17061.836670798268, 8530.918335399134, 4265.459167699567, 2132.7295838497835, 1066.3647919248917, 533.1823959624459, 266.59119798122293, 133.29559899061147];
var WebMapService = exports.default = /*#__PURE__*/function (_Events) {
  (0, _inheritsLoose2.default)(WebMapService, _Events);
  function WebMapService(mapId, options) {
    var _this;
    if (options === void 0) {
      options = {};
    }
    _this = _Events.call(this) || this;
    _this.proxyOptions = {
      data: 'apps/viewer/getUrlResource.json?url=',
      image: 'apps/viewer/getUrlResource.png?url='
    };
    if (typeof mapId === 'string' || typeof mapId === 'number') {
      _this.mapId = mapId;
    } else if (mapId !== null && typeof mapId === 'object') {
      _this.mapInfo = mapId;
    }
    _this.serverUrl = options.serverUrl || 'https://www.supermapol.com';
    _this.accessToken = options.accessToken;
    _this.accessKey = options.accessKey;
    _this.tiandituKey = options.tiandituKey || '';
    _this.withCredentials = options.withCredentials || false;
    _this.excludePortalProxyUrl = options.excludePortalProxyUrl;
    _this.iportalServiceProxyUrl = options.iportalServiceProxyUrlPrefix;
    _this.proxy = options.proxy;
    return _this;
  }
  var _proto = WebMapService.prototype;
  _proto.setMapId = function setMapId(mapId) {
    if (typeof mapId === 'string' || typeof mapId === 'number') {
      this.mapId = mapId;
      this.mapInfo = null;
    } else if (mapId !== null && typeof mapId === 'object') {
      this.mapInfo = mapId;
      this.mapId = '';
    }
  };
  _proto.setServerUrl = function setServerUrl(serverUrl) {
    this.serverUrl = serverUrl;
  };
  _proto.setWithCredentials = function setWithCredentials(withCredentials) {
    this.withCredentials = withCredentials;
  };
  _proto.setProxy = function setProxy(proxy) {
    this.proxy = proxy;
  };
  _proto.handleServerUrl = function handleServerUrl(serverUrl) {
    var urlArr = serverUrl.split('');
    if (urlArr[urlArr.length - 1] !== '/') {
      serverUrl += '/';
    }
    this.serverUrl = serverUrl;
    return serverUrl;
  };
  _proto.getMapInfo = function getMapInfo() {
    var _this2 = this;
    if (!this.mapId && this.mapInfo) {
      return new Promise(function (resolve) {
        resolve(_this2.mapInfo);
      });
    }
    var mapUrl = this._handleMapUrl();
    return new Promise(function (resolve, reject) {
      return __awaiter(_this2, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee() {
        return _regenerator.default.wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.prev = 0;
              _context.next = 3;
              return this.getiPortalServiceProxy();
            case 3:
              SuperMap.FetchRequest.get(mapUrl, null, {
                withCredentials: this.withCredentials
              }).then(function (response) {
                return response.json();
              }).then(function (mapInfo) {
                if (mapInfo && mapInfo.succeed === false) {
                  var error = {
                    message: mapInfo && mapInfo.error && mapInfo.error.errorMsg
                  };
                  reject(error);
                  return;
                }
                mapInfo.mapParams = {
                  title: mapInfo.title,
                  description: mapInfo.description
                };
                resolve(mapInfo);
              }).catch(function (error) {
                reject(error);
              });
              _context.next = 9;
              break;
            case 6:
              _context.prev = 6;
              _context.t0 = _context["catch"](0);
              reject(_context.t0);
            case 9:
            case "end":
              return _context.stop();
          }
        }, _callee, this, [[0, 6]]);
      }));
    });
  };
  _proto.getiPortalServiceProxy = function getiPortalServiceProxy() {
    var _this3 = this;
    return new Promise(function (resolve, reject) {
      SuperMap.FetchRequest.get(_this3.serverUrl + "web/config/portal.json", {
        scope: ['serviceProxy']
      }).then(function (response) {
        return response.json();
      }).then(function (serviceProxyInfo) {
        if (!serviceProxyInfo || !serviceProxyInfo.serviceProxy) {
          reject('serviceProxyFailed');
          return;
        }
        var serviceProxy = serviceProxyInfo.serviceProxy;
        if (serviceProxy.enable) {
          if (serviceProxy.proxyServerRootUrl) {
            _this3.iportalServiceProxyUrl = serviceProxy.proxyServerRootUrl;
          } else if (serviceProxy.port && serviceProxy.rootUrlPostfix) {
            _this3.iportalServiceProxyUrl = serviceProxy.port + "/" + serviceProxy.rootUrlPostfix;
          }
          if (_this3.serverUrl.indexOf(_this3.iportalServiceProxyUrl) > -1) {
            _this3.iportalServiceProxyUrl = '';
          }
        }
        resolve(serviceProxy);
      }).catch(function (error) {
        reject(error);
      });
    });
  };
  _proto.getLayerFeatures = function getLayerFeatures(type, layer, baseProjection) {
    var pro;
    switch (type) {
      case 'hosted':
        pro = this._getFeaturesFromHosted(layer, baseProjection);
        break;
      case 'rest_data':
        pro = this._getFeaturesFromRestData(layer, baseProjection);
        break;
      case 'rest_map':
        pro = this._getFeaturesFromRestMap(layer);
        break;
      case 'dataflow':
        pro = this._getFeaturesFromDataflow(layer);
        break;
      case 'user_data':
        pro = this._getFeaturesFromUserData(layer);
        break;
    }
    return pro;
  };
  _proto.getWmsInfo = function getWmsInfo(layerInfo) {
    var _this4 = this;
    return new Promise(function (resolve) {
      var proxy = _this4.handleProxy();
      var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMS');
      SuperMap.FetchRequest.get(serviceUrl, null, {
        withCredentials: _this4.handleWithCredentials(proxy, layerInfo.url, false),
        withoutFormatSuffix: true,
        proxy: proxy
      }).then(function (response) {
        return response.text();
      }).then(function (capabilitiesText) {
        var converts = convert || window.convert;
        var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
          compact: true,
          spaces: 4
        }));
        var wmsCapabilities = capabilities.WMT_MS_Capabilities || capabilities.WMS_Capabilities;
        resolve({
          version: wmsCapabilities['_attributes']['version']
        });
      });
    });
  };
  _proto.getMapBoxStyle = function getMapBoxStyle(styleURL) {
    return new Promise(function (resolve, reject) {
      SuperMap.FetchRequest.get(styleURL).then(function (response) {
        return response.json();
      }).then(function (styleJSON) {
        resolve(styleJSON);
      }).catch(function (error) {
        reject(error);
      });
    });
  };
  _proto.getWmtsInfo = function getWmtsInfo(layerInfo, mapCRS) {
    var _this5 = this;
    return new Promise(function (resolve, reject) {
      var isMatched = false;
      var matchMaxZoom = 22;
      var matchMinZoom = 0;
      var style = '';
      var bounds;
      var restResourceURL = '';
      var kvpResourceUrl = '';
      var proxy = _this5.handleProxy();
      var serviceUrl = SuperMap.Util.urlAppend(layerInfo.url, 'REQUEST=GetCapabilities&SERVICE=WMTS&VERSION=1.0.0');
      serviceUrl = _this5.handleParentRes(serviceUrl);
      SuperMap.FetchRequest.get(serviceUrl, null, {
        withCredentials: _this5.handleWithCredentials(proxy, layerInfo.url, false),
        withoutFormatSuffix: true,
        proxy: proxy
      }).then(function (response) {
        return response.text();
      }).then(function (capabilitiesText) {
        var converts = convert || window.convert;
        var capabilities = JSON.parse(converts.xml2json(capabilitiesText, {
          compact: true,
          spaces: 4,
          alwaysArray: ['Layer', 'TileMatrixSet', 'ows:Operation', 'ows:Get', 'ResourceURL', 'Style']
        })).Capabilities;
        var content = capabilities.Contents;
        var metaData = capabilities['ows:OperationsMetadata'];
        if (metaData) {
          var operations = metaData['ows:Operation'];
          if (!Array.isArray(operations)) {
            operations = [operations];
          }
          var operation = operations.find(function (item) {
            return item._attributes.name === 'GetTile';
          });
          if (operation) {
            var getConstraints = operation['ows:DCP']['ows:HTTP']['ows:Get'];
            if (!Array.isArray(getConstraints)) {
              getConstraints = [getConstraints];
            }
            var getConstraint = getConstraints.find(function (item) {
              return item['ows:Constraint']['ows:AllowedValues']['ows:Value']['_text'] === 'KVP';
            });
            if (getConstraint) {
              kvpResourceUrl = getConstraint['_attributes']['xlink:href'];
            }
          }
        }
        var tileMatrixSet = content.TileMatrixSet;
        for (var i = 0; i < tileMatrixSet.length; i++) {
          if (tileMatrixSet[i]['ows:Identifier'] && tileMatrixSet[i]['ows:Identifier']['_text'] === layerInfo.tileMatrixSet) {
            if (tileMatrixSet[i]['WellKnownScaleSet'] && DEFAULT_WELLKNOWNSCALESET.includes(tileMatrixSet[i]['WellKnownScaleSet']['_text'])) {
              isMatched = true;
            } else {
              var matchedScaleDenominator = {};
              var defaultCRSScaleDenominators = mapCRS === 'EPSG:3857' ? MB_SCALEDENOMINATOR_3857 : MB_SCALEDENOMINATOR_4326;
              var defaultCRSTopLeftCorner = mapCRS === 'EPSG:3857' ? [-2.0037508342789248e7, 2.0037508342789087e7] : [-180, 90];
              for (var j = 0; j < tileMatrixSet[i].TileMatrix.length; j++) {
                var tileMatrix = tileMatrixSet[i].TileMatrix[j];
                var identifier = tileMatrix['ows:Identifier']['_text'];
                var topLeftCorner = [].concat(tileMatrix['TopLeftCorner']['_text'].split(' '));
                if ((!(0, _util.numberEqual)(topLeftCorner[0], defaultCRSTopLeftCorner[0]) || !(0, _util.numberEqual)(topLeftCorner[1], defaultCRSTopLeftCorner[1])) && (!(0, _util.numberEqual)(topLeftCorner[0], defaultCRSTopLeftCorner[1]) || !(0, _util.numberEqual)(topLeftCorner[1], defaultCRSTopLeftCorner[0]))) {
                  break;
                }
                var defaultScaleDenominator = defaultCRSScaleDenominators[+identifier];
                if (!defaultScaleDenominator) {
                  break;
                }
                var scaleDenominator = parseFloat(tileMatrixSet[i].TileMatrix[j]['ScaleDenominator']['_text']);
                if ((0, _util.numberEqual)(defaultScaleDenominator, scaleDenominator)) {
                  matchedScaleDenominator[+identifier] = scaleDenominator;
                } else {
                  if (Object.keys(matchedScaleDenominator).length > 0) {
                    break;
                  } else {
                    continue;
                  }
                }
              }
              var zooms = Object.keys(matchedScaleDenominator).map(function (element) {
                return +element;
              });
              matchMaxZoom = (0, _lodash.default)(zooms);
              matchMinZoom = (0, _lodash2.default)(zooms);
              if (zooms.length !== 0) {
                isMatched = true;
              } else {
                throw Error('TileMatrixSetNotSuppport');
              }
            }
            break;
          }
        }
        var layer = content.Layer.find(function (item) {
          return item['ows:Identifier']['_text'] === layerInfo.layer;
        });
        if (layer) {
          var styles = layer.Style;
          if (Array.isArray(layer.Style)) {
            style = styles[0]['ows:Identifier'] ? styles[0]['ows:Identifier']['_text'] : '';
          } else {
            style = styles['ows:Identifier'] ? styles['ows:Identifier']['_text'] : '';
          }
          if (layer['ows:WGS84BoundingBox']) {
            var lowerCorner = layer['ows:WGS84BoundingBox']['ows:LowerCorner']['_text'].split(' ');
            var upperCorner = layer['ows:WGS84BoundingBox']['ows:UpperCorner']['_text'].split(' ');
            bounds = [parseFloat(lowerCorner[0]), parseFloat(lowerCorner[1]), parseFloat(upperCorner[0]), parseFloat(upperCorner[1])];
          }
          var resourceUrls = layer.ResourceURL;
          if (!Array.isArray(resourceUrls)) {
            resourceUrls = [resourceUrls];
          }
          var resourceUrl = resourceUrls.find(function (item) {
            return item._attributes.resourceType === 'tile';
          });
          if (resourceUrl) {
            restResourceURL = resourceUrl._attributes.template;
          }
        }
        resolve({
          isMatched: isMatched,
          matchMaxZoom: matchMaxZoom,
          matchMinZoom: matchMinZoom,
          style: style,
          bounds: bounds,
          restResourceURL: restResourceURL,
          kvpResourceUrl: kvpResourceUrl
        });
      }).catch(function (error) {
        reject(error);
      });
    });
  };
  _proto._getFeaturesFromHosted = function _getFeaturesFromHosted(layer, baseProjection) {
    var dataSource = layer.dataSource,
      layerType = layer.layerType;
    var serverId = dataSource ? dataSource.serverId : layer.serverId;
    if (!serverId) {
      return new Promise(function (resolve) {
        resolve({
          type: 'noServerId'
        });
      });
    }
    var getDataFromIportal = layerType === 'MARKER' || dataSource && (!dataSource.accessType || dataSource.accessType === 'DIRECT');
    if (getDataFromIportal) {
      return this._getDataFromIportal(serverId, layer);
    } else {
      return this._getDataFromHosted({
        layer: layer,
        serverId: serverId,
        baseProjection: baseProjection
      });
    }
  };
  _proto._getFeaturesFromRestData = function _getFeaturesFromRestData(layer, baseProjection) {
    var _this6 = this;
    var features;
    var dataSource = layer.dataSource;
    return new Promise(function (resolve, reject) {
      _this6._getFeatureBySQL(dataSource.url, [dataSource.dataSourceName || layer.name], function (result) {
        features = _this6.parseGeoJsonData2Feature({
          allDatas: {
            features: result.result.features.features
          }
        });
        resolve({
          type: 'feature',
          features: features
        });
      }, function (err) {
        reject(err);
      }, baseProjection);
    });
  };
  _proto._getFeaturesFromRestMap = function _getFeaturesFromRestMap(layer) {
    var _this7 = this;
    return new Promise(function (resolve, reject) {
      _this7._queryFeatureBySQL(layer.dataSource.url, layer.dataSource.layerName, function (result) {
        var recordsets = result && result.result.recordsets;
        var recordset = recordsets && recordsets[0];
        var attributes = recordset.fields;
        if (recordset && attributes) {
          var fileterAttrs = [];
          for (var i in attributes) {
            var value = attributes[i];
            if (value.indexOf('Sm') !== 0 || value === 'SmID') {
              fileterAttrs.push(value);
            }
          }
          _this7._getFeatures(fileterAttrs, layer, function (features) {
            resolve({
              type: 'feature',
              features: features
            });
          }, function (err) {
            reject(err);
          });
        }
      }, function (err) {
        reject(err);
      }, 'smid=1');
    });
  };
  _proto._getFeaturesFromUserData = function _getFeaturesFromUserData(layer) {
    var _this8 = this;
    var dataSource = layer.dataSource;
    return new Promise(function (resolve, reject) {
      var proxy = _this8.handleProxy();
      var serviceUrl = _this8.handleParentRes(dataSource.url);
      SuperMap.FetchRequest.get(serviceUrl, null, {
        withCredentials: _this8.handleWithCredentials(proxy, serviceUrl, _this8.withCredentials),
        proxy: proxy,
        withoutFormatSuffix: true
      }).then(function (response) {
        return response.json();
      }).then(function (data) {
        var features;
        if (data && data instanceof Object && data.type === 'FeatureCollection') {
          features = data.features;
        } else {
          features = data;
        }
        features = _this8.parseGeoJsonData2Feature({
          allDatas: {
            features: features
          }
        });
        resolve({
          type: 'feature',
          features: features
        });
      }).catch(function (err) {
        reject(err);
      });
    });
  };
  _proto._queryFeatureBySQL = function _queryFeatureBySQL(url, layerName, _processCompleted, processFaild, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
    var queryBySQLParams = this._getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute);
    var proxy = this.handleProxy();
    var serviceUrl = this.handleParentRes(url);
    var queryBySQLService = new SuperMap.QueryBySQLService(serviceUrl, {
      proxy: proxy,
      withCredentials: this.handleWithCredentials(proxy, url, false),
      eventListeners: {
        processCompleted: function processCompleted(data) {
          _processCompleted && _processCompleted(data);
        },
        processFailed: function processFailed(data) {
          processFaild && processFaild(data);
        }
      }
    });
    queryBySQLService.processAsync(queryBySQLParams);
  };
  _proto._getFeatures = function _getFeatures(fields, layerInfo, resolve, reject) {
    var _this9 = this;
    var source = layerInfo.dataSource;
    this._queryFeatureBySQL(source.url, source.layerName, function (result) {
      var recordsets = result.result.recordsets[0];
      var features = recordsets.features.features;
      var featuresObj = _this9.parseGeoJsonData2Feature({
        allDatas: {
          features: features
        }
      });
      resolve(featuresObj);
    }, function (err) {
      reject(err);
    }, null, fields);
  };
  _proto._getQueryFeaturesParam = function _getQueryFeaturesParam(layerName, attributeFilter, fields, epsgCode, startRecord, recordLength, onlyAttribute) {
    var queryParam = new SuperMap.FilterParameter({
      name: layerName,
      attributeFilter: attributeFilter
    });
    if (fields) {
      queryParam.fields = fields;
    }
    var params = {
      queryParams: [queryParam]
    };
    if (onlyAttribute) {
      params.queryOption = SuperMap.QueryOption.ATTRIBUTE;
    }
    startRecord && (params.startRecord = startRecord);
    recordLength && (params.expectCount = recordLength);
    if (epsgCode) {
      params.prjCoordSys = {
        epsgCode: epsgCode
      };
    }
    var queryBySQLParams = new SuperMap.QueryBySQLParameters(params);
    return queryBySQLParams;
  };
  _proto._getFeaturesFromDataflow = function _getFeaturesFromDataflow(layer) {
    var _this10 = this;
    return new Promise(function (resolve, reject) {
      _this10._getDataflowInfo(layer, function () {
        resolve({
          type: 'dataflow'
        });
      }, function (e) {
        reject(e);
      });
    });
  };
  _proto._getDataflowInfo = function _getDataflowInfo(layerInfo, success, faild) {
    var url = layerInfo.url;
    var token;
    var requestUrl = url + ".json";
    if (layerInfo.credential && layerInfo.credential.token) {
      token = layerInfo.credential.token;
      requestUrl += "?token=" + token;
    }
    var proxy = this.handleProxy();
    requestUrl = this.handleParentRes(requestUrl);
    SuperMap.FetchRequest.get(requestUrl, null, {
      proxy: proxy,
      withCredentials: this.handleWithCredentials(proxy, requestUrl, false)
    }).then(function (response) {
      return response.json();
    }).then(function (result) {
      if (!result) {
        faild();
        return;
      }
      if (result.featureMetaData) {
        layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
        layerInfo.dataSource = {
          dataTypes: {}
        };
        if (result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
          result.featureMetaData.fieldInfos.forEach(function (data) {
            var name = data.name.trim();
            if (data.type === 'TEXT') {
              layerInfo.dataSource.dataTypes[name] = 'STRING';
            } else if (['DOUBLE', 'INT', 'FLOAT', 'LONG', 'SHORT'].includes(data.type)) {
              layerInfo.dataSource.dataTypes[name] = 'NUMBER';
            } else {
              layerInfo.dataSource.dataTypes[name] = 'UNKNOWN';
            }
          });
        }
      }
      layerInfo.wsUrl = result.urls[0].url;
      layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
      success();
    }).catch(function () {
      faild();
    });
  };
  _proto.getDatasourceType = function getDatasourceType(layer) {
    var dataSource = layer.dataSource,
      layerType = layer.layerType;
    if (dataSource && dataSource.type === 'SAMPLE_DATA') {
      return dataSource.type;
    }
    var type;
    var isHosted = dataSource && dataSource.serverId || layerType === 'MARKER' || layerType === 'HOSTED_TILE';
    var isTile = layerType === 'SUPERMAP_REST' || layerType === 'TILE' || layerType === 'WMS' || layerType === 'WMTS' || layerType === 'MAPBOXSTYLE';
    if (isHosted) {
      type = 'hosted';
    } else if (isTile) {
      type = 'tile';
    } else if (dataSource && dataSource.type === 'REST_DATA') {
      type = 'rest_data';
    } else if (dataSource && dataSource.type === 'REST_MAP' && dataSource.url) {
      type = 'rest_map';
    } else if (layerType === 'DATAFLOW_POINT_TRACK' || layerType === 'DATAFLOW_HEAT') {
      type = 'dataflow';
    } else if (dataSource && dataSource.type === 'USER_DATA') {
      type = 'user_data';
    }
    return type;
  };
  _proto.getFeatureProperties = function getFeatureProperties(features) {
    var properties = [];
    if (features && features.length) {
      features.forEach(function (feature) {
        var property = feature.properties;
        property && properties.push(property);
      });
    }
    return properties;
  };
  _proto.parseGeoJsonData2Feature = function parseGeoJsonData2Feature(metaData) {
    var allFeatures = metaData.allDatas.features;
    var features = [];
    for (var i = 0, len = allFeatures.length; i < len; i++) {
      var feature = allFeatures[i];
      var coordinate = feature.geometry.coordinates;
      if (allFeatures[i].geometry.type === 'Point') {
        if (allFeatures[i].properties) {
          allFeatures[i].properties.lon = coordinate[0];
          allFeatures[i].properties.lat = coordinate[1];
        }
      }
      feature.properties['index'] = i + '';
      features.push(feature);
    }
    return features;
  };
  _proto._getDataFromIportal = function _getDataFromIportal(serverId, layerInfo) {
    var _this11 = this;
    var features;
    var url = this.serverUrl + "web/datas/" + serverId + "/content.json?pageSize=9999999&currentPage=1";
    if (this.accessToken) {
      url = url + "&" + this.accessKey + "=" + this.accessToken;
    }
    return new Promise(function (resolve, reject) {
      url = _this11.handleParentRes(url);
      var proxy = _this11.handleProxy();
      SuperMap.FetchRequest.get(url, null, {
        withCredentials: _this11.handleWithCredentials(proxy, url, _this11.withCredentials),
        proxy: proxy
      }).then(function (response) {
        return response.json();
      }).then(function (data) {
        return __awaiter(_this11, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee2() {
          var _layerInfo$dataSource, divisionType, divisionField, geojson;
          return _regenerator.default.wrap(function _callee2$(_context2) {
            while (1) switch (_context2.prev = _context2.next) {
              case 0:
                if (data.succeed === false) {
                  reject(data.error);
                }
                if (!(data && data.type)) {
                  _context2.next = 22;
                  break;
                }
                if (!(data.type === 'JSON' || data.type === 'GEOJSON')) {
                  _context2.next = 7;
                  break;
                }
                data.content = JSON.parse(data.content.trim());
                features = this._formatGeoJSON(data.content);
                _context2.next = 21;
                break;
              case 7:
                if (!(data.type === 'EXCEL' || data.type === 'CSV')) {
                  _context2.next = 20;
                  break;
                }
                if (!(layerInfo.dataSource && layerInfo.dataSource.administrativeInfo)) {
                  _context2.next = 17;
                  break;
                }
                data.content.rows.unshift(data.content.colTitles);
                _layerInfo$dataSource = layerInfo.dataSource.administrativeInfo, divisionType = _layerInfo$dataSource.divisionType, divisionField = _layerInfo$dataSource.divisionField;
                _context2.next = 13;
                return this._excelData2FeatureByDivision(data.content, divisionType, divisionField);
              case 13:
                geojson = _context2.sent;
                features = this._formatGeoJSON(geojson);
                _context2.next = 18;
                break;
              case 17:
                features = this._excelData2Feature(data.content, layerInfo && layerInfo.xyField || {});
              case 18:
                _context2.next = 21;
                break;
              case 20:
                if (data.type === 'SHP') {
                  data.content = JSON.parse(data.content.trim());
                  features = this._formatGeoJSON(data.content.layers[0]);
                }
              case 21:
                resolve({
                  type: 'feature',
                  features: features
                });
              case 22:
              case "end":
                return _context2.stop();
            }
          }, _callee2, this);
        }));
      }).catch(function (error) {
        reject(error);
      });
    });
  };
  _proto._getDataFromHosted = function _getDataFromHosted(_ref) {
    var _this12 = this;
    var layer = _ref.layer,
      serverId = _ref.serverId,
      baseProjection = _ref.baseProjection;
    var isMapService = layer.layerType === 'HOSTED_TILE';
    return new Promise(function (resolve, reject) {
      _this12._checkUploadToRelationship(serverId).then(function (result) {
        if (result && result.length > 0) {
          var datasetName = result[0].name;
          var featureType = result[0].type.toUpperCase();
          _this12._getDataService(serverId, datasetName).then(function (data) {
            var dataItemServices = data.dataItemServices;
            if (dataItemServices.length === 0) {
              reject('noDataServices');
            }
            var param = {
              layer: layer,
              dataItemServices: dataItemServices,
              datasetName: datasetName,
              featureType: featureType,
              resolve: resolve,
              reject: reject,
              baseProjection: baseProjection
            };
            if (isMapService) {
              var dataService = dataItemServices.filter(function (info) {
                return info && info.serviceType === 'RESTDATA';
              })[0];
              _this12._isMvt(dataService.address, datasetName, baseProjection).then(function (info) {
                _this12._getServiceInfoFromLayer(param, info);
              }).catch(function () {
                _this12._getServiceInfoFromLayer(param);
              });
            } else {
              _this12._getServiceInfoFromLayer(param);
            }
          });
        } else {
          reject('resultIsEmpty');
        }
      }).catch(function (error) {
        reject(error);
      });
    });
  };
  _proto._isMvt = function _isMvt(serviceUrl, datasetName, baseProjection) {
    return this._getDatasetsInfo(serviceUrl, datasetName).then(function (info) {
      if (info.epsgCode == baseProjection.split('EPSG:')[1]) {
        return SuperMap.FetchRequest.get(info.url + "/tilefeature.mvt").then(function (response) {
          return response.json();
        }).then(function (result) {
          info.isMvt = result.error && result.error.code === 400;
          return info;
        }).catch(function () {
          return info;
        });
      }
      return info;
    });
  };
  _proto._getServiceInfoFromLayer = function _getServiceInfoFromLayer(_ref2, info) {
    var _this13 = this;
    var layer = _ref2.layer,
      dataItemServices = _ref2.dataItemServices,
      datasetName = _ref2.datasetName,
      featureType = _ref2.featureType,
      resolve = _ref2.resolve,
      reject = _ref2.reject,
      baseProjection = _ref2.baseProjection;
    var isMapService = info ? !info.isMvt : layer.layerType === 'HOSTED_TILE';
    var isAdded = false;
    dataItemServices.forEach(function (service) {
      if (isAdded) {
        return;
      }
      if (service && isMapService && service.serviceType === 'RESTMAP') {
        isAdded = true;
        _this13._getTileLayerInfo(service.address, baseProjection).then(function (restMaps) {
          resolve({
            type: 'restMap',
            restMaps: restMaps
          });
        });
      } else if (service && !isMapService && service.serviceType === 'RESTDATA') {
        if (info && info.isMvt) {
          resolve({
            type: 'mvt',
            info: info,
            featureType: featureType
          });
        } else {
          isAdded = true;
          _this13._getDatasources(service.address).then(function (datasourceName) {
            layer.dataSource.dataSourceName = datasourceName + ':' + datasetName;
            layer.dataSource.url = service.address + "/data";
            _this13._getFeatureBySQL(layer.dataSource.url, [layer.dataSource.dataSourceName || layer.name], function (result) {
              var features = _this13.parseGeoJsonData2Feature({
                allDatas: {
                  features: result.result.features.features
                }
              });
              resolve({
                type: 'feature',
                features: features
              });
            }, function (err) {
              reject(err);
            });
          }, function (err) {
            reject(err);
          });
        }
      }
    }, this);
    if (!isAdded) {
      reject('noService');
    }
  };
  _proto._getDatasetsInfo = function _getDatasetsInfo(serviceUrl, datasetName) {
    var _this14 = this;
    return this._getDatasources(serviceUrl).then(function (datasourceName) {
      var url = serviceUrl + "/data/datasources/" + datasourceName + "/datasets/" + datasetName;
      var proxy = _this14.handleProxy();
      url = _this14.handleParentRes(url);
      return SuperMap.FetchRequest.get(url, null, {
        withCredentials: _this14.handleWithCredentials(proxy, url, false),
        proxy: proxy
      }).then(function (response) {
        return response.json();
      }).then(function (datasetsInfo) {
        return {
          epsgCode: datasetsInfo.datasetInfo.prjCoordSys.epsgCode,
          bounds: datasetsInfo.datasetInfo.bounds,
          datasourceName: datasourceName,
          datasetName: datasetName,
          url: url
        };
      });
    });
  };
  _proto._getDatasources = function _getDatasources(url) {
    var proxy = this.handleProxy();
    var serviceUrl = url + "/data/datasources.json";
    serviceUrl = this.handleParentRes(serviceUrl);
    return SuperMap.FetchRequest.get(serviceUrl, null, {
      withCredentials: this.handleWithCredentials(proxy, serviceUrl, false),
      proxy: proxy
    }).then(function (response) {
      return response.json();
    }).then(function (datasource) {
      if (datasource.code === 401) {
        throw Error(datasource.errorMsg);
      }
      var datasourceNames = datasource.datasourceNames;
      return datasourceNames[0];
    });
  };
  _proto._getDataService = function _getDataService(fileId, datasetName) {
    var proxy = this.handleProxy();
    var serviceUrl = this.serverUrl + "web/datas/" + fileId + ".json";
    serviceUrl = this.handleParentRes(serviceUrl);
    return SuperMap.FetchRequest.get(serviceUrl, null, {
      withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
      proxy: proxy
    }).then(function (response) {
      return response.json();
    }).then(function (result) {
      result.fileId = fileId;
      result.datasetName = datasetName;
      return result;
    });
  };
  _proto._checkUploadToRelationship = function _checkUploadToRelationship(fileId) {
    var proxy = this.handleProxy();
    var serviceUrl = this.serverUrl + "web/datas/" + fileId + "/datasets.json";
    serviceUrl = this.handleParentRes(serviceUrl);
    return SuperMap.FetchRequest.get(serviceUrl, null, {
      withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
      proxy: proxy
    }).then(function (response) {
      return response.json();
    }).then(function (result) {
      return result;
    });
  };
  _proto._handleMapUrl = function _handleMapUrl() {
    var mapUrl = this.serverUrl + 'web/maps/' + this.mapId + '/map';
    if (this.accessToken || this.accessKey) {
      mapUrl +=  true ? 'token=' + this.accessToken : undefined;
    }
    var filter = 'getUrlResource.json?url=';
    if (this.excludePortalProxyUrl && this.serverUrl.indexOf(filter) > -1) {
      var urlArray = this.serverUrl.split(filter);
      if (urlArray.length > 1) {
        mapUrl = urlArray[0] + filter + this.serverUrl + 'web/maps/' + this.mapId + '/map.json';
      }
    }
    mapUrl = mapUrl.indexOf('.json') === -1 ? mapUrl + ".json" : mapUrl;
    return mapUrl;
  };
  _proto.handleProxy = function handleProxy(type) {
    if (!this.proxy) {
      return null;
    }
    var proxySuffix = this.proxyOptions[type || 'data'];
    var proxy = this.serverUrl + proxySuffix;
    if (typeof this.proxy === 'string') {
      proxy = this.proxy;
    }
    return proxy;
  };
  _proto.handleWithCredentials = function handleWithCredentials(proxyUrl, serviceUrl, defaultValue) {
    if (defaultValue === void 0) {
      defaultValue = this.withCredentials;
    }
    if (proxyUrl && proxyUrl.startsWith(this.serverUrl) && (!serviceUrl || serviceUrl.startsWith(proxyUrl))) {
      return true;
    }
    if (serviceUrl && this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0) {
      return true;
    }
    return defaultValue;
  };
  _proto.isIportalResourceUrl = function isIportalResourceUrl(serviceUrl) {
    return serviceUrl.startsWith(this.serverUrl) || this.iportalServiceProxyUrl && serviceUrl.indexOf(this.iportalServiceProxyUrl) >= 0;
  };
  _proto.handleParentRes = function handleParentRes(url, parentResId, parentResType) {
    if (parentResId === void 0) {
      parentResId = this.mapId;
    }
    if (parentResType === void 0) {
      parentResType = 'MAP';
    }
    if (!this.isIportalResourceUrl(url)) {
      return url;
    }
    return (0, _util.urlAppend)(url, "parentResType=" + parentResType + "&parentResId=" + parentResId);
  };
  _proto._formatGeoJSON = function _formatGeoJSON(data) {
    var features = data.features;
    features.forEach(function (row, index) {
      row.properties['index'] = index;
    });
    return features;
  };
  _proto._excelData2Feature = function _excelData2Feature(dataContent, xyField) {
    if (xyField === void 0) {
      xyField = {};
    }
    var fieldCaptions = dataContent.colTitles;
    var xfieldIndex = fieldCaptions.indexOf(xyField.xField);
    var yfieldIndex = fieldCaptions.indexOf(xyField.yField);
    if (yfieldIndex < 0 || xfieldIndex < 0) {
      for (var i = 0, len = fieldCaptions.length; i < len; i++) {
        if ((0, _util.isXField)(fieldCaptions[i])) {
          xfieldIndex = i;
        }
        if ((0, _util.isYField)(fieldCaptions[i])) {
          yfieldIndex = i;
        }
      }
    }
    var features = [];
    for (var _i = 0, _len = dataContent.rows.length; _i < _len; _i++) {
      var row = dataContent.rows[_i];
      var x = Number(row[xfieldIndex]);
      var y = Number(row[yfieldIndex]);
      var attributes = {};
      for (var index = 0; index < dataContent.colTitles.length; index++) {
        var element = dataContent.colTitles[index].trim();
        attributes[element] = dataContent.rows[_i][index];
      }
      attributes['index'] = _i + '';
      var feature = {
        type: 'Feature',
        geometry: {
          type: 'Point',
          coordinates: [x, y]
        },
        properties: attributes
      };
      features.push(feature);
    }
    return features;
  };
  _proto._excelData2FeatureByDivision = function _excelData2FeatureByDivision(content, divisionType, divisionField) {
    var _this15 = this;
    var dataName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData' : 'ProvinceData';
    if (window[dataName] && window[dataName].features) {
      return new Promise(function (resolve) {
        resolve(_this15._combineFeature(content, window[dataName], divisionField));
      });
    }
    var dataFileName = ['城市', 'City'].includes(divisionType) ? 'MunicipalData.js' : 'ProvincialData.js';
    var proxy = this.handleProxy();
    var dataUrl = this.serverUrl + "apps/dataviz/libs/administrative_data/" + dataFileName;
    return SuperMap.FetchRequest.get(dataUrl, null, {
      withCredentials: false,
      proxy: proxy,
      withoutFormatSuffix: true
    }).then(function (response) {
      return response.text();
    }).then(function (result) {
      new Function(result)();
      return _this15._combineFeature(content, window[dataName], divisionField);
    });
  };
  _proto._combineFeature = function _combineFeature(properties, geoData, divisionField) {
    var _this16 = this;
    var geojson = {
      type: 'FeatureCollection',
      features: []
    };
    if (properties.length < 2) {
      return geojson;
    }
    var titles = properties.colTitles;
    var rows = properties.rows;
    var fieldIndex = titles.findIndex(function (title) {
      return title === divisionField;
    });
    rows.forEach(function (row) {
      var feature = geoData.features.find(function (item) {
        return _this16._isMatchAdministrativeName(item.properties.Name, row[fieldIndex]);
      });
      if (feature) {
        var province = feature.properties.Province;
        var combineFeature = {
          properties: {},
          geometry: feature.geometry,
          type: 'Feature'
        };
        row.forEach(function (item, idx) {
          combineFeature.properties[titles[idx]] = item;
        });
        if (province) {
          combineFeature.properties.Province = province;
        }
        geojson.features.push(combineFeature);
      }
    });
    return geojson;
  };
  _proto._isMatchAdministrativeName = function _isMatchAdministrativeName(featureName, fieldName) {
    if (featureName && typeof fieldName === 'string' && fieldName.constructor === String) {
      var shortName = featureName.trim().substr(0, 2);
      if (shortName === '张家') {
        shortName = featureName.trim().substr(0, 3);
      }
      if (shortName === '阿拉') {
        shortName = featureName.trim().substr(0, 3);
      }
      return !!fieldName.match(new RegExp(shortName));
    }
    return false;
  };
  _proto._getTileLayerInfo = function _getTileLayerInfo(url, baseProjection) {
    var _this17 = this;
    var proxy = this.handleProxy();
    var epsgCode = baseProjection.split('EPSG:')[1];
    var serviceUrl = url + "/maps.json";
    serviceUrl = this.handleParentRes(serviceUrl);
    return SuperMap.FetchRequest.get(serviceUrl, null, {
      withCredentials: this.handleWithCredentials(proxy, serviceUrl, this.withCredentials),
      proxy: proxy
    }).then(function (response) {
      return response.json();
    }).then(function (mapInfo) {
      var promises = [];
      if (mapInfo) {
        mapInfo.forEach(function (info) {
          var promise = SuperMap.FetchRequest.get(info.path + ".json?prjCoordSys=" + JSON.stringify({
            epsgCode: epsgCode
          }), null, {
            withCredentials: _this17.withCredentials,
            proxy: proxy
          }).then(function (response) {
            return response.json();
          }).then(function (restMapInfo) {
            restMapInfo.url = info.path;
            return restMapInfo;
          });
          promises.push(promise);
        });
      }
      return Promise.all(promises).then(function (allRestMaps) {
        return allRestMaps;
      });
    });
  };
  _proto._getFeatureBySQL = function _getFeatureBySQL(url, datasetNames, _processCompleted2, processFaild, baseProjection) {
    var getFeatureParam, getFeatureBySQLService, getFeatureBySQLParams;
    getFeatureParam = new SuperMap.FilterParameter({
      name: datasetNames.join().replace(':', '@'),
      attributeFilter: null
    });
    getFeatureBySQLParams = new SuperMap.GetFeaturesBySQLParameters({
      queryParameter: getFeatureParam,
      datasetNames: datasetNames,
      fromIndex: 0,
      toIndex: -1,
      maxFeatures: -1,
      returnContent: true
    });
    if (baseProjection) {
      if (baseProjection === 'EPSG:3857' || baseProjection === 'EPSG:-1000') {
        getFeatureBySQLParams.targetEpsgCode = 4326;
      } else {
        getFeatureBySQLParams.targetEpsgCode = +baseProjection.split(':')[1];
      }
    }
    var proxy = this.handleProxy();
    var options = {
      proxy: proxy,
      withCredentials: this.handleWithCredentials(proxy, url, false),
      eventListeners: {
        processCompleted: function processCompleted(getFeaturesEventArgs) {
          _processCompleted2 && _processCompleted2(getFeaturesEventArgs);
        },
        processFailed: function processFailed(e) {
          processFaild && processFaild(e);
        }
      }
    };
    var serviceUrl = this.handleParentRes(url);
    getFeatureBySQLService = new SuperMap.GetFeaturesBySQLService(serviceUrl, options);
    getFeatureBySQLService.processAsync(getFeatureBySQLParams);
  };
  _proto.getEpsgCodeInfo = function getEpsgCodeInfo(epsgCode, iPortalUrl) {
    return __awaiter(this, void 0, void 0, /*#__PURE__*/_regenerator.default.mark(function _callee3() {
      var url, codeUrl, wkt;
      return _regenerator.default.wrap(function _callee3$(_context3) {
        while (1) switch (_context3.prev = _context3.next) {
          case 0:
            url = iPortalUrl.slice(-1) === '/' ? iPortalUrl : iPortalUrl + "/";
            codeUrl = url + "epsgcodes/" + epsgCode + ".json";
            _context3.next = 4;
            return SuperMap.FetchRequest.get(codeUrl, null).then(function (response) {
              return response.json();
            }).then(function (epsgcodeInfo) {
              return epsgcodeInfo.wkt;
            }).catch(function (err) {
              console.error(err);
              return undefined;
            });
          case 4:
            wkt = _context3.sent;
            return _context3.abrupt("return", wkt);
          case 6:
          case "end":
            return _context3.stop();
        }
      }, _callee3);
    }));
  };
  return WebMapService;
}(_Events2.Events);

/***/ }),

/***/ 421:
/***/ (function(module, exports) {

module.exports = require("lodash.min");

/***/ }),

/***/ 47:
/***/ (function(module, exports) {

module.exports = require("@supermap/vue-iclient-mapboxgl/lib/_types/event/Events.js");

/***/ })

/******/ });