Skip to content

Commit 5b25db5

Browse files
committed
2 parents 5509533 + a75d395 commit 5b25db5

File tree

513 files changed

+976018
-720846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

513 files changed

+976018
-720846
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88
/examples-test/reports
99
/web/
1010
/package-lock.json
11-
.npmrc
11+
.npmrc
12+
/dist/mapboxgl/resources/
13+
/dist/maplibregl/resources/

CHANGELOG.md

+248-2
Large diffs are not rendered by default.

build/jsdocs/leaflet/docs.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"src/common/iServer/ProcessingServiceBase",
3737
"src/common/iServer/PointWithMeasure",
3838
"src/common/iServer/ServerTheme",
39+
"src/common/iServer/QueryService",
3940
"src/common/overlay/RankSymbol",
4041
"src/common/overlay/ThemeVector",
4142
"src/common/overlay/Graph",
@@ -64,7 +65,8 @@
6465
"src/common/components/templates/Select",
6566
"src/common/security/KeyServiceParameter",
6667
"src/common/components/templates/TemplateBase",
67-
68+
"src/common/mapping",
69+
6870
"src/leaflet/components/clientcomputation/ClientComputationViewModel",
6971
"src/leaflet/components/dataflow/DataFlowViewModel",
7072
"src/leaflet/overlay/dataflow/MapvRenderer",

build/jsdocs/mapboxgl/docs.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"src/common/iServer/ProcessingServiceBase",
3737
"src/common/iServer/PointWithMeasure",
3838
"src/common/iServer/ServerTheme",
39+
"src/common/iServer/QueryService",
3940
"src/common/overlay/RankSymbol",
4041
"src/common/overlay/ThemeVector",
4142
"src/common/overlay/Graph",
@@ -64,9 +65,16 @@
6465
"src/common/components/templates/Select",
6566
"src/common/security/KeyServiceParameter",
6667
"src/common/components/templates/TemplateBase",
68+
"src/common/mapping/utils/L7LayerUtil",
69+
"src/common/mapping/utils/Color",
70+
"src/common/mapping/utils/util",
71+
"src/common/mapping/WebMapV2",
72+
"src/common/mapping/WebMapV3",
73+
"src/common/mapping/MapStyle",
74+
"src/common/mapping/WebMapV2Base",
75+
"src/common/mapping/WebMapService",
6776
"src/mapboxgl/core/Util",
68-
"src/mapboxgl/overlay/L7/l7-render",
69-
"src/mapboxgl/mapping/utils"
77+
"src/mapboxgl/overlay/L7/l7-render"
7078
]
7179
},
7280
"plugins": ["plugins/markdown","../plugins/usage", "../plugins/moduleCategories"],

build/jsdocs/maplibregl/docs.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"disqus": "",
99
"tags": {
1010
"allowUnknownTags": true,
11-
"linkdoc-maplibregl": "https://maplibre.org/maplibre-gl-js-docs/api/"
11+
"linkdoc-maplibregl": "https://maplibre.org/maplibre-gl-js/docs/API/"
1212
},
1313
"i18n": {
1414
"defaultLang": "en",
@@ -34,6 +34,7 @@
3434
"src/common/iServer/ProcessingServiceBase",
3535
"src/common/iServer/PointWithMeasure",
3636
"src/common/iServer/ServerTheme",
37+
"src/common/iServer/QueryService",
3738
"src/common/overlay/RankSymbol",
3839
"src/common/overlay/ThemeVector",
3940
"src/common/overlay/Graph",
@@ -62,6 +63,14 @@
6263
"src/common/components/templates/Select",
6364
"src/common/security/KeyServiceParameter",
6465
"src/common/components/templates/TemplateBase",
66+
"src/common/mapping/utils/L7LayerUtil",
67+
"src/common/mapping/utils/Color",
68+
"src/common/mapping/utils/util",
69+
"src/common/mapping/WebMapV2",
70+
"src/common/mapping/WebMapV3",
71+
"src/common/mapping/MapStyle",
72+
"src/common/mapping/WebMapV2Base",
73+
"src/common/mapping/WebMapService",
6574
"src/maplibregl/core/Util",
6675
"src/maplibregl/overlay/L7/l7-render"
6776
]

build/jsdocs/maplibregl/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ SuperMap iClient for MaplibreGL 是一套基于 MaplibreGL v1 的云 GIS 网络
88

99
## 参考 API
1010

11-
- Maplibre GL JS API:<a href="https://www.maplibre.com/maplibre-gl-js/api/" target="_blank">https://www.maplibre.com/maplibre-gl-js/api/</a>
11+
- Maplibre GL JS API:<a href="https://maplibre.org/maplibre-gl-js/docs/API/" target="_blank">https://maplibre.org/maplibre-gl-js/docs/API/</a>
1212
- ECharts API:<a href="https://echarts.apache.org/api.html#echarts" target="_blank">https://echarts.apache.org/api.html#echarts</a>
1313
- MapV API:<a href="https://github.com/huiyan-fe/mapv/blob/master/API.md" target="_blank">https://github.com/huiyan-fe/mapv/blob/master/API.md</a>

