Changeset 503
- Timestamp:
- 03/07/08 12:35:16 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/as3/lib/com/modestmaps/core/MarkerClip.as
r483 r503 8 8 import com.modestmaps.Map; 9 9 import com.modestmaps.events.MapEvent; 10 //import com.modestmaps.events.MarkerEvent;11 10 import com.modestmaps.geo.Location; 12 11 … … 105 104 public function getMarkerLocation( marker:DisplayObject ) : Location { 106 105 return locations[marker]; 106 } 107 108 public function setMarkerLocation(marker:DisplayObject, location:Location):void 109 { 110 locations[marker] = location; 107 111 } 108 112 trunk/as3/lib/com/modestmaps/io/LoadMovieThrottledRequest.as
r447 r503 86 86 if (_loader) 87 87 { 88 /* 88 _loader.contentLoaderInfo.removeEventListener(Event.INIT, onSpriteLoaded); 89 // _loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoaderProgress); 90 _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError); 91 _loader.contentLoaderInfo.removeEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus); 92 93 /* 89 94 * FIXME: there must be a better way to know if the Loader has an open connection. 90 95 * For now, we'll just try to close it and catch the exception if it hasn't been trunk/as3/lib/com/modestmaps/mapproviders/AbstractImageBasedMapProvider.as
r447 r503 16 16 { 17 17 import com.modestmaps.core.Coordinate; 18 import com.modestmaps.events.ThrottledRequestErrorEvent; 19 import com.modestmaps.events.ThrottledRequestEvent; 18 20 import com.modestmaps.io.MapProviderPaintThrottledRequest; 19 import com.modestmaps.events.ThrottledRequestEvent;21 20 22 import flash.display.Sprite; 21 import com.modestmaps.events.ThrottledRequestErrorEvent;22 23 import flash.events.ErrorEvent; 23 24 … … 53 54 // createLabel(sprite, coord.toString()); 54 55 } 55 56 57 protected function removeRequestListeners(request:MapProviderPaintThrottledRequest):void 58 { 59 if (request) 60 { 61 request.removeEventListener(ThrottledRequestEvent.REQUEST_ERROR, onRequestError); 62 request.removeEventListener(ThrottledRequestEvent.RESPONSE_COMPLETE, onResponseComplete); 63 request.removeEventListener(ThrottledRequestEvent.RESPONSE_ERROR, onResponseError); 64 } 65 } 66 56 67 /* 57 68 * Returns the url needed to get the tile image. … … 70 81 protected function onRequestError(event:ThrottledRequestEvent):void 71 82 { 83 removeRequestListeners(event.target as MapProviderPaintThrottledRequest); 72 84 paintFailure(event.sprite); 73 85 } … … 78 90 protected function onResponseComplete(event:ThrottledRequestEvent):void 79 91 { 92 removeRequestListeners(event.target as MapProviderPaintThrottledRequest); 80 93 raisePaintComplete(event.sprite, event.coord); 81 94 } … … 86 99 protected function onResponseError(event:ThrottledRequestErrorEvent):void 87 100 { 101 removeRequestListeners(event.target as MapProviderPaintThrottledRequest); 88 102 if (event.sprite) 89 103 {
