Update all layers when jumping to a place, and mark updateCoord methods as private...
authorRichard Fairhurst <richard@systemeD.net>
Thu, 14 Jul 2011 15:58:01 +0000 (16:58 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Thu, 14 Jul 2011 15:58:01 +0000 (16:58 +0100)
net/systemeD/halcyon/Map.as
net/systemeD/potlatch2/find/FindDialog.mxml

index 8a45b07..1962177 100644 (file)
@@ -120,7 +120,7 @@ package net.systemeD.halcyon {
                // ------------------------------------------------------------------------------------------
                /** Recalculate co-ordinates from new Flash origin */
 
-               public function updateCoords(tx:Number,ty:Number):void {
+               private function updateCoords(tx:Number,ty:Number):void {
                        setScrollRectXY(tx,ty);
 
                        edge_t=coord2lat(-ty          );
@@ -133,7 +133,7 @@ package net.systemeD.halcyon {
                }
                
                /** Move the map to centre on a given latitude/longitude. */
-               public function updateCoordsFromLatLon(lat:Number,lon:Number):void {
+               private function updateCoordsFromLatLon(lat:Number,lon:Number):void {
                        var cy:Number=-(lat2coord(lat)-mapheight/2);
                        var cx:Number=-(lon2coord(lon)-mapwidth/2);
                        updateCoords(cx,cy);
index a64c90e..653dfe6 100644 (file)
@@ -74,8 +74,7 @@
         }
         
         private function goToSelected():void {
-            Application.application.theMap.updateCoordsFromLatLon(selectedResult.lat, selectedResult.lon);
-            Application.application.theMap.download();
+            Application.application.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
             //Application.application.theMap.redraw();            
             PopUpManager.removePopUp(this);
         }