Show
Ignore:
Timestamp:
12/05/07 04:32:36 (13 months ago)
Author:
gyuque
Message:

lang/actionscript/swfgmap

Location:
lang/actionscript/swfgmap/trunk/gyuque/gmap
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/swfgmap/trunk/gyuque/gmap/IMeshMap.as

    r2452 r2456  
    33        public interface IMeshMap 
    44        { 
    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; 
    89        } 
    910} 
  • lang/actionscript/swfgmap/trunk/gyuque/gmap/ViewportUpdater.as

    r2454 r2456  
    5454                        var tiledata:Object = GMapCalc.calcTileData(v.centerNX, v.centerNY, v.zoom, 0); 
    5555 
     56                        mListener.resetPanning(tiledata.tile_index.x, tiledata.tile_index.y); 
    5657                        mListener.setTileOffset(tiledata.offset.x, tiledata.offset.y); 
    5758                         
  • lang/actionscript/swfgmap/trunk/gyuque/gmap/googlemaps/GMapMapLayer.as

    r2454 r2456  
    1010        { 
    1111                protected var mVPobs:ViewportUpdater; 
     12                protected var mCenterTX:int; 
     13                protected var mCenterTY:int; 
    1214                 
    1315                public function GMapMapLayer(eventSrc:EventDispatcher) 
     
    4446                { 
    4547                        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()); 
    5049                                 
    5150                        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; 
    5457                } 
    5558                 
     
    5760                { 
    5861                } 
     62                 
     63                public function resetPanning(tx:int, ty:int):void 
     64                { 
     65                        mCenterTX = tx; 
     66                        mCenterTY = ty; 
     67                } 
    5968        } 
    6069} 
  • lang/actionscript/swfgmap/trunk/gyuque/gmap/googlemaps/GMapMapTile.as

    r2454 r2456  
    33        import flash.display.*; 
    44        import flash.net.URLRequest; 
    5          
    6         import gyuque.gmap.*; 
    75         
    86        public class GMapMapTile extends Loader 
     
    1715                public function loadTile():Loader 
    1816                { 
    19                 GMapView(stage.getChildAt(0)).puts(mTileURL); 
    2017                        var req:URLRequest = new URLRequest(mTileURL); 
    2118                        load(req);