openwisp / openwisp-monitoring

Network monitoring system written in Python and Django, designed to be extensible, programmable, scalable and easy to use by end users: once the system is configured, monitoring checks, alerts and metric collection happens automatically.
https://openwisp.io/docs/dev/monitoring/
Other
165 stars 112 forks source link

[change] Copy points out of world map only when needed #531

Closed nemesifier closed 1 year ago

nemesifier commented 1 year ago

Follow up of #393 and #433.

We should trigger the copy of the points only when the view approaches the border of the map. That way we can avoid hitting the performance penalty if the number of points on the map is high and they get copied for no added benefit. That is, we hit the performance penalty only when needed.

We shall add an event listener for the "mouseend" event of leaflet.js. This function would check the current bounds (what region of map is showing right now). If this region is outside of the default world map, we could add more points.

There is a caveat though, the points would not appear while panning. Only when the panning stops.