【问题标题】:react-leaflet 1.x + create-react-app : 404 on marker imagereact-leaflet 1.x + create-react-app:标记图像上的404
【发布时间】:2016-10-28 08:11:55
【问题描述】:

我尝试将react-leaflet(版本 1.0.0-rc.2)与create-react-app 一起使用,但标记图像在 404 中。

生成的图片src为http://{server_host}:3000/static/media/marker-icon.2273e3d8.png")marker-icon.png

如果我把奇怪的")marker-icon.png去掉,图像就很好了。

我在阴影图像中遇到了同样的问题,但无法猜测“真实”图像 src。

您可以重现错误here并查看代码here

谢谢

【问题讨论】:

    标签: reactjs leaflet create-react-app react-leaflet


    【解决方案1】:

    看起来您遇到了 Leaflet bug #4849 的变体。升级到应修复的 Leaflet 1.0.1。

    【讨论】:

    • 传单已经在 1.0.1 中(参见yarn.lock 文件)
    • 那么您可能需要向react-leaflet 提交错误报告。
    • 可能与this issue有关。将此添加为“备忘录”,我会在 PR 合并时尝试
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-05-10
    • 1970-01-01
    • 2022-11-21
    • 2023-01-26
    • 2022-01-22
    • 2018-08-09
    • 2021-11-02
    相关资源
    最近更新 更多