[GIS] Using OpenLayers (with OpenStreetMaps) and PostGIS for rendering data acquired from GPS tracking device

geodjangogpsopenlayers-2postgis

I am researching and planning to acquire data from GPS device and store them in PostGIS database, then use geodjango to process/work them out and finally chart them on a map with OpenLayers.

Will these technologies be enough for my plan, since I don't want my maps?

I want to use OpenStreetMap and plot my points on an OpenLayers' vector layer.

I also want to implement real time tracking on a map, I'll query the PostGIS database in real-time using AJAX and then recreate objects on a map. I just cannot find any good examples to do this with OpenLayers. Can I use Jquery for this and combine it with OpenLayers since I'm good at using Jquery's AJAX methods.

I am still researching these technologies, but OpenLayers/geodjango/postGIS seems like a great combo for my needs. I found literature for almost everything that I'm interested in these 3, only that I lack the examples of real time charting and refreshing objects on OpenLayers' vector layer.

Best Answer

Check out the rotate features OpenLayers example.

Moving a features works in the same way but using move, e.g.:

var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
// create a point feature
var point = new OpenLayers.Geometry.Point(-110, 45);
pointFeature = new OpenLayers.Feature.Vector(point, null, style_blue);

map.addLayer(vectorLayer);
map.setCenter(new OpenLayers.LonLat(point.x, point.y), 5);
vectorLayer.addFeatures([pointFeature]);

// move the point one unit up and redraw            
window.setInterval(function() {
    pointFeature.geometry.move(0, map.getResolution() * 1);
    pointFeature.layer.drawFeature(pointFeature);
}, 100);