I want to create a heat map from the GPS log data. The process is as follows:
- I store log data in MySQL using Geospatial Indexing. A record consists of latitude / longitude data and a time stamp.
- The admin panel has a Google map, and the administrator can move and scale the map.
- Each time the map is scaled or shaded, the panel sends an AJAX request containing the boundary points of the map (north-east and south-west latitude / longitude).
- Using the MySQL geospatial function, I can query the entire record inside this boundary.
- I send the data of records that will be displayed by the Heatmap rendering library. (Right now I'm using Heatmap.js , a little bit buggy for Google Maps. Does anyone have a better suggestion?)
The problem is that my data is growing too large, so transferring data to the client and rendering the heat map is now becoming too slow. I think it would be nice to have script preprocessing for data aggregation, which would reduce the payload before sending it to the clientβs browser and lightening the rendering. I'm still new to this job, so is there an existing PHP library that can do this?
source share