Skip to content
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

The animation frame stop working when ZOOM the map #53

Open
xelaboy opened this issue Jun 11, 2020 · 5 comments
Open

The animation frame stop working when ZOOM the map #53

xelaboy opened this issue Jun 11, 2020 · 5 comments

Comments

@xelaboy
Copy link

xelaboy commented Jun 11, 2020

The animation frame stop working when ZOOM the map but if I move the map just a little bit the animation frame get back to the right place...

Please see file attached.

Does anyone here know how can I fix this please?

Thanks much in advance and best regards!

Selection_052

@JorinHakai
Copy link

Also looking for a solution to this problem. Data is rendering poorly when user interactions (pans, zooms) the map, with data ghosting, or being scaled incorrectly and mis-located.

@zs0120
Copy link

zs0120 commented Jan 3, 2025

也在寻找解决这个问题的方法。当用户交互(平移、缩放)地图时,数据呈现不佳,出现数据重影,或者缩放不正确和位置错误。
您好 现在您有解决这个问题吗 我也是 我用的数据标量也是这样 应该怎么处理

@matthieu-michou-wattandsea

The problem is that, as noted in #issue 40, the functions _clearAndRestart _clearWind do not work, but I couldn't find the solution.

So I manage to improve the rendering by altering the code like following :
in L.VelocityLayer.js > onDrawLayer: (L99 ), I modified the delay from 750 to 0
0); // showing velocity is delayed

in L.VelocityLayer.js > _initWindy: (L134 )
modify lines as follow :

   //this._map.on("dragstart", self._windy.stop);
    this._map.on("dragend", self._windy.stop);
    this._map.on("zoomstart", self._windy.stop);
    this._map.on("zoomend", self._windy.stop);
    this._map.on("resize", self._windy.stop);

and in windy.js > stop: , add the code so that it clears the layer in the stop() function (L556)
params.canvas.getContext("2d").clearRect(0,0,3e3,3e3)

note that I made this with a node-red integration of this module, so it might not work as it for you

I hope this will help !

Enregistrement.de.l.ecran.2025-01-04.a.09.59.04.mp4

@zs0120
Copy link

zs0120 commented Jan 6, 2025

问题是,如 #issue 40 中所述,函数_clearAndRestart _clearWind不起作用,但我找不到解决方案。

因此,我通过更改如下代码来改进渲染:在 onDrawLayer: (L99) L.VelocityLayer.js >,我将延迟从 750 修改为 0 0); // showing velocity is delayed

在 L.VelocityLayer.js > _initWindy 中:(L134 ) 按如下方式修改行:

   //this._map.on("dragstart", self._windy.stop);
    this._map.on("dragend", self._windy.stop);
    this._map.on("zoomstart", self._windy.stop);
    this._map.on("zoomend", self._windy.stop);
    this._map.on("resize", self._windy.stop);

windy.js > stop: 中,添加代码,以便清除 stop() 函数中的层 (L556) params.canvas.getContext("2d").clearRect(0,0,3e3,3e3)

请注意,我通过此模块的 Node-RED 集成实现了此目的,因此它可能不适用于您

我希望这会有所帮助!

Enregistrement.de.l.ecran.2025-01-04.a.09.59.04.mp4

我像这样修改是缩放拖动的时候会消失掉canvas 然后又重新展示 但是没有您那视频里面的快 会有一秒的停顿 没有您视频里面那么快 您知道我应该怎么做吗 谢谢

@zs0120
Copy link

zs0120 commented Jan 6, 2025

问题是,如 #issue 40 中所述,函数_clearAndRestart _clearWind不起作用,但我找不到解决方案。
因此,我通过更改如下代码来改进渲染:在 onDrawLayer: (L99) L.VelocityLayer.js >,我将延迟从 750 修改为 0 0); // showing velocity is delayed
在 L.VelocityLayer.js > _initWindy 中:(L134 ) 按如下方式修改行:

   //this._map.on("dragstart", self._windy.stop);
    this._map.on("dragend", self._windy.stop);
    this._map.on("zoomstart", self._windy.stop);
    this._map.on("zoomend", self._windy.stop);
    this._map.on("resize", self._windy.stop);

windy.js > stop: 中,添加代码,以便清除 stop() 函数中的层 (L556) params.canvas.getContext("2d").clearRect(0,0,3e3,3e3)
请注意,我通过此模块的 Node-RED 集成实现了此目的,因此它可能不适用于您
我希望这会有所帮助!
Enregistrement.de.l.ecran.2025-01-04.a.09.59.04.mp4

我像这样修改是缩放拖动的时候会消失掉canvas 然后又重新展示 但是没有您那视频里面的快 会有一秒的停顿 没有您视频里面那么快 您知道我应该怎么做吗 谢谢

Uploading 2025-01-06 093224.mp4…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants