How to load POI based on map movements?

المشرف العام

Administrator
طاقم الإدارة
I'm currently creating a new website based on geo-localised informations, which is quite new to me.I need to display my points of interest according to where the map is, and where the user make it move.I know I can use the Haversine formula to find POIs around the map's center for the first load.

Now, when the user moves the map to the side, how should I proceed? I though I could just trigger an AJAX load to fetch the POI around the new center, but this would not take into account the already loaded POI, so I'd need to clear the map before adding the new corresponding POI.

I think it'd be better if I can only load the missing POI, as it would probably be more efficient on zoom out.

What is considered best practice in GIS to load data on the fly? What is more memory-efficient?

Also, how can I load POI for the area covered by the screen, but load 20 by 20 to show progressively that informations are being fetched?

I'm using leaflet to display data on map, but I don't know if the number of information displayed as markers take more memory when they are grouped in a cluster.

Thanks for your help.



أكثر...
 
أعلى