Skip to content

Commit 16b6ee8

Browse files
committed
Revert "feat:升级flatgeobuf到4.6.0,支持含M值的fgb解析"
This reverts commit 075c7b1.
1 parent 2486455 commit 16b6ee8

12 files changed

Lines changed: 11 additions & 80 deletions

File tree

‎build/webpack.config.base.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const webpack = require('webpack');
2-
const path = require('path');
32
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
43
const ESLintPlugin = require('eslint-webpack-plugin');
54
const LintExportWebpackPlugin = require('./lint-export-webpack-plugin');
@@ -83,11 +82,7 @@ module.exports = {
8382

8483
//其它解决方案配置
8584
resolve: {
86-
extensions: ['.js', '.json', '.css'],
87-
// flatgeobuf 依赖的 @bokuweb/zstd-wasm 默认入口是 node 构建(依赖 fs/path),浏览器包需指向 web 构建
88-
alias: {
89-
'@bokuweb/zstd-wasm$': path.resolve(__dirname, '../node_modules/@bokuweb/zstd-wasm/dist/web/index.web.js')
90-
}
85+
extensions: ['.js', '.json', '.css']
9186
},
9287

9388
externals: {

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"fast-xml-parser": "5.5.9",
158158
"fetch-ie8": "1.5.0",
159159
"fetch-jsonp": "1.1.3",
160-
"flatgeobuf": "4.6.0",
160+
"flatgeobuf": "3.31.1",
161161
"flv.js": "^1.6.2",
162162
"insert-css": "^2.0.0",
163163
"jsonsql": "0.2.5",

‎src/common/overlay/fgb/FGBLayerRenderer.js‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,9 @@ export class FGBLayerRenderer {
8585
rect.value = { extent: bounds.slice() };
8686
this.loadedExtentsRtree_.insert(rect);
8787
}
88-
89-
return await deserialize((fgbStream && fgbStream.body) || this.url, {
90-
rect,
91-
headerMetaFn: (headerMeta) => {
92-
this.layerType = GEOMETRY_TYPE_MAP[headerMeta.geometryType];
93-
}
88+
89+
return await deserialize((fgbStream && fgbStream.body) || this.url, rect, (headerMeta) => {
90+
this.layerType = GEOMETRY_TYPE_MAP[headerMeta.geometryType];
9491
});
9592
}
9693

‎src/common/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"fast-xml-parser": "5.5.9",
2626
"fetch-ie8": "1.5.0",
2727
"fetch-jsonp": "1.1.3",
28-
"flatgeobuf": "4.6.0",
28+
"flatgeobuf": "3.31.1",
2929
"insert-css": "^2.0.0",
3030
"lodash.debounce": "^4.0.8",
3131
"lodash.difference": "^4.5.0",

‎src/leaflet/overlay/FGBLayer.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export var FGBLayer = L.FeatureGroup.extend({
114114
this.loadedExtentsRtree_.insert(rect);
115115
}
116116

117-
const fgb = deserialize((fgbStream && fgbStream.body) || this.url, { rect });
117+
const fgb = deserialize((fgbStream && fgbStream.body) || this.url, rect);
118118
if (!this._validatedId) {
119119
this.curLayer = L.geoJSON(null, this.options);
120120
this.previousLayer && this.removeLayer(this.previousLayer);

‎src/leaflet/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@mapbox/vector-tile": "1.3.1",
2424
"jsonsql": "0.2.5",
2525
"pbf": "3.2.1",
26-
"flatgeobuf": "4.6.0",
26+
"flatgeobuf": "3.31.1",
2727
"proj4": "2.17.0",
2828
"rbush": "^2.0.2"
2929
}

‎src/openlayers/overlay/FGB.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class FGB extends VectorSource {
116116
maxY: extent[3]
117117
};
118118
}
119-
const fgb = deserialize(url, Object.keys(rect).length ? { rect } : {});
119+
const fgb = deserialize(url, rect);
120120
let featureList = [];
121121
const throttleFn = throttle(() => {
122122
this.addFeatures(featureList);

‎src/openlayers/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"lodash.clonedeep": "^4.5.0",
2525
"lodash.remove": "^4.7.0",
2626
"lodash.difference": "^4.5.0",
27-
"flatgeobuf": "4.6.0",
27+
"flatgeobuf": "3.31.1",
2828
"proj4": "2.17.0"
2929
}
3030
}

‎test/common/overlay/fgb/FGBLayerRendererSpec.js‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎test/helpers/babel-plugin-zstd-import-meta.js‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)