Changeset 154

Show
Ignore:
Timestamp:
03/06/07 10:22:20 (2 years ago)
Author:
migurski
Message:

Stopped destroying the locations array when consuming it

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/as2/lib/com/modestmaps/geo/Map.as

    r143 r154  
    165165        var coordinates:/*Coordinate*/Array = []; 
    166166         
    167         while(locations.length
    168             coordinates.push(mapProvider.locationCoordinate(Location(locations.pop()))); 
    169      
     167        for(var i:Number = 0; i < locations.length; i += 1
     168            coordinates.unshift(mapProvider.locationCoordinate(locations[i])); 
     169 
    170170        // get outermost top left and bottom right coordinates to cover all locations 
    171171        var TL:Coordinate = new Coordinate(coordinates[0].row, coordinates[0].column, coordinates[0].zoom);