尝试导入错误:未从'react-leaflet'导出'MapControl' [英] Attempted import error: 'MapControl' is not exported from 'react-leaflet'

查看:170
本文介绍了尝试导入错误:未从'react-leaflet'导出'MapControl'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用react-leaflet-draw,但我继续收到此错误:

I tried using react-leaflet-draw and I keep on getting this error:

./node_modules/react-leaflet-draw/dist/esm/EditControl.js
Attempted import error: 'MapControl' is not exported from 'react-leaflet'.

我只是在这里使用示例: https://www.npmjs.com/包/反应传单图纸

I just used the examples here: https://www.npmjs.com/package/react-leaflet-draw

推荐答案

这是因为 MapControl 不再是 react-leaflet lib 的一部分 (

it is because MapControl is not part of react-leaflet lib anymore (https://react-leaflet-v2-docs.netlify.app/docs/en/components). Could you figure out its new name? Interested here!

这篇关于尝试导入错误:未从'react-leaflet'导出'MapControl'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