import flash.ui.Keyboard;
import mx.controls.Alert;
import mx.events.CloseEvent;
+ import mx.core.FlexGlobals;
/** Represents a particular state of the controller, such as "dragging a way" or "nothing selected". Key methods are
* processKeyboardEvent and processMouseEvent which take some action, and return a new state for the controller.
case 66: setSourceTag(); break; // B - set source tag for current object
case 67: editableLayer.connection.closeChangeset(); break; // C - close changeset
case 68: editableLayer.alpha=1.3-editableLayer.alpha; return null; // D - dim
+ case 71: FlexGlobals.topLevelApplication.trackLoader.load(); break; // G - GPS tracks **FIXME: move from Application to Map
case 83: SaveManager.saveChanges(editableLayer.connection); break; // S - save
case 84: controller.tagViewer.togglePanel(); return null; // T - toggle tags panel
case 90: if (!event.shiftKey) { MainUndoStack.getGlobalStack().undo(); return null;}// Z - undo
[", .", "Cycle through nodes in way"],
["D", "Dim features"],
["F", "Follow existing way"],
+ ["G", "Load GPS points"],
["M", "Maximise editor"],
["P", "Create parallel way"],
["Q", "Make area right-angled"],
private function parseGPX(event:Event):void {
var file:XML = new XML(event.target.data);
var action:CompositeUndoableAction = new CompositeUndoableAction("add track objects");
- for each (var ns:Namespace in file.namespaceDeclarations()) {
- if (ns.uri.match(/^http:\/\/www\.topografix\.com\/GPX\/1\/[01]$/)) {
- default xml namespace = ns;
- }
- }
-
Trace.parseTrkSegs(file,connection,action);
action.doAction(); /* just do it, don't add to undo stack */
-
- default xml namespace = new Namespace("");
layer.updateEntityUIs(false, false);
}