Don't auto-split GPX files, only /trackpoints data
[potlatch2.git] / net / systemeD / potlatch2 / utils / CachedDataLoader.as
index c790cc685994ccdab2f206f29ca6f5bada4e47aa..0947c4bcf918e8ac3961408b62e7732e5a47b26e 100644 (file)
@@ -7,6 +7,7 @@ package net.systemeD.potlatch2.utils {
        import mx.graphics.codec.PNGEncoder;
 
     import net.systemeD.halcyon.ExtendedURLLoader;
+       import net.systemeD.halcyon.DebugURLRequest;
 
        public class CachedDataLoader {
 
@@ -24,12 +25,13 @@ package net.systemeD.potlatch2.utils {
                        requests = [];
                        requestsMade[url] = requests;
 
+                               var request:DebugURLRequest = new DebugURLRequest(url);
                            var loader:ExtendedURLLoader = new ExtendedURLLoader();
                    loader.info = url;
                 loader.addEventListener(Event.COMPLETE, imageLoaded);
                 loader.addEventListener(IOErrorEvent.IO_ERROR, imageLoadFailed);
                 loader.dataFormat = URLLoaderDataFormat.BINARY;
-                loader.load(new URLRequest(url));
+                loader.load(request.request);
                    }
                    requests.push(onLoadHandler);
                    
@@ -62,10 +64,10 @@ package net.systemeD.potlatch2.utils {
         
         private static function getMissingImage():ByteArray {
             if ( missingImage == null ) {
-                var bitmap:BitmapData = new BitmapData(16, 16, false);
-                for ( var i:uint = 0; i < 16; i++ ) {
+                var bitmap:BitmapData = new BitmapData(24, 24, false);
+                for ( var i:uint = 0; i < 24; i++ ) {
                     bitmap.setPixel(i, i, 0xff0000);
-                    bitmap.setPixel(15-i, i, 0xff0000);
+                    bitmap.setPixel(23-i, i, 0xff0000);
                 }
                 missingImage = new PNGEncoder().encode(bitmap);
             }