Changeset 191

Show
Ignore:
Timestamp:
03/21/07 09:42:26 (2 years ago)
Author:
darren
Message:

added documentation to some MapProvider? classes

Files:

Legend:

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

    r189 r191  
    1 /* 
     1/** 
    22 * vim:et sts=4 sw=4 cindent: 
    33 * @ignore 
     
    88 * com.modestmaps.Map is the base class and interface for Modest Maps. 
    99 * 
    10  * Correctly attaching an instance of this MovieClip subclass should result 
    11  * in a pannable map. Controls and event handlers must be added separately. 
     10 * @description Map is the base class and interface for Modest Maps. 
     11 *                              Correctly attaching an instance of this MovieClip subclass  
     12 *                              should result in a pannable map. Controls and event  
     13 *                              handlers must be added separately. 
    1214 * 
    1315 * @usage <code> 
  • trunk/as2/lib/com/modestmaps/mapproviders/AbstractImageBasedMapProvider.as

    r177 r191  
     1/** 
     2 * vim:et sts=4 sw=4 cindent: 
     3 * @ignore 
     4 * 
     5 * @author darren 
     6 * @author migurski 
     7 * 
     8 * AbstractImageBasedMapProvider is the base class for all MapProviders 
     9 * that use externally loaded images to paint Tiles. 
     10 *  
     11 * @see com.modestmaps.mapproviders.AbstractMapProvider 
     12 */ 
     13  
    114import com.modestmaps.core.Coordinate; 
    215import com.modestmaps.io.MapProviderPaintThrottledRequest; 
    316import com.modestmaps.mapproviders.AbstractMapProvider; 
    417 
    5 /** 
    6  * @author darren 
    7  */ 
    818class com.modestmaps.mapproviders.AbstractImageBasedMapProvider  
    919extends AbstractMapProvider  
    1020{ 
    11          
    12         function AbstractImageBasedMapProvider() { 
     21        /** 
     22         * Abstract constructor, should not be instantiated directly. 
     23         */ 
     24        function AbstractImageBasedMapProvider()  
     25        { 
    1326                super(); 
    1427        } 
    1528 
     29        /** 
     30         * Generates a new MapProviderPaintThrottledRequest to load in an  
     31         * external image. 
     32         *  
     33         * @see com.modestmaps.mapproviders.AbstractMapProvider 
     34         * @param clip The MovieClip to contain the graphics. 
     35         * @param coord The coordinate of the Tile that contains the clip. 
     36 
     37         */ 
    1638        public function paint( clip : MovieClip, coord : Coordinate ) : Void  
    1739        { 
     
    3860        // Event Handlers 
    3961 
     62        /** 
     63         * Event handler for MapProviderPaintThrottledRequest.EVENT_REQUEST_ERROR 
     64         */ 
    4065        private function onRequestError( clip : MovieClip ) : Void 
    4166        { 
     
    4368        } 
    4469         
     70        /** 
     71         * Event handler for MapProviderPaintThrottledRequest.EVENT_RESPONSE_COMPLETE 
     72         */ 
    4573        private function onResponseComplete( clip : MovieClip, coordinate : Coordinate ) : Void 
    4674        { 
     
    4876        } 
    4977         
     78        /** 
     79         * Event handler for MapProviderPaintThrottledRequest.EVENT_RESPONSE_ERROR 
     80         */ 
    5081        private function onResponseError( clip : MovieClip, errorCode : String, httpStatus : Number ) : Void 
    5182        { 
  • trunk/as2/lib/com/modestmaps/mapproviders/AbstractMapProvider.as

    r179 r191  
     1/** 
     2 * vim:et sts=4 sw=4 cindent: 
     3 * @ignore 
     4 * 
     5 * @author darren 
     6 * @author migurski 
     7 * 
     8 * AbstractMapProvider is the base class for all MapProviders. 
     9 *  
     10 * @description AbstractMapProvider is the base class for all  
     11 *                              MapProviders. MapProviders are primarily responsible 
     12 *                              for "painting" map Tiles with the correct  
     13 *                              graphic imagery. 
     14 */ 
     15 
    116import org.casaframework.event.DispatchableInterface; 
    217import org.casaframework.event.EventDispatcher; 
     
    924import com.modestmaps.io.RequestThrottler; 
    1025 
    11 /** 
    12  * @author darren 
    13  */ 
    1426class com.modestmaps.mapproviders.AbstractMapProvider   
    1527extends EventDispatcher 
     
    2739 
    2840        /* 
    29          * Constructor
     41         * Abstract constructor, should not be instantiated directly
    3042         */ 
    3143        private function AbstractMapProvider() 
     
    4052        } 
    4153 
     54        /** 
     55         * Paints a map graphic onto the supplied MovieClip. 
     56         *  
     57         * @param clip The MovieClip to contain the graphics. 
     58         * @param coord The coordinate of the Tile that contains the clip. 
     59         */ 
    4260        public function paint( clip : MovieClip, coord : Coordinate ) : Void  
    4361        { 
     
    5371        } 
    5472 
     73        /** 
     74         * Generates a copy of the specified coordinate. 
     75         *  
     76         * @param coord The Coordinate to copy. 
     77         */ 
    5578    public function sourceCoordinate(coord:Coordinate):Coordinate 
    5679    { 
     
    7295    } 
    7396 
     97        /** 
     98         * Creates a text label for debugging purposes. 
     99         *  
     100         * @param clip The MovieClip to contain the label. 
     101         * @param label The text the label. 
     102         */ 
    74103        public function createLabel( clip : MovieClip, label : String ) : Void 
    75104        { 
     
    83112                tf.text = label;         
    84113        } 
    85          
    86         // Private Methods 
    87          
    88         private function raisePaintComplete( clip : MovieClip, coord : Coordinate ) : Void 
    89         { 
    90                 dispatchEvent( AbstractMapProvider.EVENT_PAINT_COMPLETE, clip, coord ); 
    91         } 
    92      
     114 
    93115   /* 
    94116    * Return projected and transformed coordinate for a location. 
     
    106128        return __projection.coordinateLocation(coordinate); 
    107129    } 
     130         
     131        // Private Methods 
     132         
     133        private function raisePaintComplete( clip : MovieClip, coord : Coordinate ) : Void 
     134        { 
     135                dispatchEvent( AbstractMapProvider.EVENT_PAINT_COMPLETE, clip, coord ); 
     136        } 
    108137} 
  • trunk/as2/lib/com/modestmaps/mapproviders/OpenStreetMapProvider.as

    r176 r191  
     1/** 
     2 * MapProvider for Open Street Map data. 
     3 *  
     4 * @author migurski 
     5 */ 
     6  
    17import org.casaframework.event.DispatchableInterface; 
    28 
     
    612import com.modestmaps.mapproviders.AbstractImageBasedMapProvider; 
    713import com.modestmaps.mapproviders.IMapProvider; 
    8  
    9 /** 
    10  * @author migurski 
    11  */ 
    1214 
    1315class com.modestmaps.mapproviders.OpenStreetMapProvider 
  • trunk/as2/lib/com/modestmaps/mapproviders/VanillaMapProvider.as

    r176 r191  
    11/** 
     2 * Provides the simplest possible graphic for a Tile, useful for debugging purposes. 
     3 *  
    24 * @author darren 
    35 */ 
     
    1517        public function paintTile( clip : MovieClip, coord : Coordinate ) : Void  
    1618        { 
    17                super.paint( clip, coord ); 
     19           super.paint( clip, coord ); 
    1820 
    1921                with ( clip ) 
     
    3234            createLabel( clip, coord.toString() ); 
    3335 
    34                 // TODO: Fire even when paint is done. 
     36                raisePaintComplete(); 
    3537        } 
    3638} 
  • trunk/LICENSE.txt

    r173 r191  
    11Copyright (c) 2007 
    22Michal Migurski (Stamen Design) 
    3 Darren David (Look||Feel) 
     3Darren David (Look or Feel) 
    44Shawn Allen (Stamen Design) 
    55 
     
    1717    documentation and/or other materials provided with the distribution. 
    1818 
    19     Neither the name of Stamen Design, Look||Feel, nor the names of its 
     19    Neither the name of Stamen Design, Look or Feel, nor the names of its 
    2020    contributors may be used to endorse or promote products derived from 
    2121    this software without specific prior written permission.