I have a leaflet map loading geoJSON data via a search input that queries an api. The data set contains 1300 rows and each row has a field that stores a geoJSON collection object.
My map search returns a few hundred results which are then pushed into a geoJSON feature collection, i then call map.fitBounds(geoMap.getBounds()); and the map zooms nicely to show the polygon areas from the search for geoJSON with the correct zoom level.
When the users moves or zooms the map out I need to load more of the adjacent geoJSON from the source data set.
Does leaflet.js have any in built functions to assist with this? Do I need to manually calculate the search results values and the search through the remaining data to get the 'nearest' adjacent?