当前位置: 首页 > Web前端 > vue.js

leaflet加载kml文件

时间:2023-04-01 11:56:01 vue.js

需要在html中引入依赖包导入/el-upload>parseKml(file){letresult=window.URL.createObjectURL(file)omnivore.kml(result).addTo(this.map)//这是我的地图主体},onBeforeUploadImage(file){if(file.name.endsWith('kml')){this.parseKml(file)返回}},