Skip to content

Commit 0571783

Browse files
committed
【fix】sonar 更新iportal例子token review by qiwei
1 parent d896cd3 commit 0571783

16 files changed

+19
-25
lines changed

examples/leaflet/iPortalBatchAddResource.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h5 data-i18n="resources.title_share_setting"></h5>
102102
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8091/iportal
103103
var iPortalUrl = "https://iportal.supermap.io/iportal";
104104
// iptl的admin1用户的token,模拟admin1用户登录状态
105-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
105+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
106106
//默认请求资源类型
107107
var resourceType = "MAP";
108108
//共享设置

examples/leaflet/iPortalPublishData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ <h4 class="modal-title" id="myModalLabel" data-i18n="resources.text_publish_data
135135
<script>
136136
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
137137
var iPortalUrl = "https://iportal.supermap.io/iportal";
138-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
138+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
139139
var queryParams = new SuperMap.iPortalQueryParam({
140140
resourceType: "DATA",
141141
pageSize: 12,

examples/leaflet/iPortalQueryMyResources.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
247247
<script>
248248
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8091/iportal
249249
var iPortalUrl = "https://iportal.supermap.io/iportal";
250-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
250+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
251251
//默认请求资源类型
252252
var resourceType = "MAP";
253253
//全局变量,承载请求后,一共有多少页数

examples/leaflet/iPortalRegisterData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h5 data-i18n="resources.detail_iPortal_tags"></h5>
5353
<script>
5454
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
5555
var iPortalUrl = "https://iportal.supermap.io/iportal";
56-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
56+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
5757
//数据类型
5858
var dataType;
5959

examples/leaflet/iPortalUploadData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h5 data-i18n="resources.text_file_encoding"></h5>
9999
<script>
100100
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
101101
var iPortalUrl = "https://iportal.supermap.io/iportal";
102-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
102+
var token = "ea1pS6sE6FkynpVnJ61_gHc2l6s8FIIR3inxGJCgJIYlNYMx9Km6TnC-58ifj-IP_0ESonuxrpI6ydGsBuU6BA..";
103103
//上传文件的一些变量(文件对象 文件格式 数据类型 上传的文件名称)
104104
var file,fileFormats,dataType,uploadDataFileName;
105105
//excel csv解析(回调重定向对象 x坐标区域 y坐标区域)

examples/openlayers/iPortalBatchAddResource.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h5 data-i18n="resources.title_share_setting"></h5>
102102
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8091/iportal
103103
var iPortalUrl = "https://iportal.supermap.io/iportal";
104104
// iptl的admin1用户的token,模拟admin1用户登录状态
105-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
105+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
106106
//默认请求资源类型
107107
var resourceType = "MAP";
108108
//共享设置

examples/openlayers/iPortalPublishData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ <h4 class="modal-title" id="myModalLabel" data-i18n="resources.text_publish_data
135135
<script>
136136
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
137137
var iPortalUrl = "https://iportal.supermap.io/iportal";
138-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
138+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
139139
var queryParams = new SuperMap.iPortalQueryParam({
140140
resourceType: "DATA",
141141
pageSize: 12,

examples/openlayers/iPortalQueryMyResources.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_iPortalQueryMyRes
247247
<script>
248248
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8091/iportal
249249
var iPortalUrl = "https://iportal.supermap.io/iportal";
250-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
250+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
251251
//默认请求资源类型
252252
var resourceType = "MAP";
253253
//全局变量,承载请求后,一共有多少页数

examples/openlayers/iPortalRegisterData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h5 data-i18n="resources.detail_iPortal_tags"></h5>
5353
<script>
5454
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
5555
var iPortalUrl = "https://iportal.supermap.io/iportal";
56-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
56+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
5757
//数据类型
5858
var dataType;
5959

examples/openlayers/iPortalUploadData.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h5 data-i18n="resources.text_file_encoding"></h5>
9999
<script>
100100
//iportal的URL地址 或根据情况添加自己的本地iportal地址:http://localhost:8190/iportal
101101
var iPortalUrl = "https://iportal.supermap.io/iportal";
102-
var token = "MFEKl8kVmkvEDrDFcgnjoUF4o2VKXT1eZhKh7hU3tnJL1jPculOBmvCtA6Xfrw4KuAyxWj2OcUV1Aj3M41nSNQ..";
102+
var token = "MFEKl8kVmkvEDrDFcgnjodlPCudIO83mBSwvdjiUlWNnySGD-FCEyYEk4CsY2WnSCujfAs8HI0ZkSL6Vxa-njg..";
103103
//上传文件的一些变量(文件对象 文件格式 数据类型 上传的文件名称)
104104
var file,fileFormats,dataType,uploadDataFileName;
105105
//excel csv解析(回调重定向对象 x坐标区域 y坐标区域)

src/common/overlay/levelRenderer/Log.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class Log {
2121
return function () {
2222
if (Config.debugMode === 0) {
2323
return;
24-
} else if (Config.debugMode == 1) {
24+
} else if (Config.debugMode === 1) {
2525
for (let k in arguments) {
2626
throw new Error(arguments[k]);
2727
}

src/common/overlay/levelRenderer/SUtil.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class SUtil {
2727
* @return {Array} 生成的平滑节点数组。
2828
*/
2929
static SUtil_smoothBezier(points, smooth, isLoop, constraint, originalPosition) {
30-
if (!originalPosition || originalPosition !== 2) {
30+
if (!originalPosition || originalPosition.length !== 2) {
3131
originalPosition = [0, 0];
3232
}
3333
var __OP = originalPosition;
@@ -117,7 +117,7 @@ export class SUtil {
117117
* @return {Array} 生成的平滑节点数组。
118118
*/
119119
static SUtil_smoothSpline(points, isLoop, constraint, originalPosition) {
120-
if (!originalPosition || originalPosition !== 2) {
120+
if (!originalPosition || originalPosition.length !== 2) {
121121
originalPosition = [0, 0];
122122
}
123123
var __OP = originalPosition;

src/common/style/CartoCSS.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4615,7 +4615,6 @@ SuperMap.CartoCSS.Tree.Zoom = class Zoom {
46154615
this.zoom = "zoom && zoom <= " + value;
46164616
break;
46174617
default:
4618-
return this;
46194618
break;
46204619
}
46214620
/*

src/mapboxgl/overlay/mapv/MapvDataSet.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@ export var MapvDataSet = {
2727
getPoints: function (points) {
2828
if (points && (points instanceof Array)) {
2929
var mPoints = [];
30-
points.map(function (data) {
30+
points.forEach(data => {
3131
mPoints.push({
3232
geometry: {
3333
type: 'Point',
3434
coordinates: data.geometry.coordinates
3535
}
3636
});
37-
return data;
3837
});
3938
return new DataSet(mPoints);
4039
}
@@ -46,7 +45,7 @@ export var MapvDataSet = {
4645
getCurveLines: function (startPoint, LinePoints) {
4746
if (startPoint && (startPoint instanceof Array) && LinePoints && (LinePoints instanceof Array)) {
4847
var lineData = [];
49-
LinePoints.map(function (data) {
48+
LinePoints.forEach(data => {
5049
var coords = data.geometry && data.geometry.coordinates;
5150
var toCenter = {lng: coords[0], lat: coords[1]};
5251
var fromCenter = {lng: startPoint[0], lat: startPoint[1]};
@@ -57,7 +56,6 @@ export var MapvDataSet = {
5756
coordinates: cv
5857
}
5958
});
60-
return data;
6159
});
6260
return new DataSet(lineData);
6361
}
@@ -69,7 +67,7 @@ export var MapvDataSet = {
6967
getCurveDynamicPoints: function (center, endPoints) {
7068
if (center && (center instanceof Array) && endPoints && (endPoints instanceof Array)) {
7169
var timeData = [];
72-
endPoints.map(function (data) {
70+
endPoints.forEach(data => {
7371
var coords = data.geometry && data.geometry.coordinates;
7472
var toCenter = {lng: coords[0], lat: coords[1]};
7573
var fromCenter = {lng: center[0], lat: center[1]};
@@ -83,7 +81,6 @@ export var MapvDataSet = {
8381
time: j
8482
});
8583
}
86-
return data
8784
});
8885
return new DataSet(timeData);
8986
}

src/openlayers/mapping/Tianditu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class Tianditu extends WMTS {
9393
/**
9494
* @function ol.source.Tianditu.getTileGrid
9595
* @description 获取瓦片网格。
96-
* @param {Object} projection - 投影参考对象。
96+
* @param {string} projection - 投影参考对象。
9797
* @returns {ol/tilegrid/WMTS} 返回瓦片网格对象
9898
*/
9999
static getTileGrid(projection) {

src/openlayers/overlay/Graphic.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,17 +547,15 @@ export class Graphic extends ImageCanvasSource {
547547
getGraphicsInExtent(extent) {
548548
var graphics = [];
549549
if (!extent) {
550-
this.graphics.map(function(graphic) {
550+
this.graphics.forEach(graphic => {
551551
graphics.push(graphic);
552-
return graphic;
553552
});
554553
return graphics;
555554
}
556-
this.graphics.map(function(graphic) {
555+
this.graphics.forEach(graphic => {
557556
if (olExtent.containsExtent(extent, graphic.getGeometry().getExtent())) {
558557
graphics.push(graphic);
559558
}
560-
return graphic;
561559
});
562560
return graphics;
563561
}

0 commit comments

Comments
 (0)