Changeset 166

Show
Ignore:
Timestamp:
03/12/07 10:33:33 (2 years ago)
Author:
migurski
Message:

Throwing some errors so AbstractProjection? is truly Abstract

Files:

Legend:

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

    r73 r166  
    2929    public function toString():String 
    3030    { 
    31         return 'Abstract('+zoom+', '+T.toString()+')'; 
     31        throw new Error("Abstract method not implemented by subclass."); 
     32        return null; 
    3233    } 
    3334     
    3435   /* 
    35     * Return raw projected point - currently linear
     36    * Return raw projected point
    3637    */ 
    3738    private function rawProject(point:Point):Point 
    3839    { 
    39         return new Point(point.x, point.y); 
     40        throw new Error("Abstract method not implemented by subclass."); 
     41        return null; 
    4042    } 
    4143     
    4244   /* 
    43     * Return raw unprojected point - currently linear
     45    * Return raw unprojected point
    4446    */ 
    4547    private function rawUnproject(point:Point):Point 
    4648    { 
    47         return new Point(point.x, point.y); 
     49        throw new Error("Abstract method not implemented by subclass."); 
     50        return null; 
    4851    } 
    4952     
  • trunk/as2/lib/com/modestmaps/geo/LinearProjection.as

    r73 r166  
     1import com.modestmaps.core.Point; 
    12import com.modestmaps.geo.Transformation; 
    23import com.modestmaps.geo.AbstractProjection;  
     
    1718        return 'Linear('+zoom+', '+T.toString()+')'; 
    1819    } 
     20     
     21   /* 
     22    * Return raw projected point. 
     23    */ 
     24    private function rawProject(point:Point):Point 
     25    { 
     26        return new Point(point.x, point.y); 
     27    } 
     28     
     29   /* 
     30    * Return raw unprojected point. 
     31    */ 
     32    private function rawUnproject(point:Point):Point 
     33    { 
     34        return new Point(point.x, point.y); 
     35    } 
    1936}