On Wed, 2007-08-01 at 00:38 +0200, Andreas Hocevar wrote: > Markus, > > so you do not refresh your model when you redraw the positions, you > just load a different time frame from your model, right? Not at the moment. What I did until now is to process the array with the setTimeout function and setting the points visible on different positions. > > > I saw in the code, that you did the update to OL and therefore I would > > ask you, how should I simulate such a motion process: you should be > > aware that at least every 200ms the bus has to change his position. I > > was taking a look to the API of openlayers. Should I use the Object > > Openlayers.Geometry.Point that has even a move method? > > It is better to use a Markers layer. I would recommend creating a > widget for your model, which keeps a reference to all markers you add > to a marker layer. by some kind of feature id. To move a marker, you > calculate its pixel position (OpenLayers.getPixelFromLonLat IIRC), and > use the marker's moveTo method to move it to the new location. This > way it should be possible to move many markers without flicker. Ok good, This evening I have to check the documentation. Then I will start to implement my first widget.
> > The widget you create for that is probably not an extension to > GmlRendererOL, but a separate (yet simple) widget. Additionaly, you > would need a tool that maybe sets a xpath pointer to the data for the > next time frame to be displayed. This pointer can be passed as param > to the model, which could trigger a method in your widget that > modifies the marker positions accordingly. Do you mean to save repeating location values, or probably I missunderstood you. cheers Markus ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
