Call moveFunction at startup to report the initial position
authorTom Hughes <tom@compton.nu>
Tue, 27 Nov 2012 19:20:03 +0000 (19:20 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 27 Nov 2012 19:20:03 +0000 (19:20 +0000)
net/systemeD/potlatch2/EditController.as

index 76af73e..fea0f1c 100644 (file)
@@ -73,6 +73,12 @@ package net.systemeD.potlatch2 {
             map.stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
 
             if (this.moveFunction) {
+                var lon:Number = ( map.edge_r + map.edge_l ) / 2;
+                var lat:Number = ( map.edge_b + map.edge_t ) / 2;
+
+                ExternalInterface.call(this.moveFunction, lon, lat, map.scale,
+                                       map.edge_l, map.edge_b, map.edge_r, map.edge_t);
+
                 map.addEventListener(MapEvent.MOVE, moveHandler);
             }