Changeset 2456
- Timestamp:
- 12/05/07 04:32:36 (13 months ago)
- Location:
- lang/actionscript/swfgmap/trunk/gyuque/gmap
- Files:
-
- 4 modified
-
IMeshMap.as (modified) (1 diff)
-
ViewportUpdater.as (modified) (1 diff)
-
googlemaps/GMapMapLayer.as (modified) (3 diffs)
-
googlemaps/GMapMapTile.as (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/swfgmap/trunk/gyuque/gmap/IMeshMap.as
r2452 r2456 3 3 public interface IMeshMap 4 4 { 5 function setTileOffset(ox:int, oy:int):void; 6 function loadTile(tx:int, ty:int) :void; 7 function unloadTile(tx:int, ty:int) :void; 5 function resetPanning(tx:int, ty:int) :void; 6 function setTileOffset(ox:int, oy:int) :void; 7 function loadTile(tx:int, ty:int) :void; 8 function unloadTile(tx:int, ty:int) :void; 8 9 } 9 10 } -
lang/actionscript/swfgmap/trunk/gyuque/gmap/ViewportUpdater.as
r2454 r2456 54 54 var tiledata:Object = GMapCalc.calcTileData(v.centerNX, v.centerNY, v.zoom, 0); 55 55 56 mListener.resetPanning(tiledata.tile_index.x, tiledata.tile_index.y); 56 57 mListener.setTileOffset(tiledata.offset.x, tiledata.offset.y); 57 58 -
lang/actionscript/swfgmap/trunk/gyuque/gmap/googlemaps/GMapMapLayer.as
r2454 r2456 10 10 { 11 11 protected var mVPobs:ViewportUpdater; 12 protected var mCenterTX:int; 13 protected var mCenterTY:int; 12 14 13 15 public function GMapMapLayer(eventSrc:EventDispatcher) … … 44 46 { 45 47 var tile:GMapMapTile = new GMapMapTile(tx, ty, GMapCalc.calcMapsZoomIndex(mViewport.zoom)); 46 47 addChild(tile); 48 tile.loadTile(); 49 // addChild(tile.loadTile()); 48 addChild(tile.loadTile()); 50 49 51 50 var c:int = GMapCalc.TILE_SIZE/2; 52 tile.x = -c; 53 tile.y = -c; 51 52 var otx:int = tx - mCenterTX; 53 var oty:int = ty - mCenterTY; 54 55 tile.x = -c + otx*GMapCalc.TILE_SIZE; 56 tile.y = -c + oty*GMapCalc.TILE_SIZE; 54 57 } 55 58 … … 57 60 { 58 61 } 62 63 public function resetPanning(tx:int, ty:int):void 64 { 65 mCenterTX = tx; 66 mCenterTY = ty; 67 } 59 68 } 60 69 } -
lang/actionscript/swfgmap/trunk/gyuque/gmap/googlemaps/GMapMapTile.as
r2454 r2456 3 3 import flash.display.*; 4 4 import flash.net.URLRequest; 5 6 import gyuque.gmap.*;7 5 8 6 public class GMapMapTile extends Loader … … 17 15 public function loadTile():Loader 18 16 { 19 GMapView(stage.getChildAt(0)).puts(mTileURL);20 17 var req:URLRequest = new URLRequest(mTileURL); 21 18 load(req);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)