3

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?

2
  • 1
    The short answer is that you can't display millions of points in the browser (especially not IE6!) so you'll need to reduce the number somehow. It's unlikely that the user actually wants to see 14,400 records - they actually want to see where did I go yesterday. That becomes a useability/UX challenge rather than a technical challenge. Commented Nov 14, 2014 at 0:49
  • In fact, we both know that user will not have the patience to check each point(and I am suer there must be many points overlayed with the other), they just want to know their extent of their movement and display them in the map.That's to say we must draw something in the map.:(
    – giser
    Commented Nov 14, 2014 at 1:34

3 Answers 3

5

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.

5
  • 1
    rasterize the information on to tiles YES!! I have thought of this,when user choose the time, we fetch data from db and render to an image,then use the GroundOverlay to add it. But we have to render image dynamically for each request, I am not sure if this can feed the response time. Since we have never done this before, any example?
    – giser
    Commented Nov 14, 2014 at 1:46
  • In fact, I even thought use the heatmap but finally I found it is not the proper manner.
    – giser
    Commented Nov 14, 2014 at 1:48
  • wiki.openstreetmap.org/wiki/Mod_tile or tilestache.org both focus on render on the fly. Commented Nov 14, 2014 at 1:49
  • Also this is a good collection of the options, some of which will help you with feature data not just raster data. giscollective.org/tutorials/web-mapping/wmsseven Commented Nov 14, 2014 at 1:51
  • 1
    If the data must be rendered dynamically (i.e. not static tiles), I would recommend using some kind of WMS server (GeoServer, MapServer, ArcGIS, ...). If performance is not good enough, you should consider whether you really must store all points, or that maybe a (simplified) line will do.
    – Berend
    Commented Nov 14, 2014 at 8:37
0

Can you just generalize the points? All points within x location of y show as x1. Most of the time we are generally slothlike so 99% of points can be glumped (I just made up that word) into 1 point as a center point (this is just noise generally). Then once you zoom in past a certain scale then hey presto more appear. Generalization for the static time with point pyramids.

0

but user like to see All of the trace.

User would like to see the map for the entire world. Therefore, for Google Maps/OSM to be able to show user the entire world, it has to download the entire map for the entire world.

This is patently false.

What you need is to allow the user to browse and filter through their traces. You can start by showing user his movements over a large time span, say you show the user's location over an entire year on in the whole world, you only need to show points that moves between different countries or cities. You will need to have the server aggregate the points based on distance and time. But as they zoom in into narrower timespans or into a more specific area, the application can load more specific data and show more details about the movements.

The typical screen only have 1024*768 = 786432 pixels on screen. If you have to load more data points than that then you're doing something seriously wrong. A typical user probably can only work reasonably with about 100 data points at a time (even that is starting to get too cluttered). If you cannot aggregate your data so that only that amount of data is shown, you need to rehaul your UI.

This is a UX question, not a GIS question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.