Skip to content

Commit 0d1e413

Browse files
committed
【feature】webmap 支持 l7layers
1 parent 87ce32c commit 0d1e413

9 files changed

Lines changed: 3810 additions & 662 deletions

File tree

build/webpack.config.mapboxgl.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ const libName = 'mapboxgl';
44
//产品包名
55
const productName = 'iclient-mapboxgl';
66
//复制文件
7-
const CopyPlugin = require("copy-webpack-plugin");
7+
const CopyPlugin = require('copy-webpack-plugin');
88

99
module.exports = {
1010
target: configBase.target,
1111
mode: configBase.mode,
1212
//页面入口文件配置
13-
entry: [...configBase.entry, `${__dirname}/../src/mapboxgl/namespace.js`, `${__dirname}/../src/mapboxgl/css/index.js`],
13+
entry: [
14+
...configBase.entry,
15+
`${__dirname}/../src/mapboxgl/namespace.js`,
16+
`${__dirname}/../src/mapboxgl/css/index.js`
17+
],
1418
//入口文件输出配置
1519
output: configBase.output(libName, productName),
1620
//是否启用压缩
@@ -29,9 +33,10 @@ module.exports = {
2933
'webgl-debug': '(function(){try{return webgl-debug}catch(e){return {}}})()',
3034
xlsx: 'function(){try{return XLSX}catch(e){return {}}}()',
3135
canvg: 'function(){try{return canvg}catch(e){return {}}}()',
32-
'@turf/turf': "function(){try{return turf}catch(e){return {}}}()",
36+
'@turf/turf': 'function(){try{return turf}catch(e){return {}}}()',
3337
jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()',
34-
'./L7/l7-render': 'function(){try{return L7}catch(e){return {}}}()'
38+
'./L7/l7-render': 'function(){try{return L7}catch(e){return {}}}()',
39+
'@antv/g2': 'function(){try{return G2}catch(e){return {}}}()'
3540
})
3641
],
3742

@@ -60,8 +65,8 @@ module.exports = {
6065
]
6166
]
6267
}
63-
}
64-
configBase.moduleVersion === "es6" && (babelConfig.include = /FGBLayer|flatgeobuf/);
68+
};
69+
configBase.moduleVersion === 'es6' && (babelConfig.include = /FGBLayer|flatgeobuf/);
6570
moduleRules.push(babelConfig);
6671
moduleRules.push(configBase.module.rules.css);
6772
return moduleRules;

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,16 @@
129129
"webpack-node-externals": "^2.5.2"
130130
},
131131
"dependencies": {
132+
"@antv/g2": "^4.2.11",
132133
"@antv/g6": "^4.8.14",
133134
"@elastic/elasticsearch": "^5.6.22",
135+
"@mapbox/mapbox-gl-style-spec": "^14.3.0",
134136
"@mapbox/vector-tile": "1.3.1",
135137
"@sinonjs/text-encoding": "^0.7.2",
136138
"@supermap/iclient-common": "file:src/common",
137139
"@supermap/tile-decryptor": "^0.0.2",
138140
"@tensorflow/tfjs": "^3.9.0",
141+
"@turf/center": "^6.5.0",
139142
"@turf/turf": "6.5.0",
140143
"canvg": "3.0.10",
141144
"core-js": "^3.30.2",

0 commit comments

Comments
 (0)