Changeset 542
- Timestamp:
- 04/06/08 23:47:59 (5 months ago)
- Files:
-
- trunk/as3/lib/com/modestmaps/core/MapExtent.as (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/as3/lib/com/modestmaps/core/MapExtent.as
r502 r542 6 6 { 7 7 import com.modestmaps.geo.Location; 8 9 import flash.geom.Rectangle; 8 10 9 11 public class MapExtent extends Object … … 116 118 } 117 119 120 public function getRect():Rectangle 121 { 122 var rect:Rectangle = new Rectangle(Math.min(east, west), Math.min(north, south)); 123 rect.right = Math.max(east, west); 124 rect.bottom = Math.max(north, south); 125 return rect; 126 } 127 128 public function contains(location:Location):Boolean 129 { 130 return getRect().contains(location.lon, location.lat); 131 } 132 118 133 /** @return "north, south, east, west" */ 119 134 public function toString():String 120 135 { 121 return [north, west, south, east].toString();136 return [north, south, east, west].join(', '); 122 137 } 123 138 }
