我正在尝试让codesandbox以与参考codesandbox相同的方式工作。原件在这里。
https://codesandbox.io/s/react-leaflet-map-with-marker-forked-qd91w
它在浏览器中间渲染了一个可爱的地图。
而是我自己的(它有一个组件的克隆和几乎相同的依赖项)
https://codesandbox.io/s/react-leaflet-ihh5t
它是完全分散的。
发布于 2020-08-19 22:25:03
您缺少leaflet css文件。将https://unpkg.com/leaflet@1.6.0/dist/leaflet.css添加到左侧Dependencies部分下的External resources部分。
https://stackoverflow.com/questions/63488966
复制相似问题