问题描述
我尝试使用react-leaflet-draw,并且继续出现此错误:
./node_modules/react-leaflet-draw/dist/esm/EditControl.js
Attempted import error: 'MapControl' is not exported from 'react-leaflet'.
我只是在这里使用示例:https://www.npmjs.com/package/react-leaflet-draw
解决方法
这是因为 MapControl 不再是 react-leaflet 库的一部分 (https://react-leaflet-v2-docs.netlify.app/docs/en/components)。你能想出它的新名字吗?对这里感兴趣!