shpjs将.zip文件转成geoJson
创始人
2024-05-30 04:02:47

一、npm install shpjs

二、import shp from 'shpjs'

三、

async setLayerSource() {

const geoJsonData = await shp(dataUrl)

}

一直报错:是因为Buffer这个插件一直没找到

 Uncaught Error: nodebuffer is not supported by this browser

解决办法

npm install node-polyfill-webpack-plugin

vue.config.js

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')

module.exports = {

configureWebpack: (config) => {

config.plugins.push(new NodePolyfillPlugin())

}

}

相关内容

热门资讯

我市辐射监管工作经验获生态环境...   本报讯 (记者 程红兰)近日,生态环境部《生态环境工作简报》(第567期)专题刊发《六维深耕细治...
超2500万名婴幼儿及家庭领到... (来源:工人日报) 本报北京8月21日电(记者姜雨晴)今天,国新办举行“开局起步‘十五五’”系...
新华解码丨事关人民币买卖,这些... (来源:上观新闻)新华社北京8月21日电题:事关人民币买卖,这些监管要求有何考量新华社记者吴雨、任军...
Allspring股票投资主管... Allspring Global Investments的股票投资负责人Ann Miletti表示,...
全画幅镜头排行榜 婚庆纪实高可... 晨光掠过教堂彩窗,快门声在誓言落定的瞬间悄然响起;晚宴烛火摇曳,新人相视一笑的微表情需要0.3米近摄...