简体   繁体   中英

Disappearing data points in heatmap.js (leaflet plugin)

I'm using heatmap.js plugin for leaflet. 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?

In that case, you probably already request your points to your WFS using map.getBounds().toBBoxString() .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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