On Thu, Aug 14, 2008 at 4:13 PM, David Calle <[EMAIL PROTECTED]> wrote: > Hi List, > > I need to use the example: > > http://www.openlayers.org/dev/examples/point-track-markers.html
That's one way to do it, the other one (with better performance) would be like in [2]. > For create a line for simulate a track of points... > But my data comes from postgres... any idea..?? You will need a server side component that creates either some XML (GeoRSS, GML) or GeoJSON from your data. Depending on how your coordinates are stored, you can use a WFS like GeoServer or MapServer and connect it to your postgres data. It might be worth to consider installing PostGIS for your postgres server and creating a geometry field from your coordinates. Then you will be able to use e.g. GeoServer with the vanilla PostGIS datastore, which can be configured with a few mouse clicks. On the client side, you will need a few changes depending on the format that you get from your server. In the case of [1], you will have a different source layer type than OpenLayers.Layer.GeoRSS (probably OpenLayers.Layer.GML). If you decide to do it like in [2], you will have to use a different format option for the GML layer. You will also have to change the read method in the formatOptions. For getting started, doing it like in [1] is probably simpler. But for performance, you should go for [2]. Regards, Andreas. [1] http://www.openlayers.org/dev/examples/point-track-markers.html [2] http://dev.openlayers.org/sandbox/ahocevar/playground/examples/point-track-vector.html _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
