It works pretty well. Thanks for your help Erik
> Your for loop schedules all of your callbacks to go off 250seconds from the
> time 'Timer.schedule()' is invoked. In order to make them go off
> sequentially, try scheduling each increment to run at Timer.schedule(250 *
> (arrayIndex +1)).
> I will put in my standard plug for the gwt-google-apis maps bindings that
> are compatible with GWT 1.5 athttp://code.google.com/p/gwt-google-apis.
> Go to the download page and select 'All downloads' then 'Search' to find the
> r290 release, which is the latest milestore for use with GWT 1.5.
> Regards,
> -Eric.
> On Fri, Jul 4, 2008 at 11:25 AM, Blaise <JdeambuleMor...@gmail.com> wrote:
> > Thanks for the help, now I understand the problem. However I am using
> > GWT to work with google maps. So I had to refer to the GWT Timer class
> > in order to wait between changes. I am still having a problem. Here is
> > my code:
> > public void onSuccess(Object result) {
> > LatLng[] latlng = (LatLng[])result;
> > points = new GLatLng[latlng.length];
> > gmap.clearOverlays();
> > for(int i = 0; i < points.length; i++) {
> > points[i] = new GLatLng(latlng[i].getLatitude(),
> > latlng[i].getLongitude());
> > }
> > marker = new GMarker(points[0]);
> > gmap.addOverlay(marker);
> > for(int i = 1; i < points.length; i++){
> > nextFrame(points[i]);
> > }
> > } // end onSuccess
> > private void nextFrame(final GLatLng point) {
> > Timer timer = new Timer() {
> > public void run() {
> > marker.setPoint(point);
> > }
> > };
> > timer.schedule(250);
> > } // end method nextFrame
> > I only see the marker at the first point. The marker waits for 250
> > milliseconds and then directly jumps to the last point instead of
> > moving to the next point and so on.
> > Anyone can explain why is this happening? And if possible points to a
> > possible solution using GWT?
> > Thank you in advance,
> > --Blaise
> --
> Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/