Animated Layer/Object ie:Moving car

Jun 11, 2010 at 11:55 PM

I can't seem to find much on this but I figured I would ask anyways jsut in case I'm missing something.

I would like to have animation in sharpmap.  Kinda like showing a car moving by updating it's GPS coords.  I'm working on a desktop and a web app.  It's pretty easy if somewhat annoying to do this on the desktop by simply creating an updated datasource for the 'car' layer and updating the point of the car.  Online though I don't want to have to refresh the page every second as that could cause some bandwidth issues.  I thought of an extremely hacked way around this but it's not very good.  Basically I don't need to know that cars new GPS every second (and might not get it every second) but I do know it's direction and speed and can update it by time without referring to a DB as often.

Any thoughts?

Jun 13, 2010 at 9:01 AM

Hi atrius, for the desktop you can use a GeometryProvider and just update the geometry. For the web use OpenLayers as a client, SharpMap as a wms server and put the car on a VectorLayer (OpenLayers.Layer.Vector) , you can then query the server for just the car - return the data as JSON and update the VectorLayer accordingly.. hth jd