Skip to content

Commit 967e16b

Browse files
committed
Merge branch 'master' of https://github.com/SuperMap/iClient-JavaScript into master
2 parents 2aedebf + 16a4b3b commit 967e16b

14 files changed

+41
-21
lines changed

dist/maplibregl/iclient-maplibregl-es6.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49974,6 +49974,7 @@ class MapvLayer {
4997449974
getResolution: this._getResolution,
4997549975
validZoom: this._validZoom.bind(this)
4997649976
}, { id: this.id, targetElement: this.mapContainer, mapElement: this.map.getCanvas() });
49977+
this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
4997749978
this._bindEvent();
4997849979
}
4997949980
/**
@@ -54583,7 +54584,7 @@ class GraticuleLayer {
5458354584
id: this.id
5458454585
});
5458554586
this.addGraticuleLayer();
54586-
this.resizeEvent = this.renderer._resizeCallback;
54587+
this.resizeEvent = this.renderer._resizeCallback.bind(this.renderer);
5458754588
this.zoomendEvent = this.setVisibility.bind(this);
5458854589
this._bindEvent()
5458954590
}

dist/maplibregl/iclient-maplibregl-es6.min.js

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/maplibregl/iclient-maplibregl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54230,6 +54230,7 @@ var MapvLayer = /*#__PURE__*/function () {
5423054230
targetElement: this.mapContainer,
5423154231
mapElement: this.map.getCanvas()
5423254232
});
54233+
this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
5423354234
this._bindEvent();
5423454235
}
5423554236
/**
@@ -59309,7 +59310,7 @@ var GraticuleLayer = /*#__PURE__*/function () {
5930959310
id: this.id
5931059311
});
5931159312
this.addGraticuleLayer();
59312-
this.resizeEvent = this.renderer._resizeCallback;
59313+
this.resizeEvent = this.renderer._resizeCallback.bind(this.renderer);
5931359314
this.zoomendEvent = this.setVisibility.bind(this);
5931459315
this._bindEvent();
5931559316
}

dist/maplibregl/iclient-maplibregl.min.js

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

examples/js/editor.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/* Copyright© 2000 - 2023 SuperMap Software Co.Ltd. All rights reserved.*/
2+
var exampleNameList = [];
3+
24
$(document).ready(function () {
35
window.initI18N(function(){
6+
generateExampleNameList();
47
initPage();
58
bindEvents();
69
sidebarScrollFix();
710
});
811
});
9-
1012
var aceEditor;
1113
var containExamples = true;
1214

@@ -16,6 +18,17 @@ function initPage() {
1618
screenResize();
1719
}
1820

21+
function generateExampleNameList() {
22+
var config = window.exampleConfig;
23+
Object.keys(config).forEach((menuItem) => {
24+
config[menuItem].content && Object.keys(config[menuItem].content).forEach((secondMenuItem) => {
25+
config[menuItem].content[secondMenuItem].content && config[menuItem].content[secondMenuItem].content.forEach((exampleInfo) => {
26+
exampleNameList.push(exampleInfo.fileName);
27+
});
28+
});
29+
});
30+
}
31+
1932

2033
//获取示例页面的配置信息
2134
function getActiveExampleConfig(){
@@ -89,21 +102,26 @@ function loadExampleHtml() {
89102
if (!locationParam) {
90103
return;
91104
}
105+
if (exampleNameList.indexOf(locationParam) === -1) {
106+
window.location.href = window.location.origin + '/web/404.html';
107+
return;
108+
}
92109
var href = window.location.toString();
93110
var mapUrl = href.substr(0, href.lastIndexOf('/') + 1);
94111
mapUrl = mapUrl + locationParam + ".html";
95112
if (!mapUrl) {
96113
return;
97114
}
98115
var isError = false;
99-
var html = $.ajax({
116+
var response = $.ajax({
100117
url: mapUrl,
101118
async: false,
102119
error: function (error) {
103120
alert(resources.editor.envTips);
104121
isError = true;
105122
}
106-
}).responseText;
123+
});
124+
var html = response.responseText;
107125
if (html && html != "" && !isError) {
108126
$('#editor').val(html);
109127
loadPreview(html);

examples/js/include-web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,6 @@
227227
});
228228
window.isLocal = false;
229229
window.server = document.location.toString().match(/file:\/\//) ? "http://localhost:8090" : document.location.protocol + "//" + document.location.host;
230-
window.version = "11.1.0";
230+
window.version = "11.1.1";
231231
window.preRelease = "";
232232
})();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SuperMapiClient",
33
"description": "SuperMap iClient JavaScript 是一套由 JavaScript 语言编写的 GIS 客户端应用开发包, 支持多源数据地图,支持多终端,跨浏览器, 通过本产品可快速实现浏览器上美观、流畅的地图呈现。",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"directories": {
66
"doc": "doc",
77
"example": "examples",

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Required metadata
22
sonar.projectKey=com.supermap:iclient-javascript
33
sonar.projectName=iclient-javascript
4-
sonar.projectVersion=11.1.0
4+
sonar.projectVersion=11.1.1
55

66
# Comma-separated paths to directories with sources (required)
77
sonar.sources=src/

src/classic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-classic",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap"
77
],
@@ -15,6 +15,6 @@
1515
"license": "Apache-2.0",
1616
"dependencies": {
1717
"mapv": "2.0.62",
18-
"@supermap/iclient-common": "11.1.0"
18+
"@supermap/iclient-common": "11.1.1-dev"
1919
}
2020
}

src/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-common",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap"
77
],

src/leaflet/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-leaflet",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap",
77
"Leaflet"
@@ -19,7 +19,7 @@
1919
"echarts":"4.9.0",
2020
"mapv":"2.0.62",
2121
"leaflet": "1.9.4",
22-
"@supermap/iclient-common": "11.1.0",
22+
"@supermap/iclient-common": "11.1.1-dev",
2323
"@mapbox/vector-tile": "1.3.1",
2424
"jsonsql": "0.2.5",
2525
"pbf": "3.2.1",

src/mapboxgl/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-mapboxgl",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap",
77
"MapboxGL v1"
@@ -18,7 +18,7 @@
1818
"mapv": "2.0.62",
1919
"mapbox-gl": "1.13.2",
2020
"three": "0.150.1",
21-
"@supermap/iclient-common": "11.1.0",
21+
"@supermap/iclient-common": "11.1.1-dev",
2222
"canvg": "3.0.10",
2323
"xml-js": "1.6.11",
2424
"flatgeobuf": "3.23.1",

src/maplibregl/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-maplibregl",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap",
77
"maplibregl"
@@ -20,7 +20,7 @@
2020
"three": "0.150.1",
2121
"canvg": "3.0.10",
2222
"xml-js": "1.6.11",
23-
"@supermap/iclient-common": "11.1.0",
23+
"@supermap/iclient-common": "11.1.1-dev",
2424
"rbush": "^2.0.2"
2525
}
2626
}

src/openlayers/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@supermap/iclient-ol",
33
"description": "",
4-
"version": "11.1.0",
4+
"version": "11.1.1-dev",
55
"keywords": [
66
"SuperMap",
77
"OpenLayers"
@@ -18,7 +18,7 @@
1818
"@turf/turf": "6.5.0",
1919
"mapv": "2.0.62",
2020
"ol": "6.14.1",
21-
"@supermap/iclient-common": "11.1.0",
21+
"@supermap/iclient-common": "11.1.1-dev",
2222
"proj4": "2.9.0",
2323
"canvg": "3.0.10",
2424
"lodash.remove": "^4.7.0",

0 commit comments

Comments
 (0)