@@ -53865,7 +53865,6 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5386553865 //大屏需求,或者有加上代理的
5386653866 var urlArray = this.server.split(filter);
5386753867 if (urlArray.length > 1) {
53868- var url = urlArray[1];
5386953868 mapUrl = urlArray[0] + filter + this.server + 'web/maps/' + this.mapId + '/map.json';
5387053869 }
5387153870 }
@@ -54272,7 +54271,7 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5427254271 key: '_getTiandituUrl',
5427354272 value: function _getTiandituUrl(mapInfo) {
5427454273 var re = /t0/gi;
54275- var tiandituUrls = [] ;
54274+ var tiandituUrls = {} ;
5427654275 var layerType = mapInfo.baseLayer.layerType.split('_')[1].toLowerCase();
5427754276 var isLabel = Boolean(mapInfo.baseLayer.labelLayerVisible);
5427854277 // let isLabel = true;
@@ -55408,82 +55407,6 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5540855407 return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');
5540955408 }
5541055409
55411- /**
55412- * @function mapboxgl.supermap.WebMap.prototype._getRootUrl
55413- * @private
55414- * @description 返回根rul
55415- */
55416-
55417- }, {
55418- key: '_getRootUrl',
55419- value: function _getRootUrl(url) {
55420- if (url) {
55421- var tempRootUrl = {};
55422- var onlineUrl = 'https://www.supermapol.com/',
55423- itestUrl = 'https://itest.supermapol.com/';
55424- if (tempRootUrl[url]) {
55425- return tempRootUrl[url];
55426- }
55427- var rootUrl = "";
55428- if (url.indexOf(onlineUrl) === 0) {
55429- rootUrl = onlineUrl;
55430- } else if (url.indexOf(itestUrl) === 0) {
55431- rootUrl = itestUrl;
55432- } else {
55433- var regExp = /\/apps|\/web|\/manager|\/developer|\/services/i,
55434- index = url.search(regExp);
55435- var anchor = this._getAnchor(url);
55436- rootUrl += anchor.protocol + '//' + this._getHost(url) + '/';
55437- if (index > 0) {
55438- rootUrl += url.substring(rootUrl.length, index + 1);
55439- }
55440- }
55441- tempRootUrl[url] = rootUrl;
55442- return rootUrl;
55443- }
55444- }
55445-
55446- /**
55447- * @function mapboxgl.supermap.WebMap.prototype._getHost
55448- * @private
55449- * @description 返回根rul
55450- */
55451-
55452- }, {
55453- key: '_getHost',
55454- value: function _getHost(url) {
55455- var anchor = this._getAnchor(url);
55456- if (!anchor) {
55457- return null;
55458- }
55459- var port = anchor.port,
55460- host = anchor.host;
55461- //IE下会自动给host添加http(80), https(443)
55462- if (port === "80" || port === "443") {
55463- return host.split(":")[0];
55464- }
55465- return host;
55466- }
55467-
55468- /**
55469- * @private
55470- * @function mapboxgl.supermap.WebMap.prototype._getAnchor
55471- * @description 获取https或http域名
55472- * @param {string} url - 完整地址的url。
55473- */
55474-
55475- }, {
55476- key: '_getAnchor',
55477- value: function _getAnchor(url) {
55478- var tempAnchor = {};
55479- if (tempAnchor[url]) {
55480- return tempAnchor[url];
55481- }
55482- var anchor = document.createElement('a');
55483- anchor.href = url;
55484- tempAnchor[url] = anchor;
55485- return anchor;
55486- }
5548755410 /**
5548855411 * @private
5548955412 * @description 判断是否地理X坐标
@@ -55513,7 +55436,7 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5551355436 /**
5551455437 * @private
5551555438 * @function mapboxgl.supermap.WebMap.prototype._transformStyleToMapBoxGl
55516- * @description 根据图层类型将layerInfo中的style属性格式转换为mapboxgl中的style格式 。
55439+ * @description 根据图层类型将 layerInfo 中的 style 属性格式转换为 mapboxgl 中的 style 格式 。
5551755440 * @param {Object} style - layerInfo中的style属性
5551855441 * @param {String} type - 图层类型
5551955442 * @param {Array} [expression] - 存储颜色值得表达式
@@ -55522,7 +55445,7 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5552255445 }, {
5552355446 key: '_transformStyleToMapBoxGl',
5552455447 value: function _transformStyleToMapBoxGl(style, type, expression) {
55525- var transTable = void 0 ;
55448+ var transTable = {} ;
5552655449 if ((style.type === 'POINT' || style.type === 'BASIC_POINT' || type === 'POINT') && type !== 'LINE') {
5552755450 transTable = {
5552855451 "fillColor": "circle-color",
@@ -55548,7 +55471,7 @@ var WebMap = exports.WebMap = function (_mapboxgl$Evented) {
5554855471
5554955472 var newObj = {};
5555055473 for (var item in style) {
55551- if (transTable[item]) {
55474+ if (transTable && transTable [item]) {
5555255475 newObj[transTable[item]] = style[item];
5555355476 }
5555455477 }
0 commit comments