Skip to content

Commit 964ee87

Browse files
新增支持 FGB 服务格式与三个端fgb图层 review by songym
1 parent 2b031a8 commit 964ee87

File tree

101 files changed

+342513
-338899
lines changed

Some content is hidden

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

101 files changed

+342513
-338899
lines changed

build/jsdocs/template/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@
387387
},
388388
"GraticuleLayer": {
389389
"name": "经纬网"
390+
},
391+
"FGB": {
392+
"name": "FGB"
390393
}
391394
}
392395
},

build/jsdocs/template/typeLinkExt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ var typeLinks = {
7979
"mapboxgl.LngLatBounds": mbglapi + '#lnglatbounds',
8080
"mapboxgl.LngLat": mbglapi + '#lnglat',
8181
"mapboxgl.Point": mbglapi + '#point',
82+
"mapboxgl.source": 'https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#geojson',
8283
//mapv
8384
"Mapv.DataSet": mapv + 'data/DataSet.md',
8485
"Mapv.BaiduMapLayer": mapv + 'map/baidu-map/Layer.md',

build/webpack.config.leaflet.js

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,28 @@ module.exports = {
3232
rules: (function () {
3333
let moduleRules = [];
3434
moduleRules.push(configBase.module.rules.img);
35-
if (configBase.moduleVersion === "es5") {
36-
//打包为es5相关配置
37-
moduleRules.push({
38-
test: [/\.js$/],
39-
exclude: /setImmediate|webgl-debug/,
40-
loader: 'babel-loader',
41-
options: {
42-
presets: ['@babel/preset-env']
43-
}
44-
});
45-
//兼容es3相关配置
46-
// moduleRules.push({
47-
// test: /\.js$/,
48-
// enforce: "post",
49-
// loaders: ['es3ify-loader']
50-
// });
35+
const babelConfig = {
36+
test: [/\.js$/],
37+
exclude: /setImmediate|webgl-debug/,
38+
loader: 'babel-loader',
39+
options: {
40+
presets: ['@babel/preset-env'],
41+
plugins: [
42+
[
43+
'@babel/plugin-transform-runtime',
44+
{
45+
absoluteRuntime: false,
46+
corejs: false,
47+
helpers: false,
48+
regenerator: true,
49+
useESModules: false
50+
}
51+
]
52+
]
53+
}
5154
}
55+
configBase.moduleVersion === "es6" && (babelConfig.include = /FGBLayer|flatgeobuf/);
56+
moduleRules.push(babelConfig);
5257
moduleRules.push(configBase.module.rules.css);
5358
return moduleRules
5459
})()

build/webpack.config.mapboxgl.js

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,28 @@ module.exports = {
3636
rules: (function() {
3737
let moduleRules = [];
3838
moduleRules.push(configBase.module.rules.img);
39-
if (configBase.moduleVersion === 'es5') {
40-
//打包为es5相关配置
41-
moduleRules.push({
42-
test: [/\.js$/],
43-
exclude: /node_modules[\/\\]proj4|classic|webgl-debug/,
44-
loader: 'babel-loader',
45-
options: {
46-
presets: ['@babel/preset-env']
47-
}
48-
});
39+
const babelConfig = {
40+
test: [/\.js$/],
41+
exclude: /node_modules[\/\\]proj4|classic|webgl-debug/,
42+
loader: 'babel-loader',
43+
options: {
44+
presets: ['@babel/preset-env'],
45+
plugins: [
46+
[
47+
'@babel/plugin-transform-runtime',
48+
{
49+
absoluteRuntime: false,
50+
corejs: false,
51+
helpers: false,
52+
regenerator: true,
53+
useESModules: false
54+
}
55+
]
56+
]
57+
}
4958
}
59+
configBase.moduleVersion === "es6" && (babelConfig.include = /FGBLayer|flatgeobuf/);
60+
moduleRules.push(babelConfig);
5061
moduleRules.push(configBase.module.rules.css);
5162
return moduleRules;
5263
})()

build/webpack.config.openlayers.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ module.exports = {
4949
rules: (function() {
5050
let moduleRules = [];
5151
moduleRules.push(configBase.module.rules.img);
52-
if (configBase.moduleVersion === 'es5') {
53-
//打包为es5相关配置
54-
moduleRules.push({
55-
test: [/\.js$/],
52+
const babelConfig = {
53+
test: [/\.js$/],
5654
exclude: /classic | webgl-debug/,
5755
loader: 'babel-loader',
5856
options: {
@@ -70,8 +68,9 @@ module.exports = {
7068
]
7169
]
7270
}
73-
});
7471
}
72+
configBase.moduleVersion === "es6" && (babelConfig.include = /FGB|flatgeobuf/);
73+
moduleRules.push(babelConfig);
7574
moduleRules.push(configBase.module.rules.css);
7675
return moduleRules;
7776
})()

0 commit comments

Comments
 (0)