Changeset 354
- Timestamp:
- 10/24/07 09:54:03 (1 year ago)
- Files:
-
- trunk/as3/lib/com/modestmaps/core/MapExtent.as (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/as3/lib/com/modestmaps/core/MapExtent.as
r292 r354 17 17 public var west:Number; 18 18 19 /** Creates a new MapExtent from the given String. 20 * @param str "north, south, east, west" 21 * @return a new MapExtent from the given string */ 19 22 public static function fromString(str:String):MapExtent 20 23 { … … 26 29 } 27 30 31 /** @param n the most northerly latitude 32 * @param s the southern latitude 33 * @param e the eastern-most longitude 34 * @param w the westest longitude */ 28 35 public function MapExtent(n:Number=0, s:Number=0, e:Number=0, w:Number=0) 29 36 { … … 32 39 east = e; 33 40 west = w; 41 } 42 43 /** enlarges this extent so that the given extent is inside it */ 44 public function encloseExtent(extent:MapExtent):void 45 { 46 north = Math.max(extent.north, north); 47 south = Math.min(extent.south, south); 48 east = Math.max(extent.east, east); 49 west = Math.min(extent.west, west); 50 } 51 52 /** enlarges this extent so that the given location is inside it */ 53 public function enclose(location:Location):void 54 { 55 north = Math.max(location.lat, north); 56 south = Math.min(location.lat, south); 57 east = Math.max(location.lon, east); 58 west = Math.min(location.lon, west); 34 59 } 35 60 … … 78 103 } 79 104 105 /** @return "north, south, east, west" */ 80 106 public function toString():String 81 107 {
