Thursday 2 May 2019

overlay - Display millions of points in the browser


I have a web application which will track he movement of user, and save the history location to database.


And user may want to see his/her movement trace over a period of time, we have to display them in the browser(contain IE6).



Generally we can use the overlay API like Polyline in Google Map or Leaflet JS, however it is unacceptable for our use case since there maybe too many points for a time.


Now the user will upload their location every 60 seconds, and suppose they just upload 10 hours one day, then there will be 10 * 24 * 60 = 14400 records per user one day.


So how about user trying to check the trace for yesterday or even last month? Technologically we prefer to load just a part of the data and then load more ,but user like to see All of the trace.


That's means we can not draw the points in the client, I have though to simplify the points before returned to the client, but this can not make sure the number of the points to an acceptable level, so I wonder if someone have the similar experience for this kind of situation?



Answer



The answer to this kind of issue should be to rasterize the information on to tiles on the server and simply serve the user tiles of the routes that they want to see.


There are a plethora of options for doing this, but I think this train of thought is the best solution.


Render the desired view on the server and only pass the tiles to the user, wash and repeat as necessary. You could also add in some limited vector data to give the appearance of interactive.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...