I have thousands of markers - I need to cache them and use show-hide tactics to only show like 100 markers at once but I have trouble with caching.
Adding all single markers/points to an array and if map is dragged or zoomed, then loop through the array to see it has already been loaded and then load all new markers that are not in that array is rather expensive.
How should I solve this caching issue?
How to load only markers/points/coordinates that haven't been loaded yet?
Could I benefit from grid system? A.k.a load all markers on that part of grid and cache grid - this would keep the array of already loaded areas/points much shorter.