Changeset 338
- Timestamp:
- 08/11/07 21:19:14 (1 year ago)
- Files:
-
- trunk/as3/lib/com/modestmaps/core/TileGrid.as (modified) (1 diff)
- trunk/as3/lib/com/modestmaps/Map.as (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/as3/lib/com/modestmaps/core/TileGrid.as
r337 r338 81 81 protected var _drawGridArea:Boolean = true; 82 82 83 public function init(width:Number, height:Number, draggable:Boolean, provider:IMapProvider, map:Map):void83 public function TileGrid(width:Number, height:Number, draggable:Boolean, provider:IMapProvider, map:Map) 84 84 { 85 85 if (!Reactor.running()) trunk/as3/lib/com/modestmaps/Map.as
r333 r338 17 17 * import com.modestmaps.geo.Location; 18 18 * import com.modestmaps.mapproviders.BlueMarbleMapProvider; 19 * import com.stamen.twisted.Reactor;20 19 * ... 21 * Reactor.run(clip, null, 50); 22 * var map:Map = Map(clip.attachMovie(Map.symbolName, 'map', clip.getNextHighestDepth())); 23 * map.init(640, 480, true, new BlueMarbleMapProvider()); 20 * var map:Map = new Map(640, 480, true, new BlueMarbleMapProvider()); 21 * addChild(map); 24 22 * </code> 25 23 */ … … 51 49 52 50 // pending animation steps, array of {type:'pan'/'zoom', amount:Point/Number, redraw:Boolean} 53 protected var __animSteps:Array ;51 protected var __animSteps:Array = []; 54 52 55 53 // associated animation call … … 81 79 /* 82 80 * Initialize the map: set properties, add a tile grid, draw it. 83 * This method must be called before the map can be used!84 81 * Default extent covers the entire globe, (+/-85, +/-180). 85 82 * … … 91 88 * @see com.modestmaps.core.TileGrid 92 89 */ 93 public function init(width:Number, height:Number, draggable:Boolean, provider:IMapProvider):void90 public function Map(width:Number, height:Number, draggable:Boolean, provider:IMapProvider) 94 91 { 95 92 if (!Reactor.running()) … … 108 105 } 109 106 110 111 __animSteps = new Array();112 113 107 setSize(width, height); 114 108 115 grid = new TileGrid(); 116 addChild(grid); // before init, so init can add mouse handlers to stage 117 grid.init(__width, __height, draggable, provider, this); 109 grid = new TileGrid(__width, __height, draggable, provider, this); 110 addChild(grid); 118 111 119 112 markerClip = new MarkerClip(this);
