简体   繁体   English

在heatmap.js中消失的数据点(传单插件)

[英]Disappearing data points in heatmap.js (leaflet plugin)

I'm using heatmap.js plugin for leaflet. 我正在使用heatmap.js插件制作传单。 My map contains many heatmap data points, thus when I zoom in the map some of them are disappearing (because only those in map range are loaded), so zoomed map has always transparent/blue border. 我的地图包含许多热图数据点,因此当我放大地图时,其中的一些点正在消失(因为仅加载了地图范围内的那些点),因此缩放后的地图始终具有透明/蓝色边框。

Is there any way to present interpolation of points that are near outside the map? 有什么方法可以显示地图外的点的插值吗? Maybe it is possible to load points with some 'margin'. 也许可以用一些“保证金”加载点。

I checked the documentation and could not find anything. 我检查了文档,找不到任何东西。

If I understand correctly, you have some WFS that loads only points in viewport, and you are looking for a way to restore the heatmap on viewport borders, possibly using some padding (margin) of the view port to load more points? 如果我理解正确,您有一些WFS仅在视口中加载点,并且您正在寻找一种在视口边界上还原热图的方法,可能使用视口的某些填充(边距)来加载更多点?

In that case, you probably already request your points to your WFS using map.getBounds().toBBoxString() . 在这种情况下,您可能已经使用map.getBounds().toBBoxString()请求指向WFS的点。

You would just need to apply some padding before the bounding box conversion to string: map.getBounds().pad(0.5).toBBoxString() would increase the box by 50% on each side. 您只需要在将边界框转换为字符串之前应用一些填充即可: map.getBounds().pad(0.5).toBBoxString()会使框的每一侧增加50%。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM