Skip to content

Commit a9eeeac

Browse files
committed
2 parents f19592d + afc2cb8 commit a9eeeac

File tree

9 files changed

+876
-869
lines changed

9 files changed

+876
-869
lines changed

dist/leaflet/iclient9-leaflet-es6.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16172,9 +16172,8 @@ SuperMap.iPortalMap = iPortalMap_IPortalMap;
1617216172
* @param {string} iportalUrl - 地址。
1617316173
*/
1617416174
class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
16175-
1617616175
constructor(iportalUrl, options) {
16177-
super(iportalUrl,options);
16176+
super(iportalUrl, options);
1617816177
this.iportalUrl = iportalUrl;
1617916178
options = options || {};
1618016179
this.withCredentials = options.withCredentials || false;
@@ -16186,7 +16185,7 @@ class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
1618616185
* @returns {Promise} 返回包含 iportal web 资源信息的 Promise 对象。
1618716186
*/
1618816187
load() {
16189-
return FetchRequest_FetchRequest.get(this.iportalUrl + '/web');
16188+
return FetchRequest_FetchRequest.get(this.iportalUrl + "/web");
1619016189
}
1619116190

1619216191
/**
@@ -16200,9 +16199,9 @@ class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
1620016199
return null;
1620116200
}
1620216201
var serviceUrl = this.iportalUrl + "/web/services";
16203-
return this.request("GET", serviceUrl, queryParams).then(function (result) {
16202+
return this.request("GET", serviceUrl, queryParams).then(function(result) {
1620416203
var services = [];
16205-
result.content.map(function (serviceJsonObj) {
16204+
result.content.map(function(serviceJsonObj) {
1620616205
services.push(new iPortalService_IPortalService(serviceUrl, serviceJsonObj));
1620716206
return serviceJsonObj;
1620816207
});
@@ -16237,26 +16236,27 @@ class iPortal_IPortal extends iPortalServiceBase_IPortalServiceBase {
1623716236
} else {
1623816237
mapsUrl = this.iportalUrl + "/web/maps";
1623916238
}
16240-
return this.request("GET", mapsUrl, queryParams).then(function (result) {
16239+
return this.request("GET", mapsUrl, queryParams).then(function(result) {
1624116240
var mapRetult = {};
1624216241
var maps = [];
16243-
result.content.map(function (mapJsonObj) {
16244-
maps.push(new iPortalMap_IPortalMap(mapsUrl + "/" + mapJsonObj.id, mapJsonObj));
16245-
return mapJsonObj;
16246-
});
16247-
mapRetult.content = maps;
16248-
mapRetult.currentPage = result.currentPage;
16249-
mapRetult.pageSize = result.pageSize;
16250-
mapRetult.total = result.total;
16251-
mapRetult.totalPage = result.totalPage;
16252-
return mapRetult;
16242+
if (result.content && result.content.length > 0) {
16243+
result.content.map(function(mapJsonObj) {
16244+
maps.push(new iPortalMap_IPortalMap(mapsUrl + "/" + mapJsonObj.id, mapJsonObj));
16245+
return mapJsonObj;
16246+
});
16247+
mapRetult.content = maps;
16248+
mapRetult.currentPage = result.currentPage;
16249+
mapRetult.pageSize = result.pageSize;
16250+
mapRetult.total = result.total;
16251+
mapRetult.totalPage = result.totalPage;
16252+
return mapRetult;
16253+
}
1625316254
});
1625416255
}
1625516256
}
1625616257

1625716258
SuperMap.iPortal = iPortal_IPortal;
1625816259

16259-
1626016260
// CONCATENATED MODULE: ./src/common/iPortal/index.js
1626116261
/* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
1626216262
* This program are made available under the terms of the Apache License, Version 2.0
@@ -76896,7 +76896,7 @@ const EChartsLayer_EchartsLayer = external_L_default.a.Layer.extend({
7689676896
_div.style.zIndex = 10;
7689776897
this._echartsContainer = _div;
7689876898

76899-
this._map.getPanes().overlayPane.appendChild(this._echartsContainer);
76899+
this.getPane().appendChild(this._echartsContainer);
7690076900
const me = this;
7690176901

7690276902
function _resizeHandler(e) {
@@ -77859,6 +77859,8 @@ var GraphicLayer_GraphicLayer = external_L_default.a.Path.extend({
7785977859
initialize: function (graphics, options) {
7786077860
this.graphics = [].concat(graphics);
7786177861
let opt = options || {};
77862+
// 由于是canvas实现所以不能更改pane
77863+
opt.pane = 'overlayPane';
7786277864
external_L_default.a.Util.setOptions(this, opt);
7786377865
//因为跟基类的renderer冲突,所以采用render这个名字
7786477866
this.options.render = this.options.render || GraphicLayer_Renderer[0];

dist/leaflet/iclient9-leaflet-es6.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.css

Lines changed: 821 additions & 821 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74635,6 +74635,8 @@ var GraphicLayer = exports.GraphicLayer = _leaflet2["default"].Path.extend({
7463574635
initialize: function initialize(graphics, options) {
7463674636
this.graphics = [].concat(graphics);
7463774637
var opt = options || {};
74638+
// 由于是canvas实现所以不能更改pane
74639+
opt.pane = 'overlayPane';
7463874640
_leaflet2["default"].Util.setOptions(this, opt);
7463974641
//因为跟基类的renderer冲突,所以采用render这个名字
7464074642
this.options.render = this.options.render || Renderer[0];
@@ -75264,7 +75266,7 @@ var EchartsLayer = exports.EchartsLayer = _leaflet2["default"].Layer.extend({
7526475266
_div.style.zIndex = 10;
7526575267
this._echartsContainer = _div;
7526675268

75267-
this._map.getPanes().overlayPane.appendChild(this._echartsContainer);
75269+
this.getPane().appendChild(this._echartsContainer);
7526875270
var me = this;
7526975271

7527075272
function _resizeHandler(e) {
@@ -107380,9 +107382,9 @@ var IPortal = exports.IPortal = function (_IPortalServiceBase) {
107380107382

107381107383

107382107384
_createClass(IPortal, [{
107383-
key: 'load',
107385+
key: "load",
107384107386
value: function load() {
107385-
return _FetchRequest.FetchRequest.get(this.iportalUrl + '/web');
107387+
return _FetchRequest.FetchRequest.get(this.iportalUrl + "/web");
107386107388
}
107387107389

107388107390
/**
@@ -107393,7 +107395,7 @@ var IPortal = exports.IPortal = function (_IPortalServiceBase) {
107393107395
*/
107394107396

107395107397
}, {
107396-
key: 'queryServices',
107398+
key: "queryServices",
107397107399
value: function queryServices(queryParams) {
107398107400
if (!(queryParams instanceof _iPortalServicesQueryParam.IPortalServicesQueryParam)) {
107399107401
return null;
@@ -107417,7 +107419,7 @@ var IPortal = exports.IPortal = function (_IPortalServiceBase) {
107417107419
*/
107418107420

107419107421
}, {
107420-
key: 'deleteServices',
107422+
key: "deleteServices",
107421107423
value: function deleteServices(ids) {
107422107424
var serviceUrl = this.iportalUrl + "/web/services";
107423107425
return this.request("DELETE", serviceUrl, { ids: ids });
@@ -107431,7 +107433,7 @@ var IPortal = exports.IPortal = function (_IPortalServiceBase) {
107431107433
*/
107432107434

107433107435
}, {
107434-
key: 'queryMaps',
107436+
key: "queryMaps",
107435107437
value: function queryMaps(queryParams) {
107436107438
if (!(queryParams instanceof _iPortalMapsQueryParam.IPortalMapsQueryParam)) {
107437107439
return null;
@@ -107445,16 +107447,18 @@ var IPortal = exports.IPortal = function (_IPortalServiceBase) {
107445107447
return this.request("GET", mapsUrl, queryParams).then(function (result) {
107446107448
var mapRetult = {};
107447107449
var maps = [];
107448-
result.content.map(function (mapJsonObj) {
107449-
maps.push(new _iPortalMap.IPortalMap(mapsUrl + "/" + mapJsonObj.id, mapJsonObj));
107450-
return mapJsonObj;
107451-
});
107452-
mapRetult.content = maps;
107453-
mapRetult.currentPage = result.currentPage;
107454-
mapRetult.pageSize = result.pageSize;
107455-
mapRetult.total = result.total;
107456-
mapRetult.totalPage = result.totalPage;
107457-
return mapRetult;
107450+
if (result.content && result.content.length > 0) {
107451+
result.content.map(function (mapJsonObj) {
107452+
maps.push(new _iPortalMap.IPortalMap(mapsUrl + "/" + mapJsonObj.id, mapJsonObj));
107453+
return mapJsonObj;
107454+
});
107455+
mapRetult.content = maps;
107456+
mapRetult.currentPage = result.currentPage;
107457+
mapRetult.pageSize = result.pageSize;
107458+
mapRetult.total = result.total;
107459+
mapRetult.totalPage = result.totalPage;
107460+
return mapRetult;
107461+
}
107458107462
});
107459107463
}
107460107464
}]);

dist/leaflet/iclient9-leaflet.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/leaflet/overlay/EChartsLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export const EchartsLayer = L.Layer.extend({
208208
_div.style.zIndex = 10;
209209
this._echartsContainer = _div;
210210

211-
this._map.getPanes().overlayPane.appendChild(this._echartsContainer);
211+
this.getPane().appendChild(this._echartsContainer);
212212
const me = this;
213213

214214
function _resizeHandler(e) {

src/leaflet/overlay/GraphicLayer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export var GraphicLayer = L.Path.extend({
5252
initialize: function (graphics, options) {
5353
this.graphics = [].concat(graphics);
5454
let opt = options || {};
55+
// 由于是canvas实现所以不能更改pane
56+
opt.pane = 'overlayPane';
5557
L.Util.setOptions(this, opt);
5658
//因为跟基类的renderer冲突,所以采用render这个名字
5759
this.options.render = this.options.render || Renderer[0];

src/openlayers/mapping/WebMap.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const MAX_MIGRATION_ANIMATION_COUNT = 1000;
3636
* @param {string} [options.target='map'] - 地图容器id。
3737
* @param {string} [options.server="http://www.supermapol.com"] - 地图的地址。
3838
* @param {function} [options.successCallback] - 成功加载地图后调用的函数。
39-
* @param {function} [options.errorCallback] - 加载地图失败
39+
* @param {function} [options.errorCallback] - 加载地图失败调用的函数
4040
* @param {string} [options.credentialKey] - 凭证密钥。
4141
* @param {string} [options.credentialValue] - 凭证值。
4242
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
@@ -1726,7 +1726,6 @@ export class WebMap extends ol.Observable {
17261726
let style = StyleUtils.toOpenLayersStyle(this.getDataVectorTileStyle(featureType), featureType);
17271727
return new ol.layer.VectorTile({
17281728
//设置避让参数
1729-
declutter: true,
17301729
source: new ol.source.VectorTileSuperMapRest({
17311730
url: layerInfo.url,
17321731
projection: layerInfo.projection,
@@ -1746,7 +1745,7 @@ export class WebMap extends ol.Observable {
17461745
getDataVectorTileStyle(featureType) {
17471746
let styleParameters = {
17481747
radius: 8, //圆点半径
1749-
fillColor: '#0083cb', //填充色
1748+
fillColor: '#EE4D5A', //填充色
17501749
fillOpacity: 0.9,
17511750
strokeColor: '#ffffff', //边框颜色
17521751
strokeWidth: 1,
@@ -1755,10 +1754,10 @@ export class WebMap extends ol.Observable {
17551754
type: "BASIC_POINT"
17561755
};
17571756
if(["LINE", "LINESTRING", "MULTILINESTRING"].includes(featureType)){
1758-
styleParameters.strokeColor = '#0083cb';
1757+
styleParameters.strokeColor = '#4CC8A3';
17591758
styleParameters.strokeWidth = 2;
17601759
}else if(["REGION", "POLYGON", "MULTIPOLYGON"].includes(featureType)){
1761-
styleParameters.fillColor = '#0083cb';
1760+
styleParameters.fillColor = '#826DBA';
17621761
}
17631762
return styleParameters;
17641763
}
@@ -2828,7 +2827,7 @@ export class WebMap extends ol.Observable {
28282827
* @returns {Promise<T | never>} 数据源名称
28292828
*/
28302829
getDatasources(url) {
2831-
return FetchRequest.get(`${url}/data/datasources.json`).then(function (response) {
2830+
return FetchRequest.get(`${this.getProxy()}${url}/data/datasources.json`).then(function (response) {
28322831
return response.json()
28332832
}).then(function (datasource) {
28342833
let datasourceNames = datasource.datasourceNames;

0 commit comments

Comments
 (0)