by mmmelissa · 13y ago · 0 comments
I am developing a similar application with a map and live data generated dynamically by my server. The difference with my app, is that the data will be global, not for one city.
The Citi Bike Map appears to load all of the data available regardless of map extent, which can be practical with a small dataset.
How do you deal with caching when the extent of the user's map is constantly changing? My server currently returns data relevant to the map extent only. If I were to get Cron to regularly crunch out one big global cache to send to the browser, I would kill my site.
I am assuming the best option would be to figure out some sort of tiling scheme.
If anyone out there has any ideas about that, I am all ears!
Do you have any recommendations on how to create the tiles?
The most important thing, is that when a user clicks the markers in my map(whether or not they are real vector markers or rasters passing themselves off as markers), the marker's associated attribute values need to be available to be fed into a popup.
You need a way to do geospatial queries and likely clustering of the results. PostGIS will work well, and there are kmeans clustering plugins, or you can just do grid based clustering.
If so, that would lighten up the data being sent back from the server significantly.