我想动态创建一个react-leaflet对象。正常的leaflet对象可以工作,但react-leaflet不能。代码示例:https://codesandbox.io/s/show-problem-react-leaflet-marker-popup-object-hm0o8?file=/src/MapView.js 左键单击显示leaflet对象的所需行为,然后右键单击react-leaflet的问题。var lat =
我之所以选择这个插件,是因为它似乎是在地图折线上制作标记动画的最好方法。它不在npm上,所以我只是从存储库向AnimatedMarker.js添加了module.exports = L.animatedMarker并需要它。/AnimatedMarker')import L from 'leaflet'
}错误是:
Uncaug
这是我的另一个问题的更广义的版本:Remove Zoom control from map in react-leaflet。React-leaflet附带了一些控制地图的组件-即<ZoomControl />、<LayersControl />等。正如您在my other question中所看到的,我尝试创建了一个新的上下文对象,并使用它来为被替换的控件提供映射。这不管用,我也不知道为什么。例如,我创建了一个esri-leaflet's geose