Changeset 645
- Timestamp:
- 08/25/08 15:56:16 (3 months ago)
- Files:
-
- branches/tom-tweenlite/lib/com/modestmaps/extras/MapCopyright.as (modified) (2 diffs)
- branches/tom-tweenlite/lib/com/modestmaps/Map.as (modified) (5 diffs)
- branches/tom-tweenlite/lib/com/modestmaps/TweenMap.as (modified) (1 diff)
- branches/tom-tweenlite/samples/as3/google_version.xml (added)
- branches/tom-tweenlite/swc/bin/ModestMapsSWC.swc (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tom-tweenlite/lib/com/modestmaps/extras/MapCopyright.as
r629 r645 45 45 case 'DAILY_PLANET': 46 46 document.getElementById(this.swfId).copyrightCallback('Image courtesy of NASA'); 47 break; 48 49 case 'NATURAL_EARTH_III': 50 document.getElementById(this.swfId).copyrightCallback('Public domain map from <a href=\'http://www.shadedrelief.com/natural3/pages/use.html\'>Tom Patterson, www.shadedrelief.com</a>'); 47 51 break; 48 52 … … 237 241 238 242 copyrightField = new TextField(); 239 copyrightField.defaultTextFormat = new TextFormat('Arial', 10, 0x000000, false); 240 copyrightField.selectable = copyrightField.mouseEnabled = false; 243 copyrightField.defaultTextFormat = new TextFormat('Arial', 10, 0x000000, false, null, null, null, '_blank'); 244 copyrightField.selectable = false; 245 copyrightField.mouseEnabled = true; 241 246 addChild(copyrightField); 242 247 } branches/tom-tweenlite/lib/com/modestmaps/Map.as
r644 r645 121 121 } 122 122 else { 123 // use the whole world as a default 123 124 var extent:MapExtent = new MapExtent(85, -85, 180, -180); 124 125 126 // but adjust to fit the mapprovider's outer limits if there are any: 125 127 var l1:Location = mapProvider.coordinateLocation(mapProvider.outerLimits()[0]); 126 128 var l2:Location = mapProvider.coordinateLocation(mapProvider.outerLimits()[1]); … … 139 141 } 140 142 141 setExtent(extent); 143 setExtent(extent); 142 144 } 143 145 … … 496 498 if (!targetPoint) targetPoint = new Point(mapWidth/2, mapHeight/2); 497 499 500 if (grid.zoomLevel + zoomDelta < grid.minZoom) { 501 zoomDelta = grid.minZoom - grid.zoomLevel; 502 } 503 else if (grid.zoomLevel + zoomDelta > grid.maxZoom) { 504 zoomDelta = grid.maxZoom - grid.zoomLevel; 505 } 506 498 507 var sc:Number = Math.pow(2, zoomDelta); 499 508 … … 679 688 var p:Point = grid.globalToLocal(new Point(event.stageX, event.stageY)); 680 689 if (event.shiftKey) { 681 zoomOutAbout(p); 690 if (grid.zoomLevel > grid.minZoom) { 691 zoomOutAbout(p); 692 } 693 else { 694 panBy(mapWidth/2 - p.x, mapHeight/2 - p.y); 695 } 682 696 } 683 697 else if (event.ctrlKey) { … … 685 699 } 686 700 else { 687 zoomInAbout(p); 701 if (grid.zoomLevel < grid.maxZoom) { 702 zoomInAbout(p); 703 } 704 else { 705 panBy(mapWidth/2 - p.x, mapHeight/2 - p.y); 706 } 688 707 } 689 708 } branches/tom-tweenlite/lib/com/modestmaps/TweenMap.as
r622 r645 102 102 if (duration < 0) duration = panAndZoomDuration; 103 103 if (!targetPoint) targetPoint = new Point(mapWidth/2, mapHeight/2); 104 105 if (grid.zoomLevel + zoomDelta < grid.minZoom) { 106 zoomDelta = grid.minZoom - grid.zoomLevel; 107 } 108 else if (grid.zoomLevel + zoomDelta > grid.maxZoom) { 109 zoomDelta = grid.maxZoom - grid.zoomLevel; 110 } 104 111 105 112 // round the zoom delta up or down so that we end up at a power of 2
