I have the method getAddress() that take in input an array of cities.
For each city I use the Asyncronous method getLatLng() that return me
the coordinates and I save them in an ArrayList called
listaCoordinateCittaUtente.
But when I use the ArrayList after the call of the method getAddress()
it is empty.
I tried to resolve this problem with the Timer class but it isn't the
better solution.
How can I resolve this problem???

public void getAddress(String address[]){
      final int nCicli=address.length;

       for (int i = 0; i < nCicli; i++) {
         final String nomeCitta=address[i];
                 geocoder.getLatLng(nomeCitta, new LatLngCallback(){
         public void onFailure(){
                 Window.alert(nomeCitta + " non esiste");
         }
         public void onSuccess(LatLng point){
                 listaCoordinateCittaUtente.add(point);
                 map.addOverlay(new Marker(point));
                 map.setCenter(point);
         }
         });
        }
 }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to