build/jsdocs/openlayers/docs.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"src/common/iServer/ProcessingServiceBase",
3636
"src/common/iServer/PointWithMeasure",
3737
"src/common/iServer/ServerTheme",
38+
"src/common/iServer/QueryService",
3839
"src/common/overlay/RankSymbol",
3940
"src/common/overlay/Graph",
4041
"src/common/overlay/ThemeVector",
@@ -62,7 +63,8 @@
6263
"src/common/components/templates/PopContainer",
6364
"src/common/components/templates/Select",
6465
"src/common/security/KeyServiceParameter",
65-
"src/common/components/templates/TemplateBase"
66+
"src/common/components/templates/TemplateBase",
67+
"src/common/mapping"
6668
]
6769
},
6870
"plugins": ["plugins/markdown","../plugins/usage", "../plugins/moduleCategories"],

build/jsdocs/template/static/scripts/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$(function () {
22
$('.navigationDiv').load("nav.html .main-sidebar", null, function () {
33
var height = $('.sidebar').height();
4-
$('.main-sidebar #categories').css('height', height - 50 + 'px');
4+
$('.main-sidebar #categories').css('height', height - 125 + 'px');
55
// Search Items
66
$('#searchBox').on('keyup', function (e) {
77

@@ -101,6 +101,6 @@ $(function () {
101101
});
102102
$(window).resize(function () {
103103
var height = $('.navigationDiv .sidebar').height();
104-
$('.main-sidebar #categories').css('height', height - 50 + 'px');
104+
$('.main-sidebar #categories').css('height', height - 125 + 'px');
105105
})
106106
});

build/jsdocs/template/typeLinkExt.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var olapi = "https://openlayers.org/en/v6.14.1/apidoc/";
22
var lfapi = "https://leafletjs.com/reference.html";
33
var mbglapi = "https://www.mapbox.com/mapbox-gl-js/api/";
4-
var mlbglapi = "https://maplibre.org/maplibre-gl-js-docs/api/";
4+
var mlbglapi = "https://maplibre.org/maplibre-gl-js/docs/API/";
55
var mapv = "https://github.com/huiyan-fe/mapv/blob/master/src/";
66
var classicapi="https://iclient.supermap.io/web/libs/iclient8c/apidoc/files/SuperMap"
77
var geojsonapi = "https://geojson.org";
@@ -84,9 +84,9 @@ var typeLinks = {
8484
"mapboxgl.source": 'https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#geojson',
8585

8686
//maplibregl
87-
"maplibregl.Map": mlbglapi + '#map',
88-
"maplibregl.Evented": mlbglapi + '#Evented',
89-
"maplibregl.LngLatBounds": mlbglapi + '#lnglatbounds',
87+
"maplibregl.Map": mlbglapi + 'classes/Map/',
88+
"maplibregl.Evented": mlbglapi + 'classes/Evented/',
89+
"maplibregl.LngLatBounds": mlbglapi + 'classes/LngLatBounds/',
9090

9191
//mapv
9292
"Mapv.DataSet": mapv + 'data/DataSet.md',
@@ -105,6 +105,7 @@ var typeLinks = {
105105
"GeoJSONObject": geojsonapi,
106106
"GeoJSONGeometry": geometryapi +'#section-3.1',
107107
"GeoJSONFeature": geometryapi + '#section-3.2',
108+
"FeatureCollection": geometryapi + '#section-3.3',
108109
// WebMap 结构
109110
"WebMapSummaryObject": helpDocApi + '#iP/Appendix/WebMap/WebMapSummary.htm',
110111
"FlatGeobuf": 'https://github.com/flatgeobuf/flatgeobuf',

build/webpack.config.base.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ const pkg = require('../package.json');
77

88
function compareDependencies(pkgName, dependenciesToCompare, rootDependencies = pkg.dependencies) {
99
Object.keys(dependenciesToCompare).forEach(name => {
10-
if (!rootDependencies[name] || rootDependencies[name] !== dependenciesToCompare[name]) {
10+
if(!rootDependencies[name]){
11+
console.log(chalk.red(`Dependency error [${pkgName}]: The dependency ${name} not in root package.json!\n`));
12+
}
13+
if (rootDependencies[name] !== dependenciesToCompare[name]) {
1114
if (rootDependencies[name].includes('file:src/')){
1215
return;
1316
}
14-
console.log(chalk.red(`ERROR [${pkgName}]: The dependency ${name} version can not match in root package.json!\n`));
17+
console.log(chalk.red(`Dependency error [${pkgName}]: The dependency ${name} version can not match in root package.json!\n`));
1518
}
1619
});
1720
}
@@ -24,7 +27,7 @@ function checkRootDependencies(dependenciesToCompare, rootDependencies = pkg.dep
2427
return;
2528
}
2629
if (!clientDepsList.some(deps => Object.keys(deps).some(item => item === name))) {
27-
console.log(chalk.red(`ERROR: The dependency ${name} version can not match in (${clientNames.join('|')}) package.json!\n`));
30+
console.log(chalk.red(`Dependency error: The dependency ${name} version can not match in (${clientNames.join('|')}) package.json!\n`));
2831
}
2932
});
3033
}

build/webpack.config.classic.js

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ module.exports = {
2020
resolve: configBase.resolve,
2121
externals: Object.assign({}, configBase.externals, {
2222
'xlsx': "function(){try{return XLSX}catch(e){return {}}}()",
23-
'canvg': "function(){try{return canvg}catch(e){return {}}}()",
2423
'jsonsql': "function(){try{return jsonsql}catch(e){return {}}}()",
2524
'xml-js': "function(){try{return convert}catch(e){return {}}}()"
2625
}),

build/webpack.config.mapboxgl.js

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module.exports = {
3232
'luma.gl': '(function(){try{return luma}catch(e){return {}}})()',
3333
'webgl-debug': '(function(){try{return webgl-debug}catch(e){return {}}})()',
3434
xlsx: 'function(){try{return XLSX}catch(e){return {}}}()',
35-
canvg: 'function(){try{return canvg}catch(e){return {}}}()',
3635
'@turf/turf': 'function(){try{return turf}catch(e){return {}}}()',
3736
jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()',
3837
'./L7/l7-render': 'function(){try{return L7}catch(e){return {}}}()',

build/webpack.config.maplibregl.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ module.exports = {
1010
target: configBase.target,
1111
mode: configBase.mode,
1212
//页面入口文件配置
13-
entry: [...configBase.entry, `${__dirname}/../src/maplibregl/namespace.js`],
13+
entry: [
14+
...configBase.entry,
15+
`${__dirname}/../src/maplibregl/namespace.js`,
16+
`${__dirname}/../src/maplibregl/css/index.js`
17+
],
1418
//入口文件输出配置
1519
output: configBase.output(libName, productName),
1620
//是否启用压缩
@@ -27,10 +31,10 @@ module.exports = {
2731
'webgl-debug': '(function(){try{return webgl-debug}catch(e){return {}}})()',
2832
'luma.gl': '(function(){try{return luma}catch(e){return {}}})()',
2933
xlsx: 'function(){try{return XLSX}catch(e){return {}}}()',
30-
canvg: 'function(){try{return canvg}catch(e){return {}}}()',
3134
jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()',
3235
'xml-js': 'function(){try{return convert}catch(e){return {}}}()',
33-
'./L7/l7-render': 'function(){try{return L7}catch(e){return {}}}()'
36+
'./L7/l7-render': 'function(){try{return L7}catch(e){return {}}}()',
37+
'@antv/g2': 'function(){try{return G2}catch(e){return {}}}()'
3438
}),
3539

3640
module: {

build/webpack.config.openlayers.js

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
var configBase = require('./webpack.config.base');
2+
var fs = require('fs');
3+
const chalk = require('chalk');
4+
const minimist = require('minimist');
25
//端名
36
var libName = 'openlayers';
47
//产品包名
58
var productName = 'iclient-openlayers';
69

7-
var argv = JSON.parse(process.env['npm_config_argv']);
8-
var origin = argv.original;
9-
10-
if (origin && origin.includes('deploy-ol')) {
10+
const args = minimist(process.argv.slice(2));
11+
if (
12+
args._.includes('deploy-ol') ||
13+
(process.env.npm_lifecycle_event?process.env.npm_lifecycle_event.includes('deploy-ol'):false)
14+
) {
1115
libName = 'ol';
1216
productName = 'iclient-ol';
1317
}
18+
1419
var externals = [
1520
Object.assign({}, configBase.externals, {
1621
'@turf/turf': 'function(){try{return turf}catch(e){return {}}}()',
@@ -20,7 +25,6 @@ var externals = [
2025
'luma.gl': '(function(){try{return luma}catch(e){return {}}})()',
2126
'webgl-debug': '(function(){try{return webgl-debug}catch(e){return {}}})()',
2227
xlsx: 'function(){try{return XLSX}catch(e){return {}}}()',
23-
canvg: 'function(){try{return canvg}catch(e){return {}}}()',
2428
jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()',
2529
three: 'function(){try{return THREE}catch(e){return {}}}()'
2630
}),
@@ -32,6 +36,23 @@ var externals = [
3236
}
3337
];
3438

39+
var methodNames = ['bindFeaturesCollection_', 'addFeaturesInternal'];
40+
checkPrivateMethodExists(methodNames);
41+
42+
function checkPrivateMethodExists(methodNames) {
43+
const file_path = 'node_modules/ol/dist/ol.js';
44+
try {
45+
const data = fs.readFileSync(file_path, 'utf8');
46+
methodNames.forEach((methodName) => {
47+
if (!data.includes(methodName)) {
48+
console.log(chalk.red(`方法 ${methodName} 不存在于混淆后的 ol 中 ${file_path},测试 ol fgb 重写方法是否被调用`));
49+
}
50+
});
51+
} catch (err) {
52+
console.error('读取文件出错:', err);
53+
}
54+
}
55+
3556
module.exports = {
3657
target: configBase.target,
3758
mode: configBase.mode,

0 commit comments

Comments
 (0)