We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I execute geobuf.decode, an error is reported:
The text was updated successfully, but these errors were encountered:
To decode geobuf with a "manual" fetch I use this:
import geobuf from "geobuf"; import Pbf from "pbf"; function getCompressedData(geobufFileUrl) { fetch(geobufFileUrl) .then((response) => response.arrayBuffer()) .then((buffer) => { const geoJsonData = geobuf.decode(new Pbf(buffer)); createMap(geoJsonData); }); }
Sorry, something went wrong.
I am facing the same issue when the code is minified with webpack. I suppose that this is the reason:
My workaround at the moment is to use the Terser webpack plugin to ignore geobuf when minifying the code:
npm i -D terser-webpack-plugin
// webpack.config.js module.exports = { optimization: { minimize: true, minimizer: [ new TerserPlugin({ exclude: /node_modules\/geobuf/ }) ], } }
No branches or pull requests
When I execute geobuf.decode, an error is reported:
The text was updated successfully, but these errors were encountered: