-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
加载自定义marker图标会提示no img found for http://localhost:3000/images/icon.png #1027
Comments
感谢提issue,能否提供一个重现代码? |
你好。十分感谢你的回复。
出现问题的场景是这个样子的。
网页加载,第一次批量创建一百多个marker图标可以正常显示。第二次再批量创建18个图标就会出现部分图标无法显示。
地图中显示18个marker图标。有十七个能显示,一个不能显示。图片保存在本地路径,访问路径是正确的。
测试多次后发现规律是:页面加载后第一批次创建marker就可以正常显示,再第二批次创建marker则部分图标无法显示
下图为打印出marker对象
图标无法显示时控制台会提示no img found for ...
源码:
浏览器版本
Google Chrome
版本 78.0.3904.97(正式版本) (64 位)
…------------------ 原始邮件 ------------------
发件人: "Fu Zhen"<notifications@github.com>;
发送时间: 2019年11月13日(星期三) 晚上6:16
收件人: "maptalks/maptalks.js"<maptalks.js@noreply.github.com>;
抄送: "guard""<497823955@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [maptalks/maptalks.js] 加载自定义marker图标会提示no img found for http://localhost:3000/images/icon.png (#1027)
感谢提issue,能否提供一个重现代码?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
谢谢回复,请问能否用codepen写一个重现代码发给我? |
这个问题我也遇到了 ,定位到这个函数
|
感谢补充 @ryry886 |
@fuzhenn 抱歉 ,之前一直在忙项目,把这个事情给耽搁了。 今天闲下来,我重新梳理了一下,发现问题 出现在 之前的视角跳转,如果屏蔽掉这个动画,就不会出现找不到图片的问题。 |
这个问题应该和 #1129 的成因是相同的,已经解决。 |
maptalks's version and what browser you use?
version:v0.45.1
browser:Chrome
Issue description
加载自定义marker图标数组,部分图标会提示no img found for http://localhost:3000/images/icon.png,,结果无法显示部分marker图标。再加载一次又全部正常显示了
Please provide a reproduction URL (on any jsfiddle like site)
The text was updated successfully, but these errors were encountered: