Merge branch 'master' into flex4
authorAndy Allan <andy@gravitystorm.co.uk>
Fri, 30 Sep 2011 16:14:23 +0000 (17:14 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Fri, 30 Sep 2011 16:14:23 +0000 (17:14 +0100)
Conflicts:
net/systemeD/halcyon/connection/Connection.as
net/systemeD/potlatch2/find/FindDialog.mxml
potlatch2.mxml
resources/map_features/amenities.xml
resources/map_features/barriers.xml
resources/map_features/landuse.xml
resources/map_features/paths.xml
resources/map_features/transport.xml

80 files changed:
CODING.txt
README.txt
build.xml
embedded/Arrow.fxg [new file with mode: 0644]
embedded/CollapsiblePanelAssets.swf [new file with mode: 0755]
embedded/tab_address.png [new file with mode: 0644]
embedded/tab_basic.png [new file with mode: 0644]
embedded/tab_cycle.png [new file with mode: 0644]
embedded/tab_details.png [new file with mode: 0644]
embedded/tab_restrictions.png [new file with mode: 0644]
embedded/tab_transport.png [new file with mode: 0644]
embedded/tab_walk.png [new file with mode: 0644]
lib/flexlib.swc
lib/zip.swc [new file with mode: 0644]
net/systemeD/controls/AutoComplete.as
net/systemeD/controls/CollapsiblePanel.as [new file with mode: 0644]
net/systemeD/halcyon/ImageBank.as [new file with mode: 0755]
net/systemeD/halcyon/MarkerUI.as
net/systemeD/halcyon/NodeUI.as
net/systemeD/halcyon/WayBitmapFiller.as [deleted file]
net/systemeD/halcyon/WayUI.as
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/styleparser/RuleSet.as
net/systemeD/halcyon/styleparser/StyleChooser.as
net/systemeD/potlatch2/BackgroundDialog.mxml
net/systemeD/potlatch2/BackgroundSelector.mxml
net/systemeD/potlatch2/CategorySelector.mxml
net/systemeD/potlatch2/Preloader.as
net/systemeD/potlatch2/RelationEditorPanel.mxml
net/systemeD/potlatch2/RelationLoaderPanel.mxml
net/systemeD/potlatch2/RelationSelectPanel.mxml
net/systemeD/potlatch2/StyleSelector.mxml
net/systemeD/potlatch2/TagGrid.mxml
net/systemeD/potlatch2/TagViewer.mxml
net/systemeD/potlatch2/Toolbox.mxml
net/systemeD/potlatch2/VectorSourceDialog.mxml
net/systemeD/potlatch2/find/FindDialog.mxml
net/systemeD/potlatch2/help/HelpDialog.mxml
net/systemeD/potlatch2/help/VideoPlayer.mxml
net/systemeD/potlatch2/mapfeatures/EditorFactory.as
net/systemeD/potlatch2/mapfeatures/Feature.as
net/systemeD/potlatch2/mapfeatures/editors/CheckboxEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/ChoiceComboBox.as
net/systemeD/potlatch2/mapfeatures/editors/ChoiceEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/ChoiceEditorFactory.as
net/systemeD/potlatch2/mapfeatures/editors/FreeTextEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/FreeTextEditorFactory.as
net/systemeD/potlatch2/mapfeatures/editors/NumberEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/RestrictionRenderer.mxml
net/systemeD/potlatch2/mapfeatures/editors/RouteEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/RouteIcon.mxml
net/systemeD/potlatch2/mapfeatures/editors/SingleTagEditorFactory.as
net/systemeD/potlatch2/mapfeatures/editors/SliderEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/SpeedEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/TurnRestrictionEditor.mxml
net/systemeD/potlatch2/mapfeatures/editors/TurnRestrictionIcon.mxml
net/systemeD/potlatch2/mapfeatures/editors/TurnRestrictionRenderer.mxml
net/systemeD/potlatch2/mygpx/MyGpxDialog.mxml
net/systemeD/potlatch2/options/OptionsDialog.mxml
net/systemeD/potlatch2/panels/BackgroundPanel.mxml
net/systemeD/potlatch2/panels/BugPanel.mxml
net/systemeD/potlatch2/panels/MarkerPanel.mxml
net/systemeD/potlatch2/save/OAuthPanel.mxml
net/systemeD/potlatch2/save/SaveDialog.mxml
net/systemeD/potlatch2/save/SaveManager.as
potlatch2-config.xml
potlatch2.mxml
resources/assets/features_pois.zip [new file with mode: 0644]
resources/assets/icons.zip [new file with mode: 0644]
resources/map_features.xml
resources/map_features/amenities.xml
resources/map_features/barriers.xml
resources/map_features/buildings.xml
resources/map_features/landuse.xml
resources/map_features/paths.xml
resources/map_features/power.xml
resources/map_features/shopping.xml
resources/map_features/transport.xml
resources/stylesheets/core_interactive.css
styles/Application.css

index 4cb2fb27594b95f8f96906305ecf27138eac8b4f..d9c6e3e1883e1eb4812a0e415912ecd6f1554b9d 100644 (file)
@@ -5,7 +5,7 @@
 
 == Dependencies and targets ==
 
-* We target Flash Player 9 at present. Please don't add FP10-specific code yet.
+* We target Flash Player 10.
 * Potlatch 2 requires Flex; the Halcyon rendering component doesn't. Don't add Flex stuff (import mx.*) to anything in net.systemeD.halcyon.
 * Both Potlatch 2 and Halcyon can be deployed locally (i.e. not on openstreetmap.org), and indeed can talk to databases other than the main OSM instance. So don't be too OSM-specific
 
index b905b9fd90a5824437c5d79ff62e5ba9872a1cb2..dabfc42ada5060d4480c384d5ca769390c3e3ea6 100644 (file)
@@ -10,18 +10,14 @@ Many icons used in halcyon/potlatch2 are based on the awesome CC0-licensed SJJB
 
 === What you'll need ===
 
-* Flex SDK 3.4 or 3.5 
+* Flex SDK 4.5
 ** Product page: http://www.adobe.com/products/flex/ 
-** Flex 3 Download page: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3 (free, OS X/Windows/Linux)
+** Flex 4 Download page: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 (free, OS X/Windows/Linux)
 * AS3 docs - http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/
 * Flash debug player - http://www.adobe.com/support/flashplayer/downloads.html
 * Basically you might as well just sell your soul to Adobe
 * Ant
 
-***Do not use FlexSDK <= 3.3 or > 4***. There are compatibility errors with version 4, and 3.3
-and earlier have this bug: http://bugs.adobe.com/jira/browse/SDK-16705 which is a major issue for the
-tag editors.
-
 If you happen to have Adobe Flex Builder 3/Flash Builder 4, you can create a project and import files into it. 
 See http://wiki.openstreetmap.org/wiki/Potlatch_2/Developer_Documentation for details.
 
@@ -38,7 +34,7 @@ Compiling Potlatch 2:
   cp build.properties.template build.properties
   
 2) Edit the FLEX_HOME variable in build.properties  
- eg, FLEX_HOME=c:/flex_sdk/3.5.0.12683
+ eg, FLEX_HOME=c:/flex_sdk/4.5.0.20967
  
 3) ant
 
index aa58536083013bfaad7be288654cead8cf97f9f6..8e7b87fd5978c2332124a3055d1e95eb3aa30a7f 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -63,6 +63,7 @@
       <arg line="-source-path ."/>
       <arg line="-doc-sources net/systemeD/"/>
       <arg line="-external-library-path=lib/"/>
+      <arg line="-target-player 10.0.0"/>
       <arg line="-exclude-classes ${org_classes} ${it_classes} ${hxasm_classes} ${com_classes}"/>
       <arg line="-output resources/docs/"/>
       <arg line="-window-title 'Halcyon and Potlatch2 Developer documentation'" />
        
       <!-- Sets java.awt.headless=true so font compilation works in headless environments -->
       <compiler.headless-server>true</compiler.headless-server>
+      <target-player>10.0.0</target-player>
      </mxmlc>
      
      <echo message="The ${test.application.name}.swf test runner has been created in ${test.bin.dir}" />
diff --git a/embedded/Arrow.fxg b/embedded/Arrow.fxg
new file mode 100644 (file)
index 0000000..7e1c73b
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Graphic xmlns="http://ns.adobe.com/fxg/2008" xmlns:fxg="http://ns.adobe.com/fxg/2008" xmlns:d="http://ns.adobe.com/fxg/2008/dt" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:svg="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" version="2.0" viewWidth="22" viewHeight="22"><mask><Group><Rect width="22" height="22"><fill><SolidColor color="#ffffff" alpha="1"/></fill></Rect></Group></mask><!--Unknown tag: sodipodi:namedview--><!--Unknown tag: defs--><!--Unknown tag: metadata--><Group x="0" y="-10"><Group id="layer1"><Group x="0" y="10"><Path data="M 11 0 6 13 c 1.1726216 -0.841614 2.5689509 -1.343529 4 -1.5 l 0 10.65625 2 0 L 12 11.5 c 1.440526 0.162502 2.839256 0.677108 4 1.53125 L 11 0 z" winding="nonZero" id="path2993"><fill><SolidColor color="#000000" alpha="1"/></fill></Path></Group></Group></Group></Graphic>
diff --git a/embedded/CollapsiblePanelAssets.swf b/embedded/CollapsiblePanelAssets.swf
new file mode 100755 (executable)
index 0000000..fd049dd
Binary files /dev/null and b/embedded/CollapsiblePanelAssets.swf differ
diff --git a/embedded/tab_address.png b/embedded/tab_address.png
new file mode 100644 (file)
index 0000000..b968f75
Binary files /dev/null and b/embedded/tab_address.png differ
diff --git a/embedded/tab_basic.png b/embedded/tab_basic.png
new file mode 100644 (file)
index 0000000..850b630
Binary files /dev/null and b/embedded/tab_basic.png differ
diff --git a/embedded/tab_cycle.png b/embedded/tab_cycle.png
new file mode 100644 (file)
index 0000000..67229f5
Binary files /dev/null and b/embedded/tab_cycle.png differ
diff --git a/embedded/tab_details.png b/embedded/tab_details.png
new file mode 100644 (file)
index 0000000..07812e5
Binary files /dev/null and b/embedded/tab_details.png differ
diff --git a/embedded/tab_restrictions.png b/embedded/tab_restrictions.png
new file mode 100644 (file)
index 0000000..424bbf7
Binary files /dev/null and b/embedded/tab_restrictions.png differ
diff --git a/embedded/tab_transport.png b/embedded/tab_transport.png
new file mode 100644 (file)
index 0000000..5cb7d91
Binary files /dev/null and b/embedded/tab_transport.png differ
diff --git a/embedded/tab_walk.png b/embedded/tab_walk.png
new file mode 100644 (file)
index 0000000..2663c93
Binary files /dev/null and b/embedded/tab_walk.png differ
index ca5a355b0575ee55303b125adecd18b4b7d7b698..d2e37b4a8bfefdd25dbfad20cc4df5f26d3d4e98 100644 (file)
Binary files a/lib/flexlib.swc and b/lib/flexlib.swc differ
diff --git a/lib/zip.swc b/lib/zip.swc
new file mode 100644 (file)
index 0000000..2a6eeac
Binary files /dev/null and b/lib/zip.swc differ
index 833e6274034898ce8772956998a1922b96d947dc..0f9461a32b5101b560d897b6415dcdb65c618ae7 100644 (file)
@@ -20,6 +20,7 @@ package net.systemeD.controls {
        import mx.core.UIComponent;
        import mx.controls.ComboBox;
        import mx.controls.DataGrid;
+       import mx.controls.TextInput;
        import mx.controls.listClasses.ListBase;
        import mx.collections.ArrayCollection;
        import mx.collections.ListCollectionView;
@@ -179,7 +180,7 @@ package net.systemeD.controls {
 
                        if (dropdown) {
                                if (typedTextChanged) {
-                                       cursorPosition = textInput.selectionBeginIndex;
+                                       cursorPosition = TextInput(textInput).selectionBeginIndex;
                                        updateDataProvider();
 
                                        if( collection.length==0 || typedText=="" || typedText==null ) {
@@ -208,25 +209,25 @@ package net.systemeD.controls {
                                // not in menu
                                // trace("not in menu"); trace("- restoring to "+typedText);
                                textInput.text = typedText;
-                               textInput.setSelection(cursorPosition, cursorPosition);
+                               textInput.selectRange(cursorPosition, cursorPosition);
                        } else if (dropdown && typedTextChanged && textInput.text!=typedText) {
                                // in menu, but user has typed
                                // trace("in menu, but user has typed"); trace("- restoring to "+typedText);
                                textInput.text = typedText;
-                               textInput.setSelection(cursorPosition, cursorPosition);
+                               textInput.selectRange(cursorPosition, cursorPosition);
                        } else if (showingDropdown && textInput.text==selectedLabel) {
                                // force update if Flex has fucked up again
                                // trace("should force update");
-                               textInput.htmlText=selectedLabel;
+                               TextInput(textInput).htmlText=selectedLabel;
                                textInput.validateNow();
-                               if (typedTextChanged) textInput.setSelection(cursorPosition, cursorPosition);
+                               if (typedTextChanged) textInput.selectRange(cursorPosition, cursorPosition);
                        } else if (showingDropdown && textInput.text!=selectedLabel && !typedTextChanged) {
                                // in menu, user has navigated with cursor keys/mouse
                                // trace("in menu, user has navigated with cursor keys/mouse");
                                textInput.text = selectedLabel;
-                               textInput.setSelection(0, textInput.text.length);
+                               textInput.selectRange(0, textInput.text.length);
                        } else if (textInput.text!="") {
-                               textInput.setSelection(cursorPosition, cursorPosition);
+                               textInput.selectRange(cursorPosition, cursorPosition);
                        }
 
                        if (showDropdown && !dropdown.visible) {
@@ -248,7 +249,7 @@ package net.systemeD.controls {
                        if (event.keyCode==Keyboard.ESCAPE && showingDropdown) {
                                // ESCAPE cancels dropdown
                                textInput.text = typedText;
-                               textInput.setSelection(textInput.text.length, textInput.text.length);
+                               textInput.selectRange(textInput.text.length, textInput.text.length);
                                showingDropdown = false;
                                dropdownClosed=true;
 
diff --git a/net/systemeD/controls/CollapsiblePanel.as b/net/systemeD/controls/CollapsiblePanel.as
new file mode 100644 (file)
index 0000000..4222107
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+
+The MIT License
+
+Copyright (c) 2007-2008 Ali Rantakari of hasseg.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+
+package net.systemeD.controls {
+       
+       import flash.events.*;
+       import mx.effects.AnimateProperty;
+       import mx.events.*;
+       import mx.containers.Panel;
+       import mx.core.ScrollPolicy;
+       
+       /**
+       * The icon designating a "closed" state
+       */
+       [Style(name="closedIcon", property="closedIcon", type="Object")]
+       
+       /**
+       * The icon designating an "open" state
+       */
+       [Style(name="openIcon", property="openIcon", type="Object")]
+       
+       /**
+       * This is a Panel that can be collapsed and expanded by clicking on the header.
+       * 
+       * @author Ali Rantakari
+       */
+       public class CollapsiblePanel extends Panel {
+               
+
+
+               private var _creationComplete:Boolean = false;
+               private var _open:Boolean = true;
+               private var _openAnim:AnimateProperty;
+               
+               
+               
+               /**
+               * Constructor
+               * 
+               */
+               public function CollapsiblePanel(aOpen:Boolean = true):void
+               {
+                       super();
+                       open = aOpen;
+                       this.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
+               }
+               
+               
+               
+               
+               
+               
+               
+               
+               // BEGIN: event handlers                                ------------------------------------------------------------
+               
+               private function creationCompleteHandler(event:FlexEvent):void
+               {
+                       this.horizontalScrollPolicy = ScrollPolicy.OFF;
+                       this.verticalScrollPolicy = ScrollPolicy.OFF;
+                       
+                       _openAnim = new AnimateProperty(this);
+                       _openAnim.duration = 300;
+                       _openAnim.property = "height";
+                       
+                       titleBar.addEventListener(MouseEvent.CLICK, headerClickHandler);
+                       
+                       _creationComplete = true;
+               }
+               
+               private function headerClickHandler(event:MouseEvent):void { toggleOpen(); }
+               
+               private function callUpdateOpenOnCreationComplete(event:FlexEvent):void { updateOpen(); }
+               
+               // --end--: event handlers                      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+               
+               
+               
+               
+               
+               
+               
+               
+               // BEGIN: private methods                               ------------------------------------------------------------
+               
+               // sets the height of the component without animation, based
+               // on the _open variable
+               private function updateOpen():void
+               {
+                       if (!_open) height = closedHeight;
+                       else height = openHeight;
+                       setTitleIcon();
+               }
+               
+               // the height that the component should be when open
+               private function get openHeight():Number {
+                       return measuredHeight;
+               }
+               
+               // the height that the component should be when closed
+               private function get closedHeight():Number {
+                       var hh:Number = getStyle("headerHeight");
+                       if (hh <= 0 || isNaN(hh)) hh = titleBar.height;
+                       return hh;
+               }
+               
+               // sets the correct title icon
+               private function setTitleIcon():void
+               {
+                       if (!_open) this.titleIcon = getStyle("closedIcon");
+                       else this.titleIcon = getStyle("openIcon");
+               }
+               
+               // --end--: private methods                     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+               
+               
+               
+               
+               
+               
+               
+               
+               // BEGIN: public methods                                ------------------------------------------------------------
+               
+               
+               
+               /**
+               * Collapses / expands this block (with animation)
+               */
+               public function toggleOpen():void 
+               {
+                       if (_creationComplete && !_openAnim.isPlaying) {
+                               
+                               _openAnim.fromValue = _openAnim.target.height;
+                               if (!_open) {
+                                       _openAnim.toValue = openHeight;
+                                       _open = true;
+                                       dispatchEvent(new Event(Event.OPEN));
+                               }else{
+                                       _openAnim.toValue = _openAnim.target.closedHeight;
+                                       _open = false;
+                                       dispatchEvent(new Event(Event.CLOSE));
+                               }
+                               setTitleIcon();
+                               _openAnim.play();
+                               
+                       }
+                       
+               }
+               
+               
+               /**
+               * Whether the block is in a expanded (open) state or not
+               */
+               public function get open():Boolean {
+                       return _open;
+               }
+               /**
+               * @private
+               */
+               public function set open(aValue:Boolean):void {
+                       _open = aValue;
+                       if (_creationComplete) updateOpen();
+                       else this.addEventListener(FlexEvent.CREATION_COMPLETE, callUpdateOpenOnCreationComplete, false, 0, true);
+               }
+               
+               
+               /**
+               * @private
+               */
+               override public function invalidateSize():void {
+                       super.invalidateSize();
+                       if (_creationComplete)
+                               if (_open && !_openAnim.isPlaying) this.height = openHeight;
+               }
+               
+               
+               // --end--: public methods                      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+               
+               
+       }
+
+}
+
diff --git a/net/systemeD/halcyon/ImageBank.as b/net/systemeD/halcyon/ImageBank.as
new file mode 100755 (executable)
index 0000000..eca8547
--- /dev/null
@@ -0,0 +1,146 @@
+package net.systemeD.halcyon {
+    import flash.events.*;
+       import flash.display.*;
+       import flash.net.*;
+       import flash.utils.ByteArray;
+       import nochump.util.zip.*;
+
+       /*
+               ImageBank stores and retrieves bitmap images.
+               All images are internally stored as Loader.
+
+               See blog.yoz.sk/2009/10/bitmap-bitmapdata-bytearray/ for a really useful conversion guide!
+       */
+
+    public class ImageBank extends EventDispatcher{
+               private var images:Object={};
+               private var imagesRequested:uint=0;
+               private var imagesReceived:uint=0;
+               
+               public static const IMAGES_LOADED:String="imagesLoaded";
+               public static const ZIP_LOADED:String="zipLoaded";
+               
+               private static const GLOBAL_INSTANCE:ImageBank = new ImageBank();
+               public static function getInstance():ImageBank { return GLOBAL_INSTANCE; }
+
+               public function hasImage(name:String):Boolean {
+                       if (images[name]) return true;
+                       return false;
+               }
+
+               /* ==========================================================================================
+                  Populate with images 
+                  ========================================================================================== */
+
+               public function loadImage(filename:String):void {
+                       if (images[filename]) return;
+                       imagesRequested++;
+
+                       var loader:Loader=new Loader();
+                       images[filename]=loader;
+                       var request:URLRequest=new URLRequest(filename);
+                       loader.contentLoaderInfo.addEventListener(Event.COMPLETE,                                               loadedImage);
+                       loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS,                  httpStatusHandler);
+                       loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR,    securityErrorHandler);
+                       loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,                                ioErrorHandler);
+                       loader.load(request);
+               }
+
+               private function loadedImage(event:Event):void {
+                       imageReceived();
+               }
+               private function httpStatusHandler(event:HTTPStatusEvent):void { }
+               private function securityErrorHandler(event:SecurityErrorEvent):void { 
+                       trace("securityErrorEvent: "+event.target.url);
+                       imageReceived();
+               }
+               private function ioErrorHandler(event:IOErrorEvent):void { 
+                       trace("ioErrorEvent: "+event.target.url); 
+                       imageReceived();
+               }
+               private function imageReceived():void {
+                       imagesReceived++;
+                       if (imagesReceived==imagesRequested) { dispatchEvent(new Event(IMAGES_LOADED)); }
+               }
+
+               /* ==========================================================================================
+                  Load from .zip file
+                  ========================================================================================== */
+               
+               public function loadFromZip(filename:String, prefix:String=""):void {
+                       var loader:URLLoader = new URLLoader();
+                       loader.dataFormat="binary";
+                       loader.addEventListener(Event.COMPLETE, function(e:Event):void { zipReady(e,prefix); } );
+                       loader.load(new URLRequest(filename));
+               }
+               private function zipReady(event:Event, prefix:String):void {
+                       var zip:ZipFile = new ZipFile(event.target.data);
+                       for (var i:uint=0; i<zip.entries.length; i++) {
+                               var fileref:ZipEntry = zip.entries[i];
+                               var data:ByteArray = zip.getInput(fileref);
+                               var loader:Loader=new Loader();
+                               images[prefix+fileref.name]=loader;
+                               loader.loadBytes(data);
+                       }
+                       dispatchEvent(new Event(ZIP_LOADED));
+               }
+
+
+               /* ==========================================================================================
+                  Get images 
+                  getAsDisplayObject(filename)
+                  getAsBitmapData(filename)
+                  getAsByteArray(filename)
+                  ========================================================================================== */
+
+               public function getAsDisplayObject(name:String):DisplayObject {
+                       /* If the image hasn't loaded yet, then add an EventListener for when it does. */
+                       if (getWidth(name)==0) {
+                               var loader:Loader = new Loader();
+                               images[name].contentLoaderInfo.addEventListener(Event.COMPLETE,
+                                       function(e:Event):void { loaderReady(e, loader) });
+                               return loader;
+                       }
+                       /* Otherwise, create a new Bitmap, because just returning the raw Loader
+                          (i.e. images[name]) would only allow it to be added to one parent. (The other 
+                          way to do this would be by copying the bytes as loaderReady does.). */
+                       return new Bitmap(getAsBitmapData(name));
+               }
+               
+               public function getOriginalDisplayObject(name:String):DisplayObject {
+                       /* But if we're going to clone it later, this'll work fine. */
+                       return images[name];
+               }
+
+               private function loaderReady(event:Event, loader:Loader):void {
+                       /* The file has loaded, so we can copy the data from there into our new Loader */
+                       var info:LoaderInfo = event.target as LoaderInfo;
+                       loader.loadBytes(info.bytes);
+               }
+
+               public function getAsBitmapData(name:String):BitmapData {
+                       var bitmapData:BitmapData=new BitmapData(getWidth(name), getHeight(name), true, 0xFFFFFF);
+                       bitmapData.draw(images[name]);
+                       return bitmapData;
+               }
+               
+               public function getAsByteArray(name:String):ByteArray {
+                       return images[name].contentLoaderInfo.bytes;
+               }
+
+               /* ==========================================================================================
+                  Get file information
+                  ========================================================================================== */
+
+               public function getWidth(name:String):int { 
+                       try { return images[name].contentLoaderInfo.width; }
+                       catch (error:Error) { } return 0;
+               }
+
+               public function getHeight(name:String):int { 
+                       try { return images[name].contentLoaderInfo.height; }
+                       catch (error:Error) { } return 0;
+               }
+
+       }
+}
\ No newline at end of file
index 536a2085e887ed8480637f1e92ae3f956362854f..14801bc19265cb9ebe0be83a8ee1cf5fd7d34632 100644 (file)
@@ -10,6 +10,7 @@ package net.systemeD.halcyon {
     import flash.geom.Point;
     import net.systemeD.halcyon.styleparser.*;
     import net.systemeD.halcyon.connection.*;
+    import net.systemeD.halcyon.ImageBank;
 
     public class MarkerUI extends EntityUI {
 
@@ -84,32 +85,28 @@ package net.systemeD.halcyon {
                     r=true;
                     if (s.rotation) { rotation=s.rotation; }
                     if (s.icon_image!=iconnames[subpart]) {
+                                               icon=new Sprite();
+                                               iconnames[subpart]=s.icon_image;
+                                               addToLayer(icon,STROKESPRITE,s.sublayer);
                         if (s.icon_image=='square') {
                             // draw square
-                            icon=new Sprite();
-                            addToLayer(icon,STROKESPRITE,s.sublayer);
                             w=styleIcon(icon,subpart);
                             icon.graphics.drawRect(0,0,w,w);
                             if (s.interactive) { maxwidth=Math.max(w,maxwidth); }
-                            iconnames[subpart]='_square';
 
                         } else if (s.icon_image=='circle') {
                             // draw circle
-                            icon=new Sprite();
-                            addToLayer(icon,STROKESPRITE,s.sublayer);
                             w=styleIcon(icon,subpart);
                             icon.graphics.drawCircle(w,w,w);
                             if (s.interactive) { maxwidth=Math.max(w,maxwidth); }
-                            iconnames[subpart]='_circle';
-
-                        } else if (paint.ruleset.images[s.icon_image]) {
-                            // 'load' icon (actually just from library)
-                            var loader:ExtendedLoader = new ExtendedLoader();
-                            loader.info['sublayer']=s.sublayer;
-                            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedIcon, false, 0, true);
-                            loader.loadBytes(paint.ruleset.images[s.icon_image]);
-                            iconnames[subpart]=s.icon_image;
-                        }
+
+                                               } else if (ImageBank.getInstance().hasImage(s.icon_image)) {
+                                                       // load icon from library
+                                                       icon.addChild(ImageBank.getInstance().getAsDisplayObject(s.icon_image));
+//                                                     addHitSprite(icon.width);                       // ** check this - we're doing it below too
+//                                                     loaded=true; updatePosition();          // ** check this
+                                                       if (s.interactive) { maxwidth=Math.max(icon.width,maxwidth); }
+                                               }
                     }
                 }
 
@@ -163,16 +160,6 @@ package net.systemeD.halcyon {
             setListenSprite();
         }
 
-        private function loadedIcon(event:Event):void {
-            var icon:Sprite=new Sprite();
-            var sublayer:Number=event.target.loader.info['sublayer'];
-            addToLayer(icon,STROKESPRITE,sublayer);
-            icon.addChild(Bitmap(event.target.content));
-            addHitSprite(icon.width);
-            loaded=true;
-            updatePosition();
-        }
-
         private function updatePosition():void {
             if (!loaded) { return; }
 
index cf58a14bface5e69f2f29e9ce29f9a3a09cf702b..4ad2c591754057a5edac1e55b416c91f3d2b20ee 100644 (file)
@@ -10,6 +10,7 @@ package net.systemeD.halcyon {
        import flash.geom.Point;
        import net.systemeD.halcyon.styleparser.*;
     import net.systemeD.halcyon.connection.*;
+    import net.systemeD.halcyon.ImageBank;
        
        /** The graphical representation of a Node (including POIs and nodes that are part of Ways). */
        public class NodeUI extends EntityUI {
@@ -104,31 +105,27 @@ package net.systemeD.halcyon {
                                        r=true;
                                        if (s.rotation) { rotation=s.rotation; }
                                        if (s.icon_image!=iconnames[subpart]) {
+                                               icon=new Sprite();
+                                               iconnames[subpart]=s.icon_image;
+                                               addToLayer(icon,STROKESPRITE,s.sublayer);
                                                if (s.icon_image=='square') {
                                                        // draw square
-                                                       icon=new Sprite();
-                                                       addToLayer(icon,STROKESPRITE,s.sublayer);
                                                        w=styleIcon(icon,subpart);
                                                        icon.graphics.drawRect(0,0,w,w);
                                                        if (s.interactive) { maxwidth=Math.max(w,maxwidth); }
-                                                       iconnames[subpart]='_square';
 
                                                } else if (s.icon_image=='circle') {
                                                        // draw circle
-                                                       icon=new Sprite();
-                                                       addToLayer(icon,STROKESPRITE,s.sublayer);
                                                        w=styleIcon(icon,subpart);
                                                        icon.graphics.drawCircle(w,w,w);
                                                        if (s.interactive) { maxwidth=Math.max(w,maxwidth); }
-                                                       iconnames[subpart]='_circle';
-
-                                               } else if (paint.ruleset.images[s.icon_image]) {
-                                                       // 'load' icon (actually just from library)
-                                                       var loader:ExtendedLoader = new ExtendedLoader();
-                                                       loader.info['sublayer']=s.sublayer;
-                                                       loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedIcon, false, 0, true);
-                                                       loader.loadBytes(paint.ruleset.images[s.icon_image]);
-                                                       iconnames[subpart]=s.icon_image;
+
+                                               } else if (ImageBank.getInstance().hasImage(s.icon_image)) {
+                                                       // load icon from library
+                                                       icon.addChild(ImageBank.getInstance().getAsDisplayObject(s.icon_image));
+//                                                     addHitSprite(icon.width);                       // ** check this - we're doing it below too
+                                                       loaded=true; updatePosition();          // ** check this
+                                                       if (s.interactive) { maxwidth=Math.max(icon.width,maxwidth); }
                                                }
                                        }
                                }
@@ -183,16 +180,6 @@ package net.systemeD.halcyon {
                        setListenSprite();
                }
 
-               private function loadedIcon(event:Event):void {
-                       var icon:Sprite=new Sprite();
-                       var sublayer:Number=event.target.loader.info['sublayer'];
-                       addToLayer(icon,STROKESPRITE,sublayer);
-                       icon.addChild(Bitmap(event.target.content));
-                       addHitSprite(icon.width);
-                       loaded=true;
-                       updatePosition();
-               }
-
                private function updatePosition(xDelta:Number=0,yDelta:Number=0):void {
                        if (!loaded) { return; }
 
diff --git a/net/systemeD/halcyon/WayBitmapFiller.as b/net/systemeD/halcyon/WayBitmapFiller.as
deleted file mode 100644 (file)
index 6140d37..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-package net.systemeD.halcyon {
-
-       import net.systemeD.halcyon.styleparser.*;
-    import net.systemeD.halcyon.connection.*;
-       import flash.display.*;
-       import flash.events.*;
-
-       public class WayBitmapFiller {
-               private var wayui:WayUI;
-               private var style:ShapeStyle;
-               private var graphics:Graphics;
-               private var loader:Loader = new Loader();
-
-               public function WayBitmapFiller(wayui:WayUI,graphics:Graphics,style:ShapeStyle) {
-                       this.wayui=wayui;
-                       this.graphics=graphics;
-                       this.style=style;
-                       
-                       if (wayui.paint.ruleset.images[style.fill_image]) {
-                               loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedFill);
-                               loader.loadBytes(wayui.paint.ruleset.images[style.fill_image]);
-                       }
-               }
-               
-               private function loadedFill(event:Event):void {
-                       var image:BitmapData = new BitmapData(loader.width, loader.height, false);
-                       image.draw(loader);
-                       graphics.beginBitmapFill(image);
-                       wayui.solidLines(graphics,[]);
-                       graphics.endFill();
-               }
-       }
-}
\ No newline at end of file
index 787385f41c6c664bde70919159edae6acad04e14..f278972718dcfa3e5fae7a124d7053d67de9546c 100644 (file)
@@ -9,6 +9,7 @@ package net.systemeD.halcyon {
        
        import net.systemeD.halcyon.connection.*;
        import net.systemeD.halcyon.styleparser.*;
+    import net.systemeD.halcyon.ImageBank;
 
        /** The graphical representation of a Way. */ 
        public class WayUI extends EntityUI {
@@ -293,8 +294,11 @@ package net.systemeD.halcyon {
                                        if ((!isNaN(s.fill_color) || s.fill_image) && entity.findParentRelationsOfType('multipolygon','inner').length==0 && isNaN(drawExcept)) {
                                                fill=new Shape(); addToLayer(fill,FILLSPRITE,s.sublayer);
                                                fill.graphics.moveTo(x0,y0);
-                                               if (s.fill_image) { new WayBitmapFiller(this,fill.graphics,s); }
-                                                                        else { s.applyFill(fill.graphics); }
+                                               if (s.fill_image) {
+                                                       fill.graphics.beginBitmapFill(ImageBank.getInstance().getAsBitmapData(s.fill_image));
+                                               } else {
+                                                       s.applyFill(fill.graphics);
+                                               }
                                                solidLines(fill.graphics,inners);
                                                fill.graphics.endFill();
                                                drawn=true;
index 9a850627bcaffb89639e7abaf8044a43d566f451..07a43b7037236d6bfc4d6b8b97e8c30a1cc6862a 100644 (file)
@@ -90,7 +90,7 @@ package net.systemeD.halcyon.connection {
                public var nodecount:int=0;
                public var waycount:int=0;
                public var relationcount:int=0;
-        private var traces:Array = [];
+        private var traces:Vector.<Trace> = new Vector.<Trace>();
         private var nodePositions:Object = {};
         protected var traces_loaded:Boolean = false;
                private var loadedBboxes:Array = [];
@@ -439,12 +439,12 @@ package net.systemeD.halcyon.connection {
             return changeset;
         }
 
-        public function addTrace(t:Object):void {
+        public function addTrace(t:Trace):void {
             traces.push(t);
         }
 
         protected function clearTraces():void {
-            traces = [];
+            traces = new Vector.<Trace>();
         }
 
                public function findTrace(id:int):Trace {
@@ -454,7 +454,7 @@ package net.systemeD.halcyon.connection {
                        return null;
                }
 
-        public function getTraces():Array {
+        public function getTraces():Vector.<Trace> {
             return traces;
         }
 
index 1c9f6be8a25ed21efd6bb0f578f6e4a700403249..de8d3dd711bdd04ab42727546169d279b60c2913 100644 (file)
@@ -6,6 +6,7 @@ package net.systemeD.halcyon.styleparser {
        import net.systemeD.halcyon.ExtendedURLLoader;
        import net.systemeD.halcyon.DebugURLRequest;
     import net.systemeD.halcyon.connection.Entity;
+    import net.systemeD.halcyon.ImageBank;
 
     import net.systemeD.halcyon.connection.*;
        
@@ -18,12 +19,7 @@ package net.systemeD.halcyon.styleparser {
 
        public class RuleSet {
 
-               /** Is the RuleSet fully loaded and available for use? */
-               public var loaded:Boolean=false; 
-               /** Hash of loaded images. Hash key is filename, value is BitmapData for the image. */
-               public var images:Object=new Object();
-               /** Hash of image widths. Hash key is filename, value is pixel width. */
-               public var imageWidths:Object=new Object();     
+               public var loaded:Boolean=false;                        // is the RuleSet fully loaded and available for use?
                private var redrawCallback:Function=null;       // function to call when CSS loaded
                private var iconCallback:Function=null;         // function to call when all icons loaded
                private var iconsToLoad:uint=0;                         // number of icons left to load (fire iconCallback when ==0)
@@ -244,7 +240,7 @@ package net.systemeD.halcyon.styleparser {
                public function getStyles(obj:Entity, tags:Object, zoom:uint):StyleList {
                        var sl:StyleList=new StyleList();
                        for each (var sc:StyleChooser in choosers) {
-                               sc.updateStyles(obj,tags,sl,imageWidths,zoom);
+                               sc.updateStyles(obj,tags,sl,zoom);
                        }
                        return sl;
                }
@@ -277,10 +273,10 @@ package net.systemeD.halcyon.styleparser {
 
 
                /// ------------------------------------------------------------------------------------------------
-               /** Load all images referenced in the RuleSet (for example, icons or bitmap fills).
-                       FIXME: if an image is referenced twice, it'll be requested twice. */
+               /** Load all images referenced in the RuleSet (for example, icons or bitmap fills). */
                
                private function loadImages():void {
+                       ImageBank.getInstance().addEventListener(ImageBank.IMAGES_LOADED,doIconCallback);
                        var filename:String;
                        for each (var chooser:StyleChooser in choosers) {
                                for each (var style:Style in chooser.styles) {
@@ -288,59 +284,17 @@ package net.systemeD.halcyon.styleparser {
                                        else if (style is ShapeStyle  && ShapeStyle(style).fill_image   ) { filename=ShapeStyle(style).fill_image; }
                                        else if (style is ShieldStyle && ShieldStyle(style).shield_image) { filename=ShieldStyle(style).shield_image; }
                                        else { continue; }
-                                       if (filename=='square' || filename=='circle') { continue; }
-                       
-                                       iconsToLoad++;
-                                       var request:DebugURLRequest=new DebugURLRequest(filename);
-                                       var loader:ExtendedURLLoader=new ExtendedURLLoader();
-                                       loader.dataFormat=URLLoaderDataFormat.BINARY;
-                                       loader.info['filename']=filename;
-                                       loader.addEventListener(Event.COMPLETE,                                         loadedImage,                            false, 0, true);
-                                       loader.addEventListener(HTTPStatusEvent.HTTP_STATUS,            httpStatusHandler,                      false, 0, true);
-                                       loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,      onImageLoadSecurityError,       false, 0, true);
-                                       loader.addEventListener(IOErrorEvent.IO_ERROR,                          onImageLoadioError,                     false, 0, true);
-                                       loader.load(request.request);
+
+                                       if (filename!='square' && filename!='circle')
+                                               ImageBank.getInstance().loadImage(filename);
                                }
                        }
                }
-
-               private function loadedImage(event:Event):void {
-                       var fn:String=event.target.info['filename'];
-                       images[fn]=event.target.data; if (images[fn].length==0) return;
-
-                       var loader:ExtendedLoader = new ExtendedLoader();
-                       loader.info['filename']=fn;
-                       loader.contentLoaderInfo.addEventListener(Event.COMPLETE, measureWidth);
-                       loader.loadBytes(images[fn]);
-               }
                
-               private function measureWidth(event:Event):void {
-                       var fn:String=event.target.loader.info['filename'];
-                       imageWidths[fn]=event.target.width;
-                       // ** do we need to explicitly remove the loader object now?
-
-                       oneLessImageToLoad();
+               private function doIconCallback(e:Event):void {
+                       iconCallback();
                }
-
-        private function oneLessImageToLoad():void {
-            iconsToLoad--;
-            if (iconsToLoad<=0 && iconCallback!=null) { iconCallback(); }
-        }
-
-        private function onImageLoadioError ( event:IOErrorEvent ):void {
-            trace("ioerrorevent: "+event.target.info['filename']);
-            oneLessImageToLoad();
-        }
-
-        private function onImageLoadSecurityError ( event:SecurityErrorEvent ):void {
-            trace("securityerrorevent: "+event.target.info['filename']);
-            oneLessImageToLoad();
-        }
-
-               private function httpStatusHandler( event:HTTPStatusEvent ):void { }
-               private function securityErrorHandler( event:SecurityErrorEvent ):void { trace("securityerrorevent"); }
-               private function ioErrorHandler( event:IOErrorEvent ):void { trace("ioerrorevent"); }
-
+               
                // ------------------------------------------------------------------------------------------------
                // Parse CSS
 
index c2d29809c3d2b741db42459c6d757d8e418b42fb..fdefa232e33c38cda313a7dadf0412c3055e0bee 100644 (file)
@@ -1,6 +1,7 @@
 package net.systemeD.halcyon.styleparser {
 
        import net.systemeD.halcyon.connection.Entity;
+    import net.systemeD.halcyon.ImageBank;
 
        public class StyleChooser {
 
@@ -41,7 +42,7 @@ package net.systemeD.halcyon.styleparser {
                
                // Update the current StyleList from this StyleChooser
 
-               public function updateStyles(obj:Entity, tags:Object, sl:StyleList, imageWidths:Object, zoom:uint):void {
+               public function updateStyles(obj:Entity, tags:Object, sl:StyleList, zoom:uint):void {
                        if (zoomSpecific) { sl.validAt=zoom; }
 
                        // Are any of the ruleChains fulfilled?
@@ -64,9 +65,10 @@ package net.systemeD.halcyon.styleparser {
                                                        a=sl.pointStyles;
                                                        w=0;
                                                        if (PointStyle(r).icon_width && !PointStyle(r).evals['icon_width']) {
+                                                               // ** FIXME: we should check this is the bit being used for 'square', 'circle' etc.
                                                                w=PointStyle(r).icon_width;
-                                                       } else if (PointStyle(r).icon_image && imageWidths[PointStyle(r).icon_image]) {
-                                                               w=imageWidths[PointStyle(r).icon_image];
+                                                       } else if (PointStyle(r).icon_image && ImageBank.getInstance().hasImage(PointStyle(r).icon_image)) {
+                                                               w=ImageBank.getInstance().getWidth(PointStyle(r).icon_image);
                                                        }
                                                        if (w>sl.maxwidth) { sl.maxwidth=w; }
                                                } else if (r is InstructionStyle) {
index 580a090ae8c4e550a0980d34679282531a88c5fb..4c21149bcf385a106e9b8996a4d71ab64a4a8e97 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-        xmlns:mx="http://www.adobe.com/2006/mxml" 
+        xmlns:fx="http://ns.adobe.com/mxml/2009"
+        xmlns:mx="library://ns.adobe.com/flex/mx"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" 
         width="500" height="300" verticalGap="0">
         <mx:DataGridColumn editable="true"  dataField="url" headerText="URL"/>
         <mx:DataGridColumn editable="false" headerText="Key" width="70">
                        <mx:itemRenderer>
-                               <mx:Component>
+                               <fx:Component>
                                <mx:ComboBox
                                        selectedItem="{FunctionKeyManager.instance().getKeyFor(outerDocument.title,data.name)}"
                                    dataProvider="{FunctionKeyManager.fkeysCollection}"
                                        change="FunctionKeyManager.instance().setKeyFromFString(selectedItem as String,outerDocument.title,data.name)" />
-                               </mx:Component>
+                               </fx:Component>
                        </mx:itemRenderer>
                </mx:DataGridColumn>
     </mx:columns>
@@ -27,7 +28,7 @@
     <mx:LinkButton label="Add" click="addNewSource()"/>
   </mx:HBox>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
        /*
                Still to do:
@@ -41,6 +42,7 @@
     import mx.managers.PopUpManager;
     import mx.events.CloseEvent;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
        import mx.collections.ArrayCollection;
        import mx.controls.List;
        import net.systemeD.potlatch2.FunctionKeyManager;
@@ -54,7 +56,7 @@
                this.menu=menu;
                collection=source;
                dataCollection=new ArrayCollection(source.collection);
-        PopUpManager.addPopUp(this, Application(Application.application), true);
+        PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, backgroundDialog_close);
                dataGrid.dataProvider=dataCollection;
@@ -79,6 +81,6 @@
        }
 
   ]]>
-  </mx:Script>
+  </fx:Script>
 
 </mx:TitleWindow>
index 2c483390bf15a7e5b6f1035ea24c2a5dfb850aa8..78d4b91ac0ad085dfa28645b9bb5e54b9c4ef32d 100644 (file)
@@ -1,27 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:VBox
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"
        horizontalAlign="left" backgroundColor="white" borderStyle="inset">
        
        <mx:List width="100%" height="100%" id="background"
                        labelField="name"
-                       change="Application.application.bgButton.close(); Imagery.instance().setBackground(background.selectedItem);"
+                       change="FlexGlobals.topLevelApplication.bgButton.close(); Imagery.instance().setBackground(background.selectedItem);"
                dataProvider="{Imagery.instance().getAvailableImagery()}"
                rowCount="{Imagery.instance().getAvailableImagery().length}"/>
        <mx:HBox>
-       <mx:CheckBox width="100%" label="Dim" selected="{Application.application.theMap.getDimming()}" id="dim"
+       <mx:CheckBox width="100%" label="Dim" selected="{application.theMap.getDimming()}" id="dim"
            change="setDimming(dim.selected)" />
-       <mx:CheckBox width="100%" label="Sharpen" selected="{Application.application.theMap.getSharpen()}" id="sharpen"
+       <mx:CheckBox width="100%" label="Sharpen" selected="{application.theMap.getSharpen()}" id="sharpen"
            change="setSharpen(sharpen.selected)" />
        </mx:HBox>
 
        <mx:HBox>
-       <mx:Button label="Edit..." click="Application.application.bgButton.close(); new BackgroundDialog().init('Background imagery',background,Imagery.instance());" />
-       <mx:Button label="Vector file..." click="Application.application.bgButton.close(); new VectorSourceDialog().init();" />
+       <mx:Button label="Edit..." click="FlexGlobals.topLevelApplication.bgButton.close(); new BackgroundDialog().init('Background imagery',background,Imagery.instance());" />
+       <mx:Button label="Vector file..." click="FlexGlobals.topLevelApplication.bgButton.close(); new VectorSourceDialog().init();" />
        </mx:HBox>
 
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
 
                import net.systemeD.halcyon.*;
                import net.systemeD.halcyon.connection.*;
                import mx.collections.ArrayCollection;
                import mx.managers.PopUpManager;
 
+               [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
+
                public function setDimming(v:Boolean):void {
-                       Application.application.theMap.setDimming(dim.selected);
-                       Application.application.yahoo.alpha = dim.selected ? 0.5 : 1;
+                       FlexGlobals.topLevelApplication.theMap.setDimming(dim.selected);
+                       FlexGlobals.topLevelApplication.yahoo.alpha = dim.selected ? 0.5 : 1;
                        var obj:SharedObject=SharedObject.getLocal("user_state");
                        obj.setProperty('background_dim',v);
                        obj.flush();
                }
                public function setSharpen(v:Boolean):void {
-                       Application.application.theMap.setSharpen(sharpen.selected);
+                       FlexGlobals.topLevelApplication.theMap.setSharpen(sharpen.selected);
                        var obj:SharedObject=SharedObject.getLocal("user_state");
                        obj.setProperty('background_sharpen',v);
                        obj.flush();
                }
-    ]]></mx:Script>    
+    ]]></fx:Script>
 </mx:VBox>
 
index fbee9811e3c92163aa1860467a91bcef83b7135e..893b5a8cdadfa69a0e4092b4f7724c426ecf9807 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:VBox
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:halcyon="net.systemeD.halcyon.*"
        backgroundColor="white" borderStyle="inset">
 
                        width="420" height="100%" change="itemSelected(event);" styleName="catToggleTiles"
                        creationComplete="ensureSelection();">
               <mx:itemRenderer>
-                  <mx:Component>
+                  <fx:Component>
                       <mx:VBox width="100" height="75"
                           horizontalScrollPolicy="off" verticalScrollPolicy="off"
                           horizontalAlign="center" verticalGap="0" toolTip="{data.description}">
                           <mx:Image source="{data.image}" height="100%" verticalAlign="middle"/>
                           <mx:Text text="{data.name}"/>
                       </mx:VBox>
-                  </mx:Component>
+                  </fx:Component>
               </mx:itemRenderer>
           </mx:TileList>
           </mx:VBox>
@@ -31,7 +32,7 @@
   </mx:HBox>
 
   <!-- mx:Label id="hoverInfo" text="Hover Info goes here"/>-->
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
 
       import net.systemeD.halcyon.connection.*;
           settingSelection = false;
       }
 
-  ]]></mx:Script>
+  ]]></fx:Script>
 </mx:VBox>
 
index 1014c0a3f6810fb1247708b5f92538c86f1ba74f..583e610339e1e70a58657efe38c55654738efa2f 100644 (file)
@@ -6,6 +6,7 @@ package net.systemeD.potlatch2 {
     import flash.geom.Matrix;
     import flash.text.TextField;
     import flash.text.TextFormat;
+    import net.systemeD.halcyon.ImageBank;
 
 
     public class Preloader extends net.systemeD.potlatch2.PreloaderDisplayBase {
@@ -20,6 +21,9 @@ package net.systemeD.potlatch2 {
         private var barFrame:Sprite;
         private var mainColor:uint=0x045966;
 
+               private var assetscount:uint=0;
+               private var queuedEvents:Array=[];
+
         public function Preloader()
         {
             super();
@@ -38,7 +42,35 @@ package net.systemeD.potlatch2 {
 
             //creates all visual elements
             createAssets();
+
+                       // request .zip files
+                       if (loaderInfo.parameters['assets']) {
+                               ImageBank.getInstance().addEventListener(ImageBank.ZIP_LOADED, zipLoaded);
+                               for each (var file:String in loaderInfo.parameters['assets'].split(';')) {
+                                       var asset:Array=file.split('=');
+                                       assetscount++;
+                                       ImageBank.getInstance().loadFromZip(asset[0],asset[1]);
+                               }
+                       }
         }
+
+               override protected function initProgressHandler(e:Event):void {
+                       // We don't let anything happen until the .zips are loaded
+                       // see http://stackoverflow.com/questions/2773617/how-to-preload-a-file-in-flex-before-the-application-initializes
+                       if (assetscount>0) {
+                               queuedEvents.push(e);
+                               e.stopImmediatePropagation();
+                       }
+                       draw();
+               }
+               
+               private function zipLoaded(e:Event):void {
+                       assetscount--; if (assetscount>0) return;
+                       for each (var q:Event in queuedEvents) {
+                               dispatchEvent(q);
+                       }
+               }
+               
         //this is our "animation" bit
         override protected function draw():void
         {
index 1f33cfee92b2f41e887d0912be69aa7d70597a4b..1fd6b53b7ee99eb03a29740a799aae41867ce56b 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
        title="Edit Relation" width="350" height="400"
        showCloseButton="true" close="PopUpManager.removePopUp(this);">
@@ -8,7 +9,7 @@
        <potlatch2:TagViewer width="100%" height="100%" id="tagViewer"
            creationComplete="checkRelation()"/>
        
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
                import net.systemeD.halcyon.*;
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
@@ -26,6 +27,6 @@
             if ( _relation != null )
                 tagViewer.setEntity([_relation]);
         }
-    ]]></mx:Script>    
+    ]]></fx:Script>
 </mx:TitleWindow>
 
index 2a617a146f7bb3daf9123aaa6a8531c190cb0eb0..a0c62361f055347b54ba1f0230c679fe51c81dac 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
        title="Load Relation" width="350" height="160"
        creationComplete="requestedID.setFocus()"
@@ -14,7 +15,7 @@
       <mx:Spacer width="100%"/>
       <mx:Button label="Load" click="loadRelation();" styleName="titleWindowButton" />
     </mx:ControlBar>
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
                import net.systemeD.halcyon.*;
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
@@ -60,6 +61,6 @@
                        MainUndoStack.getGlobalStack().addAction(undo);
                }
                
-    ]]></mx:Script>    
+    ]]></fx:Script>
 </mx:TitleWindow>
 
index f10440d25a23f74c19ebd8669401421910009412..00b0bd15dee84f73426bc4e4ef9df85333299496 100644 (file)
@@ -1,16 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-    xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
     xmlns:potlatch2="net.systemeD.potlatch2.*"
     title="Select Relation" width="350" height="400"
     showCloseButton="true" close="PopUpManager.removePopUp(this);">
 
-    <mx:Script><![CDATA[
+    <fx:Script><![CDATA[
         import net.systemeD.halcyon.*;
         import net.systemeD.halcyon.connection.*;
         import net.systemeD.potlatch2.*;
         import mx.managers.PopUpManager;
         import mx.core.Application;
+        import mx.core.FlexGlobals;
 
         private var conn:Connection;
         private var relationList:Array;
@@ -29,7 +31,7 @@
             //tagmatches[k]=t[k];// deep copy match pattern tags
             defaulttags[k]=t[k][0];  // route=[hiking,foot] -> route=hiking
           }    
-          PopUpManager.addPopUp(this, Application(Application.application), true);
+          PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
           PopUpManager.centerPopUp(this);
     
           var titles:Array = [];
@@ -76,7 +78,7 @@
 
                        PopUpManager.removePopUp(this);
                        var panel:RelationEditorPanel = RelationEditorPanel(
-                           PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+                           PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
                        panel.setRelation(relation);
                        PopUpManager.centerPopUp(panel);
         }
                public function closeAndLoadRelation():void {
                        PopUpManager.removePopUp(this);
                        var panel:RelationLoaderPanel = RelationLoaderPanel(
-                           PopUpManager.createPopUp(Application(Application.application), RelationLoaderPanel, true));
+                           PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationLoaderPanel, true));
                        panel.setEntity(entity);
                        PopUpManager.centerPopUp(panel);
                }
+               
+               public function updateSelectButton():void {
+                       selectButton.enabled=relationSelector.selectedItems.length>0;
+               }
         
-    ]]></mx:Script> 
+    ]]></fx:Script>
     <mx:Text id="warning" text="" />
-    <mx:List width="100%" height="100%" id="relationSelector" verticalScrollPolicy="on" allowMultipleSelection="true" > 
+    <mx:List width="100%" height="100%" id="relationSelector" change="updateSelectButton();" verticalScrollPolicy="on" allowMultipleSelection="true" > 
     </mx:List>
     <mx:ControlBar>
       <mx:Button label="New Relation..." click="closeAndNewRelation();" styleName="titleWindowButton" />
       <mx:Button label="Load Relation..." click="closeAndLoadRelation();" styleName="titleWindowButton" />
       <mx:Spacer width="100%"/>
-      <mx:Button label="Select" click="updateEntityAndClose();" enabled="{relationSelector.selectedItems.length>0}" styleName="titleWindowButton" />
+      <mx:Button label="Select" id="selectButton" click="updateEntityAndClose();" enabled="false" styleName="titleWindowButton" />
     </mx:ControlBar>
 </mx:TitleWindow>
index d839ad7f8d1309ea58795f7f15e6b8cb2663fcd5..7ac5c6bb42cb6243bb437f5aca6d5cd988c14e87 100644 (file)
@@ -1,23 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:VBox
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"
        horizontalAlign="left" backgroundColor="white" borderStyle="inset">
        
        <mx:List width="100%" height="100%" id="mapStyle" 
                labelField="name"
-               change="Application.application.styleButton.close(); Stylesheets.instance().setStylesheet(mapStyle.selectedItem.name, mapStyle.selectedItem.url);"
+               change="FlexGlobals.topLevelApplication.styleButton.close(); Stylesheets.instance().setStylesheet(mapStyle.selectedItem.name, mapStyle.selectedItem.url);"
                dataProvider="{Stylesheets.instance().getCollection()}"
                rowCount="{Stylesheets.instance().getCollection().length}" />
 
-       <mx:Button label="Edit..." click="Application.application.styleButton.close(); new BackgroundDialog().init('Map style',mapStyle,Stylesheets.instance());" />
+       <mx:Button label="Edit..." click="FlexGlobals.topLevelApplication.styleButton.close(); new BackgroundDialog().init('Map style',mapStyle,Stylesheets.instance());" />
 
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
                import net.systemeD.halcyon.*;
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
                import net.systemeD.potlatch2.collections.Stylesheets;
                import mx.core.*;
-    ]]></mx:Script>    
+    ]]></fx:Script>
 </mx:VBox>
 
index 17b8615f62869ecb9d48e01f7e05c6c9b6351742..0f6614d84e3e5a805c9e0bd8272f089f99911fa4 100644 (file)
@@ -5,15 +5,16 @@
 -->
 
 <mx:DataGrid editable="true" doubleClickEnabled="true" doubleClick="addNewTag()"
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:controls="net.systemeD.controls.*"
-       xmlns:mx="http://www.adobe.com/2006/mxml">
+       xmlns:mx="library://ns.adobe.com/flex/mx">
        <mx:columns>
 
                <!-- Key -->
 
                <mx:DataGridColumn editable="true" dataField="key" headerText="Key">
                        <mx:itemEditor>
-                               <mx:Component>
+                               <fx:Component>
                                        <controls:AutoComplete
                                                dataProvider="{MapFeatures.getInstance().getAutoCompleteKeys(outerDocument.getEntityType())}"
                                                labelField="name"
@@ -21,9 +22,9 @@
                                                restrict="&#x0020;-&#x10FFFF;"
                                                maxChars="255" 
                                                typedText="{outerDocument.selectedItem.key}">
-                                       <mx:Script><![CDATA[ import net.systemeD.potlatch2.mapfeatures.*; ]]></mx:Script>
+                                       <fx:Script><![CDATA[ import net.systemeD.potlatch2.mapfeatures.*; ]]></fx:Script>
                                        </controls:AutoComplete>
-                               </mx:Component>
+                               </fx:Component>
                        </mx:itemEditor>
                </mx:DataGridColumn>
 
@@ -31,7 +32,7 @@
 
                <mx:DataGridColumn editable="true" dataField="value" headerText="Value" itemRenderer="net.systemeD.controls.DataGridWarningField" >
                        <mx:itemEditor>
-                               <mx:Component>
+                               <fx:Component>
                                        <controls:AutoComplete
                                                dataProvider="{MapFeatures.getInstance().getAutoCompleteValues(outerDocument.getEntityType(),outerDocument.selectedItem.key)}"
                                                labelField="name"
@@ -39,9 +40,9 @@
                                                restrict="&#x0020;-&#x10FFFF;"
                                                maxChars="255" 
                                                typedText="{outerDocument.selectedItem.value}">
-                                       <mx:Script><![CDATA[ import net.systemeD.potlatch2.mapfeatures.*; ]]></mx:Script>
+                                       <fx:Script><![CDATA[ import net.systemeD.potlatch2.mapfeatures.*; ]]></fx:Script>
                                        </controls:AutoComplete>
-                               </mx:Component>
+                               </fx:Component>
                        </mx:itemEditor>
                </mx:DataGridColumn>
 
 
                <mx:DataGridColumn width="20" editable="false">
                        <mx:itemRenderer>
-                               <mx:Component>
+                               <fx:Component>
                     <mx:HBox horizontalAlign="center" verticalAlign="middle">
                       <mx:Image source="@Embed('../../../embedded/delete_small.svg')"
                           click='event.stopPropagation();outerDocument.removeTag();'
                           buttonMode="true" useHandCursor="true" width="12" height="12">
                       </mx:Image>
                                        </mx:HBox>
-                               </mx:Component>
+                               </fx:Component>
                        </mx:itemRenderer>
                </mx:DataGridColumn>
        </mx:columns>
 
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
 
                import net.systemeD.halcyon.connection.*;
                import mx.collections.*;
                        return selectedEntity.getType();
                }
 
-       ]]></mx:Script>
+       ]]></fx:Script>
 </mx:DataGrid>
index f33c39ce34142ed535af5a0c5ba0231f9901599d..b2b62fddee728583b8892c2b697e272a20ee7fee 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:VBox
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:flexlib="flexlib.containers.*"
        xmlns:controls="net.systemeD.controls.*"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
@@ -23,9 +24,9 @@
                <mx:TileList dataProvider="{dndRep.currentItem.getFeaturesForType('point', true)}" width="100%" height="1"
                                     rowHeight="32" columnWidth="32" updateComplete="resizePOIGrid(event)" styleName="dndPanelTileList">
                        <mx:itemRenderer>
-                               <mx:Component>
+                               <fx:Component>
                                        <mx:VBox toolTip="{data.name}">
-                                               <mx:Script><![CDATA[
+                                               <fx:Script><![CDATA[
                                                        import mx.events.DragEvent;
                                                        import mx.managers.DragManager;
                                                        import mx.core.DragSource;
                                                                dragProxy.height = dragInitiator.height; // for non-embedded images
                                                                DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
                                                        }
-                                               ]]></mx:Script>
+                                               ]]></fx:Script>
                                                <mx:Image id="foo" source="{data.dndimage}" height="24" width="24" mouseMove="dragPOI(event, data.tags)" toolTip="{data.name}" />
                                        </mx:VBox>
-                               </mx:Component>
+                               </fx:Component>
                        </mx:itemRenderer>
                </mx:TileList>
        </mx:Repeater>
                 <mx:DataGridColumn editable="false" dataField="description" headerText="Relation"/>
                 <mx:DataGridColumn editable="false" dataField="id_idx" headerText="ID"/>
                 <mx:DataGridColumn editable="true" dataField="role" headerText="Role">
-                    <mx:itemEditor><mx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></mx:Component></mx:itemEditor>
+                    <mx:itemEditor><fx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></fx:Component></mx:itemEditor>
                 </mx:DataGridColumn>
                                <mx:DataGridColumn width="20" editable="false">
                                        <mx:itemRenderer>
-                                               <mx:Component>
+                                               <fx:Component>
                                    <mx:HBox horizontalAlign="center" verticalAlign="middle">
                                                                <mx:PopUpButton arrowButtonWidth="12" paddingLeft="0" paddingRight="0" width="12" height="12" 
                                                                                open="{outerDocument.updateRelationMenu(event);}" 
                                                                                creationComplete="{outerDocument.createRelationMenu(PopUpButton(event.target));}"/>
                                                        </mx:HBox>
-                                               </mx:Component>
+                                               </fx:Component>
                                        </mx:itemRenderer>
                                </mx:DataGridColumn>
             </mx:columns>
             <mx:DataGridColumn editable="false" dataField="type" headerText="Type"/>
             <mx:DataGridColumn editable="false" dataField="id" headerText="ID"/>
             <mx:DataGridColumn editable="true" dataField="role" headerText="Role">
-                               <mx:itemEditor><mx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></mx:Component></mx:itemEditor>
+                               <mx:itemEditor><fx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></fx:Component></mx:itemEditor>
                        </mx:DataGridColumn>
           </mx:columns>
         </mx:DataGrid>
                        disabledIcon="@Embed('../../../embedded/view_accordion_disabled.png')"
                        click="setEditorStackUI(false)" id="accordionLabel" paddingTop="6"
                        toolTip="Show in sliding windows"
-                       enabled="{editorStack is SuperTabNavigator &amp;&amp; stack.selectedIndex==0}" />
+                       enabled="{editorStack is TabNavigator &amp;&amp; stack.selectedIndex==0}" />
          </mx:HBox>
   </mx:VBox>
 
             <mx:DataGridColumn editable="false" dataField="description" headerText="Relation"/>
             <mx:DataGridColumn editable="false" dataField="id_idx" headerText="ID"/>
             <mx:DataGridColumn editable="true" dataField="role" headerText="Role">
-                <mx:itemEditor><mx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></mx:Component></mx:itemEditor>
+                <mx:itemEditor><fx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></fx:Component></mx:itemEditor>
             </mx:DataGridColumn>
                        <mx:DataGridColumn width="20" editable="false">
                                <mx:itemRenderer>
-                                       <mx:Component>
+                                       <fx:Component>
                            <mx:HBox horizontalAlign="center" verticalAlign="middle">
                                                        <mx:PopUpButton arrowButtonWidth="12" paddingLeft="0" paddingRight="0" width="12" height="12" 
                                                                        open="{outerDocument.updateRelationMenu(event);}" 
                                                                        creationComplete="{outerDocument.createRelationMenu(PopUpButton(event.target));}"/>
                                                </mx:HBox>
-                                       </mx:Component>
+                                       </fx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
         </mx:columns>
 
 </mx:ViewStack>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.halcyon.MapPaint;
       import net.systemeD.potlatch2.mapfeatures.*;
       import net.systemeD.potlatch2.utils.*;
+      import net.systemeD.controls.CollapsiblePanel;
 
       import mx.collections.*;
       import mx.containers.*;
       import mx.managers.DragManager;
       import mx.core.DragSource;
       import mx.controls.TabBar;
-      import flexlib.containers.SuperTabNavigator;
+//    import flexlib.containers.SuperTabNavigator;
+
+      [Bindable] [Embed(source="../../../embedded/tab_basic.png"       )] private var tabIconBasic:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_address.png"     )] private var tabIconAddress:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_cycle.png"       )] private var tabIconCycle:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_details.png"     )] private var tabIconDetails:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_restrictions.png")] private var tabIconRestrictions:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_transport.png"   )] private var tabIconTransport:Class;
+      [Bindable] [Embed(source="../../../embedded/tab_walk.png"        )] private var tabIconWalk:Class;
+      private var tabIcons:Object= { Basic:tabIconBasic, Details:tabIconDetails, Address:tabIconAddress, Walk:tabIconWalk, Cycle:tabIconCycle, 
+                                        Transport:tabIconTransport, Restrictions:tabIconRestrictions};
 
       [Bindable]
       public var dndPrompt:String="Add new points by dragging them onto the map";
 
-      private var editorStackTabNavigator:SuperTabNavigator;
+      private var editorStackTabNavigator:TabNavigator;
       private var editorStackAccordion:Accordion;
       [Bindable] private var editorStack:Container;
 
       }
 
       private var tabComponents:Object = {};
+      private var subpanelComponents:Object = {};
 
       private function initialiseEditors():void {
-          // reset tab to 0 to work around TabNavigator bug (#3444)
-          if (editorStack is TabNavigator) {
-              try {
-                  var tabBar:TabBar=TabBar(TabNavigator(editorStack).getTabAt(0).parent);
-                  tabBar.selectedIndex=0;
-                  tabBar.validateNow();
-              } catch(errObject:Error) {}
-          }
+               editorStack.removeAllChildren();
+               if ( selectedEntity == null || feature == null )
+                       return;
+
+               var basicEditorBox:VBox = createEditorBox();
+               basicEditorBox.label = "Basic";
+               basicEditorBox.icon=tabIconBasic;
+               editorStack.addChild(basicEditorBox);
+
+               var tabs:Object = {};
+               var tabList:Array = [];
+               tabComponents = {};
+               var subpanels:Object = {};
+               subpanelComponents = {};
+
+               // First create the tabs
+               for each (var factory:EditorFactory in feature.editors) {
+                       var category:String = factory.category;
+                       if (category!='') {
+                               var tab:VBox = tabs[category];
+                               if ( tab == null) {
+                                       tab = createEditorBox();
+                                       tab.label = category;
+                                       if (tabIcons[category]) tab.icon=tabIcons[category];
+                                       tabs[category] = tab;
+                                       tabList.push(tab);      
+                               }
+                       }
+               }
 
-          editorStack.removeAllChildren();
-          if ( selectedEntity == null || feature == null )
-              return;
+               // Put the tabs on-screen in order
+               tabList.sort(sortCategories,16);
+               for each (tab in tabList) {
+                       editorStack.addChild(tab);
+                       tabComponents[tab] = [];
+               }
 
-          var editorBox:VBox = createEditorBox();
-          editorBox.label = "Basic";
-          editorStack.addChild(editorBox);
+               // Then add the individual editors to them
+               for each (factory in feature.editors) {
 
-          var tabs:Object = {};
-          tabComponents = {};
+                       // Add to basic editor box first
+                       if ( factory.presence.isEditorPresent(factory, selectedEntity, null) ) {
+                               var editor:DisplayObject = factory.createEditorInstance(selectedEntity);
+                               if (editor) basicEditorBox.addChild(editor);
+                       }
 
-          for each (var factory:EditorFactory in feature.editors) {
-              if ( factory.presence.isEditorPresent(factory, selectedEntity, null) ) {
-                  var editor:DisplayObject = factory.createEditorInstance(selectedEntity);
-                  if ( editor != null )
-                      editorBox.addChild(editor);
-              }
-              var category:String = factory.category;
-              if (category!='') {
-                     var tab:VBox = tabs[category];
-                     if ( tab == null) {
-                         tab = createEditorBox();
-                         tab.label = category;
-                         editorStack.addChild(tab);
-                         tabs[category] = tab;
-                         tabComponents[tab] = [];
-                     }
-                     var catEditor:DisplayObject = factory.createEditorInstance(selectedEntity);
-                     if ( catEditor != null )
-                         tabComponents[tab].push(catEditor);
-                     //    tab.addChild(catEditor);
-              }
-          }
+                       // Then prepare to add to category panel
+                       category=factory.category;
+                       if (factory.category=='') continue;
+                       var catEditor:DisplayObject = factory.createEditorInstance(selectedEntity);
+                       if (!catEditor) continue;
+                       tab=tabs[category];
+                       
+                       // Create subcategory panel if needed
+                       if (factory.subcategory) {
+                               var subcategory:String = factory.subcategory;
+                               if (!subpanels[category]) { subpanels[category]={}; }
+                               var subpanel:CollapsiblePanel = subpanels[category][subcategory];
+                               if (!subpanel) {
+                                       subpanel=new CollapsiblePanel(false);
+                                       subpanel.percentWidth=100;
+                                       subpanel.styleName="subcategoryPanel";
+                                       subpanel.title=subcategory;
+                                       subpanels[category][subcategory]=subpanel;
+                                       tabComponents[tab].push(subpanel);
+                               }
+                               subpanel.addChild(catEditor);
+                       } else {
+                               tabComponents[tab].push(catEditor);
+                       }
+               }
       }
 
+       // ** FIXME: Order probably shouldn't be hard-coded, but configurable
+       private static var categoryOrder:Array=["Restrictions","Transport","Cycle","Walk","Address","Details"]; // reverse order
+       private function sortCategories(a:VBox,b:VBox):int {
+               var a1:int=categoryOrder.indexOf(a.label);
+               var a2:int=categoryOrder.indexOf(b.label);
+               if (a1<a2) { return 1; }
+               else if (a1>a2) { return -1; }
+               return 0;
+       }
+       
       private function createEditorBox():VBox {
           var box:VBox = new VBox();
           box.percentWidth = 100;
       }
 
        private function initEditorStackUIs():void {
-               editorStackTabNavigator = new SuperTabNavigator();
-               editorStackTabNavigator.allowTabSqueezing=false;
-               editorStackTabNavigator.minTabWidth=10;
-               editorStackTabNavigator.closePolicy="close_never";
-               editorStackTabNavigator.scrollSpeed=20;
+               editorStackTabNavigator = new TabNavigator();
+//             editorStackTabNavigator.allowTabSqueezing=false;
+//             editorStackTabNavigator.minTabWidth=10;
+//             editorStackTabNavigator.closePolicy="close_never";
+//             editorStackTabNavigator.scrollSpeed=20;
                editorStackTabNavigator.creationPolicy="auto";
                editorStackTabNavigator.percentWidth=100;
                editorStackTabNavigator.percentHeight=100;
                editorStackTabNavigator.styleName="dndStackTab";
-               editorStackTabNavigator.popUpButtonPolicy="off"
+//             editorStackTabNavigator.popUpButtonPolicy="off"
 
 
                editorStackAccordion = new Accordion();
                editorStackAccordion.percentHeight=100;
                editorStackAccordion.creationPolicy="auto";
                editorStackAccordion.styleName="dndStackAccordion";
+               /* FIXME: the accordion icons should be right-aligned. See:
+               http://www.kristoferjoseph.com/blog/2008/11/06/positioning-the-flex-accordion-header-icon
+               http://blog.flexexamples.com/2007/09/13/changing-text-alignment-in-an-flex-accordion-header/
+               */
 
                setEditorStackUI(true);
        }
        }
 
        private function editorStackUIUpdate(event:Event):void {
-               if (editorStack is SuperTabNavigator) {
-                       var e:SuperTabNavigator = editorStack as SuperTabNavigator;
+               if (editorStack is TabNavigator) {
+                       var e:TabNavigator = editorStack as TabNavigator;
                        if (e.selectedIndex<0) { return; }
                        for (var i:uint=0; i<e.numChildren; i++) {
                                e.getTabAt(i).selected=(i==e.selectedIndex);
 
       private function editRelation(id:Number):void {
           var panel:RelationEditorPanel = RelationEditorPanel(
-              PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+              PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
           panel.setRelation(connection.getRelation(id));
           PopUpManager.centerPopUp(panel);
       }
        public function selectRelationMenu(event:MenuEvent):void {
                var rel:Relation=rowData.relation;
                var entities:Array;
-               var controller:EditController=Application.application.theController;
+               var controller:EditController=FlexGlobals.topLevelApplication.theController;
                switch (event.index) {
                        case 0: // Select all members
                                entities=selectedEntity.entities.concat(rel.memberEntities);
                if (rows!=Math.floor(rows)) { rows=Math.floor(rows+1); }
                event.target.height=rows*(event.target.rowHeight+1);
        }
-  ]]></mx:Script>
+  ]]></fx:Script>
 </mx:VBox>
 
index dcb05c35dbf89d7c9e53035edcc8953c1a841eb1..06579762bf6a6349d47599daeefb4f3115f1f0ef 100644 (file)
 <?xml version="1.0" encoding="utf-8"?>
 <mx:Panel
-       xmlns:mx="http://www.adobe.com/2006/mxml"
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
+       xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
        height="76" width="129" layout="absolute"
        styleName="theToolBox">
 
-        <!-- the animation effect that controls the rotation of the reverse arrow.
-              We could get more fancy by using previous angle in angleFrom, and a longer duration, to give a nice animated effect -->
-        <mx:Rotate id="rotate" angleFrom="{angle-1}" angleTo="{angle}" target="{arrowBox}" originX="{arrowBox.width/2}" originY="{arrowBox.height/2}" duration="4"/>
-
-
                <mx:Image data="@Embed('../../../embedded/close_small.png')"
                        includeInLayout="false" id="toolboxClose" click="toggle();" 
                        y="-6" x="115" />
 
                <!-- Top row -->
 
-               <mx:Button icon="@Embed('../../../embedded/delete.svg')"
+               <s:Button icon="@Embed('../../../embedded/delete.svg')"
                        click='doDelete();' 
                        enabled="{canDo('delete')}" 
                        alpha="{getAlpha('delete')}" 
                        toolTip="{deleteToolTipText()}" 
-                       width="28" height="28" textAlign="left" y="4" x="6" paddingLeft="6" paddingRight="0" />
+                       width="28" height="28" y="4" x="6" />
 
-        <mx:HBox id="reverseButton" width="28" height="28" y="4" x="36" borderStyle="solid" cornerRadius="4"
-                  click="reverseClicked();" horizontalAlign="center" verticalAlign="middle" toolTip="Reverse direction (V)">
+               <mx:HBox id="reverseButton" width="28" height="28" y="4" x="36" borderStyle="none"
+                          horizontalAlign="center" verticalAlign="middle" toolTip="Reverse direction (V)">
             <mx:ViewStack id="rotateButtonStack" creationPolicy="all">
-                <mx:HBox id="arrowBoxWrapper"><!-- changing the viewstack back onto a rotated hbox causes positioning glitches, hence this wrapper -->
-                    <!-- I can totally recommend adding borderStyle="solid" to arrowBox when debugging -->
-                    <mx:HBox id="arrowBox" horizontalAlign="center" verticalAlign="middle" width="24" height="24">
-                        <mx:Image id="arrow" source="@Embed('../../../embedded/arrow.svg')"
-                            alpha="{getAlpha('reverseDirection')}"
-                            width="22" height="22"/>
-                    </mx:HBox>
+                <mx:HBox id="arrowBoxWrapper">
+                                       <s:NavigatorContent width="28" height="28">
+                                               <s:Button id="arrow" icon="{Arrow}" width="28" height="28" alpha="{getAlpha('reverseDirection')}" click="reverseClicked();"/>
+                                       </s:NavigatorContent>
                 </mx:HBox>
                 <mx:HBox id="clockwiseBox" horizontalAlign="center" verticalAlign="middle">
-                    <mx:Image id="clockwise" source="@Embed('../../../embedded/clockwise.svg')"
+                    <s:Button id="clockwise" icon="@Embed('../../../embedded/clockwise.svg')"
                         alpha="{getAlpha('reverseDirection')}"
-                        width="22" height="22" x="2" y="2"/>
+                        width="28" height="28" click="reverseClicked();" />
                 </mx:HBox>
                 <mx:HBox id="antiClockwiseBox" horizontalAlign="center" verticalAlign="middle">
-                    <mx:Image id="anticlockwise" source="@Embed('../../../embedded/anti-clockwise.svg')"
-                        click='doReverseDirection();'
+                    <s:Button id="anticlockwise" icon="@Embed('../../../embedded/anti-clockwise.svg')"
                         enabled="{canDo('reverseDirection')}"
                         alpha="{getAlpha('reverseDirection')}"
-                        width="22" height="22" x="2" y="2"/>
+                        width="28" height="28" click="reverseClicked();" />
                 </mx:HBox>
             </mx:ViewStack>
         </mx:HBox>
-               <mx:Button icon="@Embed('../../../embedded/cut.svg')" 
+               <s:Button icon="@Embed('../../../embedded/cut.svg')"
                        id="splitButton"
                        click='doSplit();'
                        enabled="{canDo('split')}" 
                        alpha="{getAlpha('split')}" 
                        toolTip="Split way (X)" 
-                       width="28" height="28" textAlign="left" y="4" x="66" paddingLeft="8" paddingRight="0" />
-               <mx:Button icon="@Embed('../../../embedded/merge.svg')" 
+                       width="28" height="28" y="4" x="66" />
+               <s:Button icon="@Embed('../../../embedded/merge.svg')"
                        id="mergeButton"
                        click='doMerge();'
                        enabled="{canDo('merge')}" 
                        alpha="{getAlpha('merge')}" 
                        toolTip="Merge ways" 
-                       width="28" height="28" textAlign="left" y="4" x="96" paddingLeft="3" paddingRight="0" />
+                       width="28" height="28" y="4" x="96" />
 
                <!-- Second row -->
 
-               <mx:Button icon="@Embed('../../../embedded/straighten.svg')" 
+               <s:Button icon="@Embed('../../../embedded/straighten.svg')"
                        id="straightenButton"
                        click='doStraighten();' 
                        enabled="{canDo('straighten')}" 
                        alpha="{getAlpha('straighten')}" 
                        toolTip="Straighten way" 
-                       width="28" height="28" textAlign="left" y="34" x="6" paddingLeft="5" paddingRight="0" />
-               <mx:Button icon="@Embed('../../../embedded/circle.svg')" 
+                       width="28" height="28" y="34" x="6" />
+               <s:Button icon="@Embed('../../../embedded/circle.svg')"
                        id="circulariseButton"
                        click='doCircularise();' 
                        enabled="{canDo('circularise')}" 
                        alpha="{getAlpha('circularise')}" 
                        toolTip="Make circular" 
-                       width="28" height="28" textAlign="left" y="34" x="36" paddingLeft="4" paddingRight="0" />
-               <mx:Button icon="@Embed('../../../embedded/quadrilateralise.svg')" 
+                       width="28" height="28" y="34" x="36" />
+               <s:Button icon="@Embed('../../../embedded/quadrilateralise.svg')"
                        id="quadrilateraliseButton"
                        click='doQuadrilateralise();' 
                        enabled="{canDo('quadrilateralise')}" 
                        alpha="{getAlpha('quadrilateralise')}" 
                        toolTip="Make right-angled (Q)"
-                       width="28" height="28" textAlign="left" y="34" x="66" paddingLeft="6" paddingRight="0" />
-               <mx:Button icon="@Embed('../../../embedded/parallel.svg')" 
+                       width="28" height="28" y="34" x="66" />
+               <s:Button icon="@Embed('../../../embedded/parallel.svg')"
                        id="parralleliseButton"
                        click='doParallelise();' 
                        enabled="{canDo('parallelise')}" 
                        alpha="{getAlpha('parallelise')}" 
                        toolTip="Create parallel way (P)" 
-                       width="28" height="28" textAlign="left" y="34" x="96" paddingLeft="8" paddingRight="0" />
+                       width="28" height="28" y="34" x="96" />
 
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
 
                import flash.events.Event;
                import flash.events.MouseEvent;
                import net.systemeD.halcyon.connection.actions.*;
                import net.systemeD.potlatch2.controller.*;
                import net.systemeD.potlatch2.tools.*;
+               import embedded.*;      // for FXG icons
 
                private var controller:EditController;
 
                         w.clockwise? rotateButtonStack.selectedChild = antiClockwiseBox : rotateButtonStack.selectedChild = clockwiseBox;
                     } else {
                         rotateButtonStack.selectedChild = arrowBoxWrapper;
-                        // reset and reposition back to the starting point relative to its parent
-                        rotate.end();
-                        angle = 0;
-                        rotate.play();
-                        arrowBox.x = 0;
-                        arrowBox.y = 0;
-
-                        // move
-                        rotate.end();
-                        angle = w.angle;
-                        rotate.play();
+                        arrow.iconDisplay.rotation=w.angle;
+                                               arrow.iconDisplay.smooth=true;
                     }
                 }
             }
 
 
        ]]>
-</mx:Script>   
+</fx:Script>
 </mx:Panel>
index e17c8837c56f62aa9857b15009de572fd486f11a..90133108e1c89306c103793dc6f92603049fddf5 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-        xmlns:mx="http://www.adobe.com/2006/mxml" 
+        xmlns:fx="http://ns.adobe.com/mxml/2009"
+        xmlns:mx="library://ns.adobe.com/flex/mx"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" title="Load vector file"
         width="500" height="350" verticalGap="0">
            <mx:columns>
                <mx:DataGridColumn editable="false" dataField="visible" headerText="Show?" width="45">
                                <mx:itemRenderer>
-                                       <mx:Component>
+                                       <fx:Component>
                                                <mx:CheckBox selectedField="isSelected"
                                                                         click="data.isSelected=!data.isSelected; this.parent.parent.dispatchEvent(new Event('visibility_changed'));" 
                                                                         paddingLeft="5"/>
-                                       </mx:Component>
+                                       </fx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
                <mx:DataGridColumn editable="false" dataField="interactive" headerText="Select?" width="45">
                                        <!-- There should really be a way to hide this for the editable layer. See
                                             http://stackoverflow.com/questions/6329895/how-do-i-change-the-style-of-one-individual-cell-in-a-flex-datagrid 
                                             Leave it as a FIXME until we move to Flex 4 -->
-                                       <mx:Component>
+                                       <fx:Component>
                                                <mx:CheckBox selectedField="isInteractive"
                                                                         click="data.isInteractive=!data.isInteractive; this.parent.parent.dispatchEvent(new Event('interactive_changed'));" 
                                                             paddingLeft="5"/>
-                                       </mx:Component>
+                                       </fx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
                <mx:DataGridColumn editable="true"  dataField="name"  headerText="Name"/>
                <mx:DataGridColumn editable="false" dataField="url"   headerText="URL"/>
                <mx:DataGridColumn editable="false" dataField="style" headerText="Style">
                                <mx:itemRenderer>
-                                       <mx:Component>
+                                       <fx:Component>
                                        <mx:ComboBox
                                                        selectedItem="{outerDocument.whichStyle(data)}"
                                                change="outerDocument.styleEdited(data.name,selectedItem.url)"
                                                dataProvider="{outerDocument.styles}" 
                                                        labelField="name" />
-                                       </mx:Component>
+                                       </fx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
            </mx:columns>
@@ -61,9 +62,9 @@
                        <mx:Label text="Shapefile projection:" />
                        <mx:ComboBox id="projection"> 
                                <mx:ArrayCollection>
-                                       <mx:Object label="Lat/long" data="" />
-                                       <mx:Object label="Ordnance Survey GB" data="EPSG:27700" />
-                                       <mx:Object label="NAD83" data="EPSG:4269" />
+                                       <fx:Object label="Lat/long" data="" />
+                                       <fx:Object label="Ordnance Survey GB" data="EPSG:27700" />
+                                       <fx:Object label="NAD83" data="EPSG:4269" />
                                </mx:ArrayCollection>
                        </mx:ComboBox>
                        <mx:CheckBox width="100%" label="Simplify paths" selected="true" id="simplify" />
@@ -75,7 +76,7 @@
                </mx:HBox>
        </mx:VBox>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
        import net.systemeD.halcyon.Map;
        import net.systemeD.halcyon.MapPaint;
@@ -91,6 +92,7 @@
     import mx.events.DataGridEvent;
     import mx.events.CloseEvent;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
        import mx.collections.ArrayCollection;
        import mx.controls.Alert;
 
 
 
     public function init():void {
-        PopUpManager.addPopUp(this, Application(Application.application), true);
+        PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, vectorDialog_close);
                dataGrid.addEventListener("visibility_changed", toggleVisibility);
        }
 
               ]]>
-  </mx:Script>
+  </fx:Script>
 </mx:TitleWindow>
index 653dfe605e61a5579eb827c49624cd6f58d1bdc2..887aa9947936b16a51252d79816dcfe8f7a8397a 100644 (file)
@@ -1,12 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        layout="vertical" showCloseButton="true"
        horizontalAlign="center" title="Search"
        width="458" height="350" verticalGap="0" creationComplete="txtFind.setFocus()">
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
         import flash.events.Event;
                import mx.core.Application;
+               import mx.core.FlexGlobals;
                import mx.events.CloseEvent;
                import mx.events.FlexEvent;
                import mx.managers.PopUpManager;
@@ -27,7 +29,7 @@
                                
                
                public function init():void {
-                       PopUpManager.addPopUp(this, Application(Application.application), true);
+                       PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
                        PopUpManager.centerPopUp(this);
                        this.addEventListener(CloseEvent.CLOSE, findDialog_close);
                        
         }
         
         private function goToSelected():void {
-            Application.application.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
-            //Application.application.theMap.redraw();            
+            FlexGlobals.topLevelApplication.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
+            //FlexGlobals.topLevelApplication.theMap.redraw();
             PopUpManager.removePopUp(this);
         }
         
         
        ]]>
-       </mx:Script>
+       </fx:Script>
 
        <mx:HBox horizontalAlign="left" width="100%">
                <mx:Label text="Enter place name: " />
index 30daaeab20fe265eee5571fe63f467483a298d94..f9abf0fdc6770018a1d8ed33b1d92fa17c77ab68 100644 (file)
@@ -1,19 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-        xmlns:mx="http://www.adobe.com/2006/mxml"
+        xmlns:fx="http://ns.adobe.com/mxml/2009"
+        xmlns:mx="library://ns.adobe.com/flex/mx"
         xmlns:help="net.systemeD.potlatch2.help.*"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" title="{getTitleText()}"
         width="660" height="500"
         verticalGap="0">
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
     import mx.managers.PopUpManager;
     import mx.events.CloseEvent;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
+
+       [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
 
     /** Pops up a multi-tabbed help window in the middle of the screen, then remembers that the user has seen it. */
     public function init():void {
-        PopUpManager.addPopUp(this, Application(Application.application), true);
+        PopUpManager.addPopUp(this, Application(application), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, helpDialog_close);
 
     }
 
               ]]>
-  </mx:Script>
+  </fx:Script>
   <mx:TabNavigator id="helpTN" width="100%" height="100%" styleName="helpTN" creationPolicy="all">
     <mx:VBox label="Welcome" id="welcome" width="100%" height="100%">
       <mx:Grid width="100%"><!-- prepare for a column of icons, at some point -->
   </mx:TabNavigator>
 
   <mx:ControlBar>
-    <mx:Label text="Version: {Application.application.version} Build: {Application.application.build_number}" />
+    <mx:Label text="Version: {application.version} Build: {application.build_number}" />
     <mx:Spacer width="100%"/>
     <mx:Button label="Ok" click="PopUpManager.removePopUp(this);" styleName="titleWindowButton" />
   </mx:ControlBar>
index fdb6f89e5f907da671dcc9fca21d216ce5a27e06..0a1b08ef1c07b9bfdd3b3c2cbd9d2126f66d920a 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0">
+<mx:VBox
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    verticalGap="0">
        <mx:ViewStack id="videoStack" width="100%" height="100%">
                <mx:Box id="previewContainer">
                        <mx:Image id="preview" width="100%" height="100%" source="{previewImage}" 
@@ -22,7 +25,7 @@
                        thumbRelease="progressThumbRelease(event);" />
        </mx:HBox> 
 
-       <mx:Script> 
+       <fx:Script>
                <![CDATA[ 
 
                        /** VideoPlayer component for P2 help dialog.
@@ -38,8 +41,6 @@
                                the user actually wants it.)
                        */
 
-                       import mx.events.VideoEvent;
-
                        [Bindable] public var file:String;
                        [Bindable] public var previewImage:String; 
                        private var wasPlaying:Boolean;
@@ -84,5 +85,5 @@
                        }
 
                ]]> 
-       </mx:Script>
+       </fx:Script>
 </mx:VBox>
index af09546fede8aa1a54dba4618b5f2c2c5562de0a..077492533f4356e47d4266444250dd7d85026711 100644 (file)
@@ -34,14 +34,15 @@ package net.systemeD.potlatch2.mapfeatures {
         }
 
         /** Translates a priority string ("highest") to a const (PRIORITY_HIGHEST). */
-        public static function getPriority(priority:String):uint {
+        public function getPriority(priority:String):uint {
+                       var base:uint=subcategory ? 0 : 11;
             switch ( priority ) {
-            case "highest": return PRIORITY_HIGHEST;
-            case "high": return PRIORITY_HIGHEST;
-            case "normal": return PRIORITY_NORMAL;
-            case "low": return PRIORITY_LOW;
-            case "lowest": return PRIORITY_LOWEST;
-            default: return PRIORITY_NORMAL;
+            case "highest": return PRIORITY_HIGHEST+base;
+            case "high": return PRIORITY_HIGH+base;
+            case "normal": return PRIORITY_NORMAL+base;
+            case "low": return PRIORITY_LOW+base;
+            case "lowest": return PRIORITY_LOWEST+base;
+            default: return PRIORITY_NORMAL+base;
             }
         }
 
@@ -54,6 +55,9 @@ package net.systemeD.potlatch2.mapfeatures {
         /** Default category: "Standard" */
         public var category:String = "Standard";
 
+        /** Optional subcategory (rendered as a collapsible panel) */
+        public var subcategory:String;
+
         private var _name:String;
         private var _description:String;
 
@@ -62,6 +66,7 @@ package net.systemeD.potlatch2.mapfeatures {
             _name = String(inputXML.@name);
             _description = String(inputXML.@description);
             category = String(inputXML.@category);
+            subcategory = String(inputXML.@subcategory);
         }
 
         /** Whether the tags on an entity correspond to those for the edit control. By default, returns true - must be overriden by more useful behaviour. */
index beb69ffaa88fc46e423109fa376a1cd93d4463d7..d02c1195bd9f7d70ee671c96d0dc6c8db4010529 100644 (file)
@@ -8,6 +8,7 @@ package net.systemeD.potlatch2.mapfeatures {
     import mx.core.BitmapAsset;
     import mx.graphics.codec.PNGEncoder;
     
+    import net.systemeD.halcyon.ImageBank;
     import net.systemeD.halcyon.connection.Entity;
     import net.systemeD.potlatch2.utils.CachedDataLoader;
 
@@ -67,8 +68,12 @@ package net.systemeD.potlatch2.mapfeatures {
 
             for each(var inputSetRef:XML in xml.inputSet) {
                 var setName:String = String(inputSetRef.@ref);
-                for each (inputXML in mapFeatures.definition.inputSet.(@id==setName)) {
-                    addEditors(inputXML);
+                // Go on then, someone tell me why this stopped working. Namespaces?:
+                //for each (inputXML in mapFeatures.definition.inputSet.(@id == setName)) {
+                for each (inputXML in mapFeatures.definition.inputSet) {
+                    if (inputXML.@id == setName) {
+                        addEditors(inputXML);
+                    }
                 }
             }
 
@@ -84,7 +89,7 @@ package net.systemeD.potlatch2.mapfeatures {
             var editor:EditorFactory = EditorFactory.createFactory(inputType, inputXML);
             if ( editor != null ) {
                 editor.presence = Presence.getPresence(presenceStr);
-                editor.sortOrder = EditorFactory.getPriority(sortOrderStr);
+                editor.sortOrder = editor.getPriority(sortOrderStr);
                 _editors.push(editor);
             }
         }
@@ -134,8 +139,7 @@ package net.systemeD.potlatch2.mapfeatures {
         * @param dnd if true, overrides the normal image and returns the one defined by the dnd property instead. */
         private function getImage(dnd:Boolean = false):ByteArray {
             var icon:XMLList = _xml.icon;
-            var imageURL:String = null;
-            var img:ByteArray;
+            var imageURL:String;
 
             if ( dnd && icon.length() > 0 && icon[0].hasOwnProperty("@dnd") ) {
                 imageURL = icon[0].@dnd;
@@ -143,11 +147,12 @@ package net.systemeD.potlatch2.mapfeatures {
                 imageURL = icon[0].@image;
             }
 
-            if ( imageURL != null ) {
-                img = CachedDataLoader.loadData(imageURL, imageLoaded);
-            }
-            if (img) {
-              return img;
+            if ( imageURL ) {
+                               if (ImageBank.getInstance().hasImage(imageURL)) {
+                                       return ImageBank.getInstance().getAsByteArray(imageURL)
+                               } else {
+                       return CachedDataLoader.loadData(imageURL, imageLoaded);
+                               }
             }
             var bitmap:BitmapAsset = new missingIconCls() as BitmapAsset;
             return new PNGEncoder().encode(bitmap.bitmapData);
index 007f63457c42fd49b9feeb2050b6ff43a8289b45..66b997b416bf563f0dbdea20b21d1636a749e31e 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        verticalGap="0"
@@ -13,7 +14,7 @@
                                 labelPlacement="right" label=""
                                 change="value=toYesNo()" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
   
        protected function initCheckbox():void {
                // ** FIXME - these should really be bindings (selected="{...}"). 
@@ -44,6 +45,6 @@
                return inputBox.selected ? 'yes':'no';
        }
        
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index ed1a372b2c7ed3d7338a31eef12c9a35428fde68..9798a704df5d9fae6541b2a2bd507515fa19f250 100644 (file)
@@ -18,7 +18,7 @@ package net.systemeD.potlatch2.mapfeatures.editors {
                 if ( !textInputReplacement ) {
                         if ( itemRenderer != null ) {
                                 //remove the default textInput
-                                removeChild(textInput);
+                                removeChild(TextInput(textInput));
 
                                 //create a new itemRenderer to use in place of the text input
                                 textInputReplacement = itemRenderer.newInstance();
@@ -36,16 +36,16 @@ package net.systemeD.potlatch2.mapfeatures.editors {
             if ( textInputReplacement ) {
                 IDataRenderer(textInputReplacement).data = selectedItem;
 
-                var arrowWidth:Number = getStyle("arrowButtonWidth");\r
-                var itemHeight:Number = textInputReplacement.getExplicitOrMeasuredHeight();\r
-                var itemWidth:Number = textInputReplacement.getExplicitOrMeasuredWidth();\r
-\r
-                if (isNaN(arrowWidth))\r
-                    arrowWidth = 0;\r
+                var arrowWidth:Number = getStyle("arrowButtonWidth");
+                var itemHeight:Number = textInputReplacement.getExplicitOrMeasuredHeight();
+                var itemWidth:Number = textInputReplacement.getExplicitOrMeasuredWidth();
+
+                if (isNaN(arrowWidth))
+                    arrowWidth = 0;
 
                 var bm:EdgeMetrics = borderMetrics;
 
-                textInputReplacement.setActualSize(unscaledWidth - arrowWidth, itemHeight);\r
+                textInputReplacement.setActualSize(unscaledWidth - arrowWidth, itemHeight);
                 textInputReplacement.move(bm.left, bm.top);
             }
         }
@@ -57,21 +57,21 @@ package net.systemeD.potlatch2.mapfeatures.editors {
                 IDataRenderer(textInputReplacement).data = selectedItem;
                 var prefSize:Object = calculatePreferredSizeFromData(collection.length);
 
-                var arrowWidth:Number = getStyle("arrowButtonWidth");\r
-                var itemHeight:Number = textInputReplacement.getExplicitOrMeasuredHeight();\r
-                var itemWidth:Number = textInputReplacement.getExplicitOrMeasuredWidth();\r
-\r
-                if (isNaN(arrowWidth))\r
-                    arrowWidth = 0;\r
+                var arrowWidth:Number = getStyle("arrowButtonWidth");
+                var itemHeight:Number = textInputReplacement.getExplicitOrMeasuredHeight();
+                var itemWidth:Number = textInputReplacement.getExplicitOrMeasuredWidth();
+
+                if (isNaN(arrowWidth))
+                    arrowWidth = 0;
 
                 var bm:EdgeMetrics = borderMetrics;
-                itemHeight += bm.top + bm.bottom;\r
+                itemHeight += bm.top + bm.bottom;
                 itemWidth += bm.left + bm.right + arrowWidth + 8;
                 prefSize.height += bm.top + bm.bottom;
-                prefSize.width += bm.left + bm.right + arrowWidth + 8;\r
+                prefSize.width += bm.left + bm.right + arrowWidth + 8;
 
-                measuredMinHeight = measuredHeight = Math.max(prefSize.height, itemHeight);\r
-                measuredMinWidth = measuredWidth = Math.max(prefSize.width, itemWidth);\r
+                measuredMinHeight = measuredHeight = Math.max(prefSize.height, itemHeight);
+                measuredMinWidth = measuredWidth = Math.max(prefSize.width, itemWidth);
             }
         }
 
@@ -87,8 +87,8 @@ package net.systemeD.potlatch2.mapfeatures.editors {
                 IDataRenderer(test).data = collection[i];
                 test.validateDisplayList();
                 test.validateSize(true);
-                maxWidth = Math.max(maxWidth, test.getExplicitOrMeasuredWidth());\r
-                maxHeight = Math.max(maxHeight, test.getExplicitOrMeasuredHeight());\r
+                maxWidth = Math.max(maxWidth, test.getExplicitOrMeasuredWidth());
+                maxHeight = Math.max(maxHeight, test.getExplicitOrMeasuredHeight());
             }
             removeChild(test);
             return {width: maxWidth, height: maxHeight};
index e75eb5e7890a4f385414514e21454dcf94af4366..cd7489d79567bf6da705d8b40d15e7278b60149f 100644 (file)
@@ -1,25 +1,32 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
+       xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        toolTip="{fieldDescription}"
     direction="{fieldDirection}" styleName="titledEditor">
 
   <mx:Label text="{fieldName}:"/>
-  <edit:ChoiceComboBox id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}" rowCount="15"
-      change="value = inputBox.selectedItem.value"
-      open="inputBox.dropdown.variableRowHeight = true">
-      <edit:itemRenderer>
-        <mx:Component>
+  <s:DropDownList id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}"
+      change="value = inputBox.selectedItem.value" labelField="label">
+      <s:itemRenderer>
+        <fx:Component>
         <mx:HBox toolTip="{data.description}" horizontalScrollPolicy="off">
           <mx:Image source="{Choice(data).icon}"/>
-          <mx:Label htmlText="{data.label}"/>
+          <mx:Label htmlText="{getStyledLabel(Choice(data))}"/>
+                       <fx:Script><![CDATA[
+                             public function getStyledLabel(choice:Choice):String {
+                                 if (choice.value==null) return "<font color='#a0a0a0'><i>"+choice.label+"</i></font>";
+                                 return choice.label;
+                                 }
+                       ]]></fx:Script>
         </mx:HBox>
-        </mx:Component>
-      </edit:itemRenderer>
-  </edit:ChoiceComboBox>
+        </fx:Component>
+      </s:itemRenderer>
+  </s:DropDownList>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
       import mx.collections.*;
       import mx.utils.*;
       import net.systemeD.potlatch2.mapfeatures.Feature;
 
       [Bindable(event="factory_set")]
       protected function get choices():ArrayCollection {
+          var dummy:String=_factory.key;               // otherwise _factory is null, for some not yet discovered reason.
           if ( _choices == null ) {
               _choices = new ArrayCollection();
-              for each ( var choice:Choice in ChoiceEditorFactory(_factory).choices )
+              for each ( var choice:Choice in ChoiceEditorFactory(_factory).choices ) {
                   _choices.addItem(choice);
+              }
               _choices.addItem(createUnsetChoice());
           }
           return _choices;
           
           return _unknownChoice;
       }
-      
+
       private function createUnsetChoice():Choice {
           var choice:Choice = new Choice();
           choice.icon = null;
           choice.description = "Field not set";
-          choice.label = "<font color='#a0a0a0'><i>Unset</i></font>";
+          choice.label = "Unset";
           choice.value = null;
           return choice;
       }
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index 3b221ce0c730b38d6265a9fba28257e3285b4158..6beaa3d478e4f8296b8d7e0bd38ecc6ea11984f9 100644 (file)
@@ -9,7 +9,7 @@ package net.systemeD.potlatch2.mapfeatures.editors {
            public var choices:Array;
         
         public function ChoiceEditorFactory(inputXML:XML) {
-            super(inputXML);
+            super(inputXML,"horizontal");
             
             choices = [];
             for each( var choiceXML:XML in inputXML.choice ) {
index a7b142ec31a9ca2090c0c2f3824b2df23a329262..08ed76e89aec9c188dae89c0fd61c0618858b8a9 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        xmlns:controls="net.systemeD.controls.*"
       focusOut="value = inputBox.text" enter="value = inputBox.text"
       restrict="&#x0020;-&#x10FFFF;" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
   
       [Bindable(event="factory_set")]
       protected function get prompt():String {
           return _factory == null ? null : FreeTextEditorFactory(_factory).notPresentText;
       }
       
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index dc1c3b93aec59aa3f5d7a3c970da9077a85aa0e2..80b72096851cb2180f76eda606ee84cea63c0fd8 100644 (file)
@@ -8,7 +8,7 @@ package net.systemeD.potlatch2.mapfeatures.editors {
            private var _notPresentText:String;
         
         public function FreeTextEditorFactory(inputXML:XML) {
-            super(inputXML);
+            super(inputXML,"horizontal");
             _notPresentText = inputXML.hasOwnProperty("@absenceText") ? String(inputXML.@absenceText) : "Unset";
         }
         
index e35e41917b8a7f19383fb22674274e18e0ac022e..ecf87611213e51af28cf10a03ac101b92079a154 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        verticalGap="0"
@@ -22,7 +23,7 @@
         <mx:Label text="{warning}" visible="{!isValueValid}" includeInLayout="{!isValueValid}" styleName="warningText" />
     </mx:HBox>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
     [Bindable(event="factory_set")]
     protected function get prompt():String {
         return _factory == null ? null : NumberEditorFactory(_factory).notPresentText;
@@ -81,6 +82,6 @@
         value = null;
     }
        
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index b0751864ec950a83aec30dffb69fdf4a8869062a..868e5ac0228652fa671b41bfe34892262be9611f 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:Canvas
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        width="50" height="50" maxWidth="50" maxHeight="50" minWidth="50" minHeight="50"
        toolTip="{data.description}" enabled="{data.value != null}"
index 53e9ad668e06bb966db573968fffaf8271a9a905..cfd4a9c0a8f9117b8bb3859d40337bb90ca15d31 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:RelationMemberEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        verticalGap="0"
@@ -12,7 +13,7 @@
   <mx:VBox verticalGap="0" width="100%" id="routeIcons"/>
   <mx:LinkButton label="Add to a route" click="addToRelation()" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.potlatch2.*;
     import mx.managers.PopUpManager;
@@ -33,7 +34,7 @@
     public function routeClicked(event:Event):void {
         var relation:Object = RouteIcon(event.currentTarget).route;
         var panel:RelationEditorPanel = RelationEditorPanel(
-            PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+            PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
         panel.setRelation(relation["relation"]);
         PopUpManager.centerPopUp(panel);
     }
@@ -42,6 +43,6 @@
                new RelationSelectPanel().init(_entity, _factory.relationTagPatterns);        
        }
     
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:RelationMemberEditor>
 
index 7ab0003d6388c279d5d4aab1d903a0e5d19ddde3..1c07c094103beb0baf5d3cb049e9d88d057c5a16 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:HBox
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        borderStyle="inset" verticalAlign="middle" width="100%" paddingLeft="3"
@@ -14,7 +15,7 @@
        <mx:Image source="@Embed('../../../../../embedded/delete.svg')" click='event.stopPropagation();removeFromRelation()'
         buttonMode="true" useHandCursor="true" />
     
-    <mx:Script><![CDATA[
+    <fx:Script><![CDATA[
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.halcyon.styleparser.RuleSet;
     import net.systemeD.potlatch2.mapfeatures.*;
@@ -97,6 +98,6 @@
                Relation(_route["relation"]).removeMember(_route["entity"], MainUndoStack.getGlobalStack().addAction);
        }
     
-    ]]></mx:Script>
+    ]]></fx:Script>
 </mx:HBox>
 
index 05df6c9c58dca4e70578367104cedf9290304f7c..2638b115df2d7f2825ba521b54f1833d36ee95f5 100644 (file)
@@ -8,10 +8,11 @@ package net.systemeD.potlatch2.mapfeatures.editors {
            private var tagKey:String;
                private var boxDirection:String;
         
-        public function SingleTagEditorFactory(inputXML:XML) {
+        public function SingleTagEditorFactory(inputXML:XML, defaultLayout:String="vertical") {
             super(inputXML);
             tagKey = inputXML.@key;
-                       boxDirection = inputXML.@layout=='horizontal' ? 'horizontal' : 'vertical';
+                       boxDirection = inputXML.@layout;
+                       if (!boxDirection) { boxDirection=defaultLayout; }
         }
         
         override public function areTagsMatching(entity:Entity):Boolean {
index 7b06ea4f1c828899318013b112286d75c59c5294..e878850be5bbf988b146c9a56865381fff5894a2 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        verticalGap="0"
@@ -18,7 +19,7 @@
                  liveDragging="true"
                                 change="setTagValueFromSlider()" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
     private function setTagValueFromSlider():void {
         // unset the tag if being set to the default
@@ -79,6 +80,6 @@
         return parsed;
     }
        
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index 4471672e575b29e278befb10a52e05b0ebcfe04f..de780161a0e2e65ff635c9aa76cab4266f0dd81c 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:SingleTagEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        toolTip="{fieldDescription}"
        direction="horizontal" styleName="titledEditor">
@@ -14,7 +15,7 @@
       fontWeight="normal">
   </edit:ChoiceComboBox>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
       import mx.collections.*;
       import mx.utils.*;
       import net.systemeD.potlatch2.mapfeatures.Feature;
@@ -65,6 +66,6 @@
           choice.value = null;
           return choice;
       }
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:SingleTagEditor>
 
index 69b97026c700dec6e6b09345eb2476f3bd72b5d6..27c7f2f3b701288e3c2b75f6d0da529bdc3a1a0c 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <edit:RelationMemberEditor
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        verticalGap="0"
@@ -12,7 +13,7 @@
   <mx:VBox verticalGap="0" width="100%" id="turnRestrictionIcons"/>
   <mx:LinkButton label="Add new turn restriction" click="addNewTurnRestriction()" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
        import net.systemeD.halcyon.connection.*;
        import net.systemeD.potlatch2.*;
        import mx.core.*;
@@ -37,6 +38,6 @@
                addTurnRestrictions();
        }
        
-  ]]></mx:Script>
+  ]]></fx:Script>
 </edit:RelationMemberEditor>
 
index 11465a4a692b104c97e05497ccf64a7301eed413..fd632522130353f56ae1e421edc8f4c5f5a240d9 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:HBox
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        xmlns:flexlib="flexlib.controls.*"
        horizontalScrollPolicy="off"
                                            dropdownWidth="162" rowCount="2"
                                            fontWeight="normal">
                                        <mx:ArrayCollection id="restrictionTypes">
-                                               <mx:Object label="No left turn" data='no_left_turn' />
-                                               <mx:Object label="No right turn" data='no_right_turn' />
-                                               <mx:Object label="No U turns" data='no_u_turn' />
-                                               <mx:Object label="No straight on" data='no_straight_on' />
-                                               <mx:Object label="Left turn only" data='only_left_turn' />
-                                               <mx:Object label="Right turn only" data='only_right_turn' />
-                                               <mx:Object label="Straight on only" data='only_straight_on' />
+                                               <fx:Object label="No left turn" data='no_left_turn' />
+                                               <fx:Object label="No right turn" data='no_right_turn' />
+                                               <fx:Object label="No U turns" data='no_u_turn' />
+                                               <fx:Object label="No straight on" data='no_straight_on' />
+                                               <fx:Object label="Left turn only" data='only_left_turn' />
+                                               <fx:Object label="Right turn only" data='only_right_turn' />
+                                               <fx:Object label="Straight on only" data='only_straight_on' />
                                        </mx:ArrayCollection>
                                </edit:ChoiceComboBox>
                                </mx:GridItem>
@@ -57,7 +58,7 @@
        </mx:HBox>
        </mx:VBox>
 
-    <mx:Script><![CDATA[
+    <fx:Script><![CDATA[
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.halcyon.styleparser.RuleSet;
     import net.systemeD.potlatch2.RelationEditorPanel;
@@ -69,6 +70,7 @@
     import mx.collections.ArrayCollection;
        import mx.utils.ObjectProxy;
        import mx.core.Application;
+       import mx.core.FlexGlobals;
        import mx.managers.PopUpManager;
 
     private var _turn:Object;
        public function openAdvanced():void {
                var rel:Relation=Relation(_turn.relation);
                var panel:RelationEditorPanel = RelationEditorPanel(
-                       PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+                       PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
                panel.setRelation(rel);
                PopUpManager.centerPopUp(panel);
        }
                var to:Object  =findSelected('to'  ); if (to  ) { paint.setHighlight(to.data  , { restrictto: bool   } ); }
        }
     
-    ]]></mx:Script>
+    ]]></fx:Script>
 </mx:HBox>
 
index 50bf47794d08658765f9ad3cb129cf00a9a1268e..7687a2678a9df3bb18936d3e0a1770cb1dd420a7 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:Canvas
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
        width="40" height="40" maxWidth="40" maxHeight="40" minWidth="40" minHeight="40"
        mouseEnabled="false" mouseChildren="false">
 
        <mx:Image x="0" y="0" id="sign" left="4" top="4" source="{dataProxied.data ? 'features/restriction__'+dataProxied.data+'.png' : ''}" toolTip="{dataProxied.label}" />
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
        import mx.utils.ObjectProxy;
 
@@ -15,7 +16,7 @@
                return new ObjectProxy(data);
        }
 
-  ]]></mx:Script>
+  ]]></fx:Script>
        
 </mx:Canvas>
 
index f7120ded56c9f50ab416abdb7b67ab93d75aeef1..ec57b37f5e190ced693c7f778a5be55b0c65ffdc 100644 (file)
@@ -1,14 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-        xmlns:mx="http://www.adobe.com/2006/mxml"
+        xmlns:fx="http://ns.adobe.com/mxml/2009"
+        xmlns:mx="library://ns.adobe.com/flex/mx"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" title="MyGpx Files"
         width="600" height="400"
         verticalGap="0">
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
     import mx.managers.PopUpManager;
     import mx.events.CloseEvent;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
 
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.potlatch2.save.*;
@@ -22,7 +24,7 @@
     private var conn:Connection;
 
     public function init():void {
-        PopUpManager.addPopUp(this, Application(Application.application), true);
+        PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, myGpxDialog_close);
 
@@ -50,7 +52,7 @@
     }
 
     [Bindable(event="traces_loaded")]
-    private function get traces():Array {
+    private function get traces():Vector.<Trace> {
         return conn.getTraces();
     }
 
@@ -66,7 +68,7 @@
         }
     }
               ]]>
-  </mx:Script>
+  </fx:Script>
 
   <mx:Text text="Traces" id="results" />
   <mx:DataGrid dataProvider="{traces}" width="100%" height="100%" id="traceGrid">
             <mx:DataGridColumn editable="false" dataField="tagsText" headerText="tags"/>
             <mx:DataGridColumn editable="false">
               <mx:itemRenderer>
-                <mx:Component>
+                <fx:Component>
                   <mx:VBox>
                     <mx:Button label="Load"
                       click="parentDocument.loadFile(data)"/>
                   </mx:VBox>
-                </mx:Component>
+                </fx:Component>
               </mx:itemRenderer>
             </mx:DataGridColumn>
     </mx:columns>
index c98cab8d051e7f970dcf6cf00651e1d68b536244..28a092c9aaa1187b3ad99d8c8679a59132fac7d3 100644 (file)
@@ -1,29 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-        xmlns:mx="http://www.adobe.com/2006/mxml" 
+        xmlns:fx="http://ns.adobe.com/mxml/2009"
+        xmlns:mx="library://ns.adobe.com/flex/mx"
         layout="vertical" showCloseButton="true"
         horizontalAlign="center" title="Options"
         width="350" height="250" verticalGap="0">
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
     import mx.managers.PopUpManager;
     import mx.events.CloseEvent;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
     import net.systemeD.halcyon.Globals;
     import net.systemeD.halcyon.Map;
     import net.systemeD.halcyon.connection.Connection;
     import net.systemeD.halcyon.connection.StatusFetcher;
     
     public function init():void {
-        PopUpManager.addPopUp(this, Application(Application.application), true);
+        PopUpManager.addPopUp(this, Application(FlexGlobals.topLevelApplication), true);
         PopUpManager.centerPopUp(this);
         this.addEventListener(CloseEvent.CLOSE, optionsDialog_close);
 
         var obj:SharedObject = SharedObject.getLocal("user_state");
 
-        tbcheck.selected = Application.application.toolbox.visible;
-        cursorcheck.selected = Application.application.theController.cursorsEnabled;
+        tbcheck.selected = FlexGlobals.topLevelApplication.toolbox.visible;
+        cursorcheck.selected = FlexGlobals.topLevelApplication.theController.cursorsEnabled;
         tigercheck.selected = obj.data['tiger_highlighted'];
-        latlongcheck.selected = Application.application.coordsbox.visible;
+        latlongcheck.selected = FlexGlobals.topLevelApplication.coordsbox.visible;
                licencecheck.selected = Map(Globals.vars.root).editableLayer.connection.statusFetcher!=null;
     }
     
@@ -33,7 +35,7 @@
 
     private function tigerToggle():void {
         Globals.vars.highlightTiger = tigercheck.selected;
-        Application.application.theMap.redraw();
+        FlexGlobals.topLevelApplication.theMap.redraw();
 
         var obj:SharedObject = SharedObject.getLocal("user_state");
         obj.setProperty("tiger_highlighted",tigercheck.selected);
        }
 
               ]]>
-  </mx:Script>
+  </fx:Script>
        <mx:CheckBox width="100%" label="Show toolbox" selected="true" id="tbcheck"
-           change="Application.application.toolbox.toggle()" />
+           change="FlexGlobals.topLevelApplication.toolbox.toggle()" />
 
        <mx:CheckBox width="100%" label="Use custom cursors" selected="true" id="cursorcheck"
-           change="Application.application.theController.cursorsEnabled=cursorcheck.selected" />
+           change="FlexGlobals.topLevelApplication.theController.cursorsEnabled=cursorcheck.selected" />
 
     <mx:CheckBox width="100%" label="Highlight unedited TIGER (US roads)" selected="false" id="tigercheck"
         change="tigerToggle()" />
 
        <mx:CheckBox width="100%" label="Show mouse latitude/longitude" selected="false" id="latlongcheck" 
-               change="Application.application.coordsbox.visible=latlongcheck.selected" />
+               change="FlexGlobals.topLevelApplication.coordsbox.visible=latlongcheck.selected" />
 
     <mx:CheckBox width="100%" label="Show licence status" selected="false" id="licencecheck"
         change="licenceToggle()" />
index 982feb2425862041f1fc456c776b9c1498cc89dc..9030a8bd6378695cd170fe47128e57a169fbfa12 100644 (file)
@@ -4,7 +4,10 @@
     Background Panel
 -->
 
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" height="100%">
+<mx:VBox
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    height="100%">
   <mx:Text id="backgroundPanelText" text="You have selected a Background Feature." width="100%" styleName="helpInfo" />
   <mx:DataGrid editable="false" id="backgroundPanelDG" width="100%" height="50%">
     <mx:columns>
@@ -14,7 +17,7 @@
   </mx:DataGrid>
   <mx:Text text="All the data copied to the main layer? Click 'complete'!" />
   <mx:Button label="Complete" click="markComplete()"/>
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.halcyon.MapPaint;
@@ -50,5 +53,5 @@
             }
       }
       ]]>
-  </mx:Script>
+  </fx:Script>
 </mx:VBox>
\ No newline at end of file
index 0f606d2c933225522b81e0e5cdd0168b955dd333..c13b496498b74a0965c72b32573bdde49d2166b2 100644 (file)
@@ -4,7 +4,11 @@
     Bug Panel
 -->
 
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" height="100%" paddingTop="10">
+<mx:VBox
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    height="100%"
+    paddingTop="10">
   <mx:HBox>
     <mx:Image source="{bugImage}" width="32" height="32" />
     <mx:Text text="{bugTitle}" fontWeight="bold" fontSize="18" />
@@ -56,7 +60,7 @@
     </mx:VBox>
   </mx:ViewStack>
 
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.potlatch2.BugConnection;
       }
 
       ]]>
-  </mx:Script>
+  </fx:Script>
 </mx:VBox>
\ No newline at end of file
index 2ab42b3d5d7624414d56bf135e4a1ad390f56995..3a42b7576396feeb662b2b0b8b5a4158e8e6dd55 100644 (file)
@@ -4,7 +4,10 @@
     Marker Panel
 -->
 
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" height="100%">
+<mx:VBox
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+    xmlns:mx="library://ns.adobe.com/flex/mx"
+    height="100%">
   <mx:Text id="markerPanelText" text="You have selected a marker." width="100%" styleName="helpInfo" />
   <mx:DataGrid editable="false" id="markerPanelDG" width="100%" height="50%">
     <mx:columns>
@@ -12,7 +15,7 @@
       <mx:DataGridColumn editable="false" dataField="value" headerText="value" />
     </mx:columns>
   </mx:DataGrid>
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.halcyon.MapPaint;
@@ -41,5 +44,5 @@
             for each(var tag:Tag in tags) { tagDataProvider.addItem(tag); }
       }
       ]]>
-  </mx:Script>
+  </fx:Script>
 </mx:VBox>
\ No newline at end of file
index f972f927ffa220c0ef0a881d4e24e473394715a0..cf5f66369232512216e87104ca83d93becf71db2 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        layout="vertical"
        horizontalAlign="center" title="Authorisation Required"
        creationComplete="getRequestToken()"
@@ -66,7 +67,7 @@
            <mx:Button id="tryAccessButton" label="Try Access" click="getAccessToken()" enabled="false" styleName="titleWindowButton" />
        </mx:ControlBar>
        
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
                import flash.display.InteractiveObject;
         import flash.events.Event;
         import flash.net.*;
                        getAccessToken();
                }
         
-       ]]></mx:Script>
+       ]]></fx:Script>
 </mx:TitleWindow>
 
index 676c446cd7c05b7fa6493415265ff6a1af291755..510d01f4d19d43df2f077b34ab9c0a23a24e606f 100644 (file)
@@ -1,15 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <mx:TitleWindow
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
        layout="vertical"
        horizontalAlign="center" title="Save Changes"
        width="350" height="330" verticalGap="0">
 
+  <fx:Declarations>
   <mx:ArrayCollection id="changesetTags">
-    <mx:Object k="created_by" v="Potlatch 2"/>
-    <mx:Object k="version" v="{Application.application.version}"/>
-    <mx:Object k="build" v="{Application.application.build_number}"/>
+    <fx:Object k="created_by" v="Potlatch 2"/>
+    <fx:Object k="version" v="{application.version}"/>
+    <fx:Object k="build" v="{application.build_number}"/>
   </mx:ArrayCollection>
+  </fx:Declarations>
   
   <mx:ViewStack id="processSequence" width="100%" height="100%" 
       creationPolicy="all" creationComplete="if (doSkip) skipInput() else comment.setFocus()">
               itemEditEnd="verifyInput(event)">
             <mx:columns>
                 <mx:DataGridColumn editable="true" dataField="k" headerText="Key">
-                    <mx:itemEditor><mx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></mx:Component></mx:itemEditor>
+                    <mx:itemEditor><fx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></fx:Component></mx:itemEditor>
                 </mx:DataGridColumn>
                 <mx:DataGridColumn editable="true" dataField="v" headerText="Value">
-                    <mx:itemEditor><mx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></mx:Component></mx:itemEditor>
+                    <mx:itemEditor><fx:Component><mx:TextInput restrict="&#x0020;-&#x10FFFF;" /></fx:Component></mx:itemEditor>
                 </mx:DataGridColumn>
             </mx:columns>
           </mx:DataGrid>        
     <mx:Button id="saveButton" label="Save >" click="startSave();" styleName="titleWindowButton" />
   </mx:ControlBar>
   
-  <mx:Script><![CDATA[
+  <fx:Script><![CDATA[
   
     import mx.controls.*;
     import mx.managers.PopUpManager;
        import mx.core.Application;
+       import mx.core.FlexGlobals;
     import mx.events.DataGridEvent;
     import mx.events.DataGridEventReason;
     
@@ -91,8 +95,8 @@
     private var _connection:Connection;
        private var doSkip:Boolean = false;
     
-    [Bindable]
-    private var failureText:String = "";
+    [Bindable] private var failureText:String = "";
+       [Bindable] private var application:Object = FlexGlobals.topLevelApplication;
 
        public function setConnection(connection:Connection):void {
                _connection=connection;
         _connection.removeEventListener(Connection.SAVE_COMPLETED, saveCompleted);
         PopUpManager.removePopUp(this);
     }
-  ]]></mx:Script>
+  ]]></fx:Script>
 </mx:TitleWindow>
 
index c2b95685b8d5fed04913726cfcd59932944941b4..9ea879df7d25a55d7acbe339a6302b8f1afbe24b 100644 (file)
@@ -4,6 +4,7 @@ package net.systemeD.potlatch2.save {
     import flash.net.*;
     import mx.managers.PopUpManager;
     import mx.core.Application;
+    import mx.core.FlexGlobals;
     import net.systemeD.halcyon.connection.*;
     import org.iotashan.oauth.*;
 
@@ -31,7 +32,7 @@ package net.systemeD.potlatch2.save {
 
         private function getNewToken(onCompletion:Function):void {
             var oauthPanel:OAuthPanel = OAuthPanel(
-                PopUpManager.createPopUp(Application(Application.application), OAuthPanel, true));
+                PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), OAuthPanel, true));
             PopUpManager.centerPopUp(oauthPanel);
                        oauthPanel.setConnection(_connection);
             
@@ -50,7 +51,7 @@ package net.systemeD.potlatch2.save {
         
         private function saveData():void {
             var saveDialog:SaveDialog = SaveDialog(
-                PopUpManager.createPopUp(Application(Application.application), SaveDialog, true));
+                PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), SaveDialog, true));
                        saveDialog.setConnection(_connection);
             PopUpManager.centerPopUp(saveDialog);
 
index c264cd4a8be2cd19fba5f63d720523762a431ee4..dc11f2869249be5d17cf708ea9c3582c1630f9f7 100644 (file)
@@ -1,22 +1,28 @@
-<?xml version="1.0"?>\r
-\r
-<flex-config>\r
-   <compiler>\r
+<?xml version="1.0"?>
+
+<flex-config>
+   <compiler>
       <fonts>
-          <managers>\r
-              <manager-class>flash.fonts.AFEFontManager</manager-class>\r
-          </managers>\r
+          <managers>
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+          </managers>
       </fonts>
       
       <library-path append="true">
           <path-element>lib</path-element>
-      </library-path>\r
-   </compiler>\r
+      </library-path>
+
+      <theme>
+        <filename>${flexlib}/themes/Halo/halo.swc</filename>
+      </theme>
+   </compiler>
+
+   <metadata>
+      <title>Potlatch 2</title>
+      <description>http://wiki.openstreetmap.org/wiki/Potlatch2</description>
+   </metadata>
+
 
-   <metadata>\r
-      <title>Potlatch 2</title>\r
-      <description>http://wiki.openstreetmap.org/wiki/Potlatch2</description>\r
-   </metadata>\r
 
-   <output>resources/potlatch2.swf</output>\r
-</flex-config>\r
+   <output>resources/potlatch2.swf</output>
+</flex-config>
index bb95c41c631b684ff26cfb6235e5cbe75c121688..edf3a33968b5b5a72efafc505620b00d0d54c1ce 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<mx:Application 
-       xmlns:mx="http://www.adobe.com/2006/mxml" 
+<mx:Application
+    xmlns:fx="http://ns.adobe.com/mxml/2009"
+       xmlns:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:halcyon="net.systemeD.halcyon.*"
        xmlns:potlatch2="net.systemeD.potlatch2.*"
        layout="vertical"
        addedToStage="startInit()"
        preloader="net.systemeD.potlatch2.Preloader">
 
-    <map:LocalizationMap xmlns:map="l10n.map.*" />
 
-       <mx:Style source="styles/Application.css"/>
 
-    <mx:Glow id="glowImage" duration="100" 
-        alphaFrom="0.3" alphaTo="1.0" 
-        blurXFrom="0.0" blurXTo="5.0" 
-        blurYFrom="0.0" blurYTo="5.0" 
-        color="0xFF8000"/>
-    <mx:Glow id="unglowImage" duration="100" 
-        alphaFrom="1.0" alphaTo="0.3" 
-        blurXFrom="5.0" blurXTo="0.0" 
-        blurYFrom="5.0" blurYTo="0.0" 
-        color="0xFF8000"/>
-    <mx:WipeLeft id="wipeOut" duration="250"/>
-    <mx:WipeRight id="wipeIn" duration="250"/>
+       <fx:Style source="styles/Application.css"/>
 
-    <mx:ApplicationControlBar dock="true">
+    <fx:Declarations>
+        <map:LocalizationMap xmlns:map="l10n.map.*" />
+        <mx:Glow id="glowImage" duration="100"
+            alphaFrom="0.3" alphaTo="1.0"
+            blurXFrom="0.0" blurXTo="5.0"
+            blurYFrom="0.0" blurYTo="5.0"
+            color="0xFF8000"/>
+        <mx:Glow id="unglowImage" duration="100"
+            alphaFrom="1.0" alphaTo="0.3"
+            blurXFrom="5.0" blurXTo="0.0"
+            blurYFrom="5.0" blurYTo="0.0"
+            color="0xFF8000"/>
+        <mx:WipeLeft id="wipeOut" duration="250"/>
+        <mx:WipeRight id="wipeIn" duration="250"/>
+    </fx:Declarations>
+
+    <mx:ApplicationControlBar id="controlbar" dock="true">
         <mx:Button label="Save" icon="@Embed('embedded/upload.svg')" disabledIcon="@Embed('embedded/upload_disabled.svg')" styleName="appBarButton"
                        click="SaveManager.saveChanges(theMap.editableLayer.connection);" id="saveButton" enabled="false"/>
         <mx:Button id="helpButton" label="Help" click="new HelpDialog().init();" styleName="appBarButton" />
                                                     mx.controls.Menu(gpsButton.popUp).selectedIndex=0; /* Yes, we do need to call it twice */
                                                     theMap.removeLayerByName('GPS tracks'); }">
                        <mx:dataProvider>
-                               <mx:Array>
-                                       <mx:Object label="GPS data" id="gpsData" />
-                                       <mx:Object label="My tracks" id="myTracks" />
-                                       <mx:Object label="Clear" id="clearGps" />
-                               </mx:Array>
+                               <fx:Array>
+                                       <fx:Object label="GPS data" id="gpsData" />
+                                       <fx:Object label="My tracks" id="myTracks" />
+                                       <fx:Object label="Clear" id="clearGps" />
+                               </fx:Array>
                        </mx:dataProvider>
                </mx:PopUpMenuButton>
         <mx:Button id="optionsButton" label="Options" click="new OptionsDialog().init();" styleName="appBarButton" />
@@ -85,7 +90,7 @@
 
     </mx:HDividedBox>
 
-       <mx:Script><![CDATA[
+       <fx:Script><![CDATA[
                import net.systemeD.halcyon.*;
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
                import mx.core.IChildList;
         import mx.containers.Canvas;
                import mx.core.Application;
+               import mx.core.FlexGlobals;
         import mx.events.DragEvent;
         import mx.events.CloseEvent;
         import mx.managers.DragManager;
             if (loaderInfo.parameters['locale']) {
               dispatchEvent(new LocaleEvent(LocaleEvent.LOAD_LOCALE,loaderInfo.parameters['locale']));
             }
-
-                       // Load font and don't do anything until that's done
                        var loader:Loader = new Loader();
-                       loader.contentLoaderInfo.addEventListener(Event.COMPLETE, continueInit);
+                       loader.contentLoaderInfo.addEventListener(Event.COMPLETE, startApp);
                        loader.load(new URLRequest("FontLibrary.swf"));
                }
                
-               private function continueInit(r:Event):void {
+               private function startApp(event:Event):void {
+                       controlbar.setStyle('dropShadowEnabled',"false");       // Flex 4 doesn't permit this in Application.css
+
                        // Set font
-                       var FontLibrary:Class = r.target.applicationDomain.getDefinition("FontLibrary") as Class;
+                       var FontLibrary:Class = event.target.applicationDomain.getDefinition("FontLibrary") as Class;
                        Font.registerFont(FontLibrary.DejaVu);
 
                        Globals.vars.map_area = map_area;
                        if (entity is Relation) {
                                // If it's a relation, just bring up the editor panel
                                var panel:RelationEditorPanel = RelationEditorPanel(
-                                       PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true));
+                                       PopUpManager.createPopUp(Application(FlexGlobals.topLevelApplication), RelationEditorPanel, true));
                                panel.setRelation(entity as Relation);
                                PopUpManager.centerPopUp(panel);
                                return;
                        conn.fetchUserTraces();
         }
 
-       ]]></mx:Script>
+       ]]></fx:Script>
 
 </mx:Application>
 
diff --git a/resources/assets/features_pois.zip b/resources/assets/features_pois.zip
new file mode 100644 (file)
index 0000000..7d98cad
Binary files /dev/null and b/resources/assets/features_pois.zip differ
diff --git a/resources/assets/icons.zip b/resources/assets/icons.zip
new file mode 100644 (file)
index 0000000..f3e5a5d
Binary files /dev/null and b/resources/assets/icons.zip differ
index de8d4589d024c6e62e872f302891fb5d76288031..422d56834d4e21b7eee7aae534e0c2c85672da47 100644 (file)
@@ -1,53 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Quick documentation:
-
-<category> the categories that features belong to. This includes both nodes (icons on left) and ways/areas (drop-down list that appears when a way/area is selected)
-  name: Shown in GUI
-  id: internal reference (a feature refers to this with category=xxx)
-
-<feature> a pre-defined group of tags that make up a feature
-  category: [ctext] corresponding to category id
-  icon
-    @image: path to .png file
-    @dnd: path to optional dnd-specific-override .png file
-    @background: colour spec
-    @foreground: colour spec
-    (general html goes here?) Variables substituted with ${ref}
-  help: [ctext] URL, shown as a linked ? icon. Should (?) usually be an OSM wiki page.
-  description: Not currently used?
-  line/point/area: any or all of these are allowed. Determines whether this feature is shown in the corresponding situations. None is equivalent to all three.
-  tag - one or more of these required, defines the tags that make up the feature.
-    @k - key
-    @v - value
-  input
-    @ref=xxx
-  inputSet
-    @ref=xxx
-</feature>
-
-<inputSet>: a reusable group of properties for a feature.
-  @id="internal id"
-  input...
-</inputSet>
-
-<input>
-  @type: choice/freetext/turn/checkbox/slider/route/speed/number - the different types of supported input dialogs.
-  @presence: always/onTagMatch/withCategory - Whether it always appears on the basic page, appears only when the tag is already set, or only ever show on the category page.
-  @category: which tab it appears on
-  @description: mouse-over text
-  @name: The text shown as the label of the property
-  @key: The actual OSM key (tag) that will be saved
-  @priority: highest/high/normal/low/lowest (default=>normal) - controls the order that different features show up in a panel.
-  match: for turn|route inputs, the tags to be considered on the relation as indicating a match.
-    @k: key
-    @v: value
-  icon: see above
-</input>
-
-<include
-  @file="map_features/roads.xml": external file to drop into place here. Include files behave exactly as if written out in full.
-/>
+       See http://wiki.openstreetmap.org/wiki/Potlatch_2/Developer_Documentation/Map_Features for documentation.
+       Files can be included like this: <include file="map_features/roads.xml">
 -->
 
 <mapFeatures>
@@ -94,11 +48,11 @@ Quick documentation:
    </inputSet> 
 
   <inputSet id="source">
-    <input type="freetext" category="Misc" presence="onTagMatch" name="Source" key="source" description="The primary source of information for this object (GPS, survey, Yahoo, ...)" priority="lowest"/>
+    <input type="freetext" category="Details" presence="onTagMatch" name="Source" key="source" description="The primary source of information for this object (GPS, survey, Yahoo, ...)" priority="lowest"/>
   </inputSet>
 
   <inputSet id="designation">
-    <input type="freetext" category="Misc" presence="onTagMatch" description="Official designation or classification" name="Designation" key="designation"/>
+    <input type="freetext" category="Details" presence="onTagMatch" description="Official designation or classification" name="Designation" key="designation" priority="lowest" />
   </inputSet>
 
   <inputSet id="common">
@@ -108,21 +62,21 @@ Quick documentation:
 
   <inputSet id="names">
     <input type="freetext" presence="always"
-        name="Name" category="Naming" priority="highest"
+        name="Name" category="Details" priority="highest"
         key="name" description="The most common name"/>
     <input type="freetext" presence="onTagMatch"
-        name="International Name" category="Naming"
+        name="International Name" category="Details" subcategory="Additional names"
         key="int_name" description="The internationally recognised name"/>
     <input type="freetext" presence="onTagMatch"
-        name="Historical Name" category="Naming" priority="low"
+        name="Historical Name" category="Details" subcategory="Additional names" priority="low"
         key="old_name" description="The historic or previous name"/>
     <input type="freetext" presence="onTagMatch"
-        name="Alternative Name" category="Naming" priority="low"
+        name="Alternative Name" category="Details" subcategory="Additional names" priority="low"
         key="alt_name" description="An alternative, currently used, name"/>
   </inputSet>
 
   <inputSet id="wifi">
-    <input type="choice" presence="onTagMatch" category="Eating" name="Wifi" key="wifi">
+    <input type="choice" presence="onTagMatch" category="Details" name="Wifi" key="wifi">
       <choice value="free" text="Free"/>
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
@@ -137,11 +91,11 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="web">
-    <input type="freetext" presence="onTagMatch" category="Web" description="The URL of the website" name="Website" key="website"/>
+    <input type="freetext" presence="onTagMatch" category="Address" description="The URL of the website" name="Website" key="website"/>
   </inputSet>
 
   <inputSet id="cuisine">
-    <input type="choice" presence="always" name="Cuisine" category="Eating" description="The type of food that they serve" key="cuisine">
+    <input type="choice" presence="always" name="Cuisine" category="Details" description="The type of food that they serve" key="cuisine">
       <!-- The 30 most popular values according to taginfo 23/12/2010 -->
       <choice value="burger" text="Burger"/>
       <choice value="chicken" text="Chicken"/>
@@ -223,22 +177,22 @@ Quick documentation:
 
   <inputSet id="roadRefs">
     <input type="freetext" presence="always"
-        name="Reference" category="Naming" priority="high"
+        name="Reference" category="Details" priority="high"
         key="ref" description="The official reference number"/>
     <input type="freetext" presence="onTagMatch"
-        name="International Reference" category="Naming"
+        name="International Reference" category="Details" subcategory="Additional names" 
         key="int_ref" description="The official international reference number"/>
     <input type="freetext" presence="onTagMatch"
-        name="Old Reference" category="Naming" priority="low"
+        name="Old Reference" category="Details" subcategory="Additional names" priority="low"
         key="old_ref" description="The historic or previous reference number"/>
   </inputSet>
 
   <inputSet id="roadPhysical">
     <input type="freetext" presence="onTagMatch"
-        name="Width" category="Physical"
+        name="Width" category="Details" subcategory="Physical" 
         key="width" description="Width of the road" layout="horizontal"/>
     <input type="choice" presence="onTagMatch"
-        name="Surface" category="Physical" description="Type of road surface"
+        name="Surface" category="Details" description="Type of road surface"
         key="surface" layout="horizontal">
       <choice value="unpaved" text="Unpaved" description="Road surface is unsealed"/>
       <choice value="paved" text="Paved" description="Road surface is sealed"/>
@@ -255,31 +209,31 @@ Quick documentation:
     <inputSet ref="tunnel"/>
     <inputSet ref="embankment-cutting"/>
     <!-- not sure which category best suits put area=yes -->
-    <input type="checkbox" presence="onTagMatch" category="Restrictions" key="area" name="Open area" description="The way is a large open space, like at a dock, where vehicles can move anywhere within the space, rather than just along the edge." />
+    <input type="checkbox" presence="onTagMatch" category="Details" subcategory="Physical" key="area" name="Open area" description="The way is a large open space, like at a dock, where vehicles can move anywhere within the space, rather than just along the edge." />
   </inputSet>
 
   <inputSet id="roadLanes">
-    <input presence="onTagMatch" type="number" name="Lanes" category="Physical" description="Total number of lanes, counting both directions"
+    <input presence="onTagMatch" type="number" name="Lanes" category="Details" description="Total number of lanes, counting both directions"
            key="lanes" minimum="1" maximum="10" layout="horizontal"/>
   </inputSet>
 
   <inputSet id="bridge">
     <input type="choice" presence="onTagMatch"
-        name="Bridge" category="Physical" description="Road goes over a bridge"
+        name="Bridge" category="Details" description="Road goes over a bridge"
         key="bridge" layout="horizontal">
       <choice value="yes" text="Generic Bridge" description="Generic bridge -- type unknown"/>
       <choice value="viaduct" text="Viaduct" description="Viaduct"/>
       <choice value="suspension" text="Suspension bridge"/>
     </input>
     <input type="slider" presence="onTagMatch"
-        name="Layer" category="Physical" description="Relative vertical positions (-5 lowest, +5 highest)"
+        name="Layer" category="Details" description="Relative vertical positions (-5 lowest, +5 highest)"
         key="layer" minimum="-5" maximum="5" default="0" snapInterval="1" labels="Lowest,Ground,Highest"
         defaultName="Ground"/>
   </inputSet>
   <inputSet id="tunnel">
     <!-- Not ideal, used for non-roads too. -->  
     <input type="choice" presence="onTagMatch"
-        name="Tunnel" category="Physical" description="Road goes into a tunnel"
+        name="Tunnel" category="Details" subcategory="Physical" description="Road goes into a tunnel"
         key="tunnel" layout="horizontal">
       <choice value="yes" text="Tunnel" description="Generic tunnel"/>
     </input>
@@ -287,12 +241,12 @@ Quick documentation:
 
   <inputSet id="embankment-cutting">
     <input type="choice"
-           name="Embankment" category="Physical" description="Road supported on a raised bed of earth and rock."
+           name="Embankment" category="Details" subcategory="Physical" description="Road supported on a raised bed of earth and rock."
            key="embankment" layout="horizontal">
       <choice value="yes" text="Embankment"/>
     </input>
     <input type="choice"
-           name="Cutting" category="Physical" description="Road carved out of hill on one or both sides."
+           name="Cutting" category="Details" subcategory="Physical" description="Road carved out of hill on one or both sides."
            key="cutting" layout="horizontal">
       <choice value="yes" text="Cutting"/>
     </input>
@@ -300,14 +254,14 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="rail-electrification">
-    <input type="choice" name="Electrified" category="Electrification" description="Is the track electrified (whether by 3rd rail, overhead wires, etc)?"
+    <input type="choice" name="Electrified" category="Details" subcategory="Electrification" description="Is the track electrified (whether by 3rd rail, overhead wires, etc)?"
            key="electrified">
       <choice value="yes" text="Yes"/>
       <choice value="contact_line" text="Overhead line"/>
       <choice value="rail" text="Third rail"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" name="Voltage" category="Electrification" description="Nominal voltage of electric wires"
+    <input type="choice" name="Voltage" category="Details" subcategory="Electrification" description="Nominal voltage of electric wires"
            key="voltage" presence="withCategory">
       <choice value="600" text="600V"/>
       <choice value="750" text="750V"/>
@@ -316,7 +270,7 @@ Quick documentation:
       <choice value="15000" text="15kV"/>
       <choice value="25000" text="25kV"/>
     </input>
-    <input type="choice" name="Frequency" category="Electrification" description="Frequency in Hertz of alternating current power supply"
+    <input type="choice" name="Frequency" category="Details" subcategory="Electrification" description="Frequency in Hertz of alternating current power supply"
            key="frequency" presence="withCategory">
       <choice value="0" text="DC"/>
       <choice value="16.67" text="16.67 Hz"/>
@@ -327,16 +281,6 @@ Quick documentation:
     </input>
   </inputSet>
 
-  <inputSet id="rail-usage">
-    <input type="choice" name="Usage" category="Usage" description="Main use of the line" key="usage">
-      <choice value="main" text="Main line" description="The principal artery of a rail system."/>
-      <choice value="branch" text="Branch line" description="A secondary line, branching off a main line."/>
-      <choice value="industrial" text="Industrial"/>
-      <choice value="tourism" text="Tourism" />
-      <choice value="military" text="Military"/>
-    </input>
-  </inputSet>
-
   <inputSet id="fee">
     <input type="freetext" presence="onTagMatch" category="Restrictions" description="The charge/cost of using this amenity" name="Fee" key="fee"/>
   </inputSet>
@@ -373,7 +317,7 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="pedestrians">
-    <input type="choice" name="Pedestrians" description="Can pedestrians use this road, including footpaths if any?" category="Walking" key="foot">
+    <input type="choice" name="Pedestrians" description="Can pedestrians use this road, including footpaths if any?" category="Walk" key="foot">
       <choice value="yes" text="Allowed"/>
       <choice value="no" text="Prohibited"/>
       <choice value="designated" text="Designated"/>
@@ -381,8 +325,8 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="naptan">
-    <input type="freetext" presence="onTagMatch" category="Naptan" description="12 character internal Naptan ID" name="Atco Code" key="naptan:AtcoCode"/>
-    <input type="choice" presence="onTagMatch" category="Naptan" description="The eight-point compass bearning" name="Naptan Bearing" key="naptan:Bearing" >
+    <input type="freetext" presence="onTagMatch" category="Transport" description="12 character internal Naptan ID" name="Atco Code" key="naptan:AtcoCode"/>
+    <input type="choice" presence="onTagMatch" category="Transport" description="The eight-point compass bearning" name="Naptan Bearing" key="naptan:Bearing" >
       <choice value="N"  match="N"  text="N"  description=""/>
       <choice value="NE" match="NE" text="NE" description=""/>
       <choice value="E"  match="E"  text="E"  description=""/>
@@ -392,15 +336,15 @@ Quick documentation:
       <choice value="W"  match="W"  text="W"  description=""/>
       <choice value="NW" match="NW" text="NW" description=""/>
     </input>
-    <input type="freetext" presence="onTagMatch" category="Naptan" description="The naptan common name" name="Naptan Common Name (read-only)" key="naptan:CommonName"/>
-    <input type="freetext" presence="onTagMatch" category="Naptan" description="" name="Naptan Indicator (read-only)" key="naptan:Indicator"/>
-    <input type="freetext" presence="onTagMatch" category="Naptan" description="" name="Naptan Street (read-only)" key="naptan:Street"/>
-    <input type="freetext" presence="onTagMatch" category="Naptan" description="Delete this when the details have been verified on-the-ground" name="Naptan Verified?" key="naptan:verified"/>
+    <input type="freetext" presence="onTagMatch" category="Transport" description="The naptan common name" name="Naptan Common Name (read-only)" key="naptan:CommonName"/>
+    <input type="freetext" presence="onTagMatch" category="Transport" description="" name="Naptan Indicator (read-only)" key="naptan:Indicator"/>
+    <input type="freetext" presence="onTagMatch" category="Transport" description="" name="Naptan Street (read-only)" key="naptan:Street"/>
+    <input type="freetext" presence="onTagMatch" category="Transport" description="Delete this when the details have been verified on-the-ground" name="Naptan Verified?" key="naptan:verified"/>
   </inputSet>
 
   <inputSet id="buses">
-    <input type="freetext" presence="always" category="Bus Stop" name="Stop Name" key="name" description="The name of the bus stop"/>
-    <input type="freetext" presence="always" category="Bus Stop" name="Local Ref" key="local_ref" description="The local reference of the stop, usually one or two letters above the main flag, used at bus interchanges, e.g. L, BX"/>
+    <input type="freetext" presence="always" category="Transport" name="Stop Name" key="name" description="The name of the bus stop"/>
+    <input type="freetext" presence="always" category="Transport" name="Local Ref" key="local_ref" description="The local reference of the stop, usually one or two letters above the main flag, used at bus interchanges, e.g. L, BX"/>
     <inputSet ref="naptan"/>
   </inputSet>
 
@@ -483,7 +427,7 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="ldp">
-    <input type="route" name="National Walking Route" description="National walking route" category="Walking" priority="normal">
+    <input type="route" name="National Walking Route" description="National walking route" category="Walk" priority="normal">
       <match k="type" v="route"/>
       <match k="route" v="hiking|foot"/>
       <match k="network" v="nwn"/>
@@ -492,7 +436,7 @@ Quick documentation:
         <font size="12pt">${name}</font>
       </icon>
     </input>
-    <input type="route" name="Regional Walking Route" description="Regional walking route" category="Walking" priority="low">
+    <input type="route" name="Regional Walking Route" description="Regional walking route" category="Walk" priority="low">
       <match k="type" v="route"/>
       <match k="route" v="hiking|foot"/>
       <match k="network" v="rwn"/>
@@ -501,7 +445,7 @@ Quick documentation:
         <font size="12pt">${name}</font>
       </icon>
     </input>
-    <input type="route" name="Local Walking Route" description="Local walking route" category="Walking" priority="lowest">
+    <input type="route" name="Local Walking Route" description="Local walking route" category="Walk" priority="lowest">
       <match k="type" v="route"/>
       <match k="route" v="hiking|foot"/>
       <match k="network" v="lwn"/>
@@ -525,7 +469,7 @@ Quick documentation:
 <!-- Would be good to have a dedicated 'access' type of input -->
   <!-- all the description fields are identical at the moment for ease of maintenance, should be tailored in future. -->
   <inputSet id="boatPermissions">
-    <input type="choice" name="Boat permission" category="Permission" key="boat" description="Are boats allowed to use this waterway?">
+    <input type="choice" name="Boat permission" category="Restrictions" key="boat" description="Are boats allowed to use this waterway?">
       <choice value="yes" text="Allowed" description="General right of way."/>
       <choice value="no" text="Prohibited" description="No access to the public."/>
       <choice value="permissive" text="Permissive" description="Access permitted through private land."/>
@@ -535,7 +479,7 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="permissions">
-    <input type="choice" name="General access" category="Permission" key="access" description="Is there a general right of access, regardless of mode of transport?">
+    <input type="choice" name="General access" category="Restrictions" key="access" description="Is there a general right of access, regardless of mode of transport?">
       <choice value="yes" text="Allowed" description="General right of way."/>
       <choice value="no" text="Prohibited" description="No access to the public."/>
       <choice value="permissive" text="Permissive" description="Access permitted through private land."/>
@@ -543,7 +487,7 @@ Quick documentation:
       <choice value="designated" text="Designated" description="Permitted, according to signs or specific local laws."/>
     </input>
 
-    <input type="choice" name="Motor vehicles" category="Permission" key="motor_vehicle" description="Are cars and other private vehicles allowed?">
+    <input type="choice" name="Motor vehicles" category="Restrictions" key="motor_vehicle" description="Are cars and other private vehicles allowed?">
       <choice value="yes" text="Allowed" description="General right of way."/>
       <choice value="no" text="Prohibited" description="No access to the public."/>
       <choice value="permissive" text="Permissive" description="Access permitted through private land."/>
@@ -551,7 +495,7 @@ Quick documentation:
       <choice value="designated" text="Designated" description="Permitted, according to signs or specific local laws."/>
     </input>
 
-    <input type="choice" name="Horses" category="Permission" key="horse" description="Are cars and other private vehicles allowed?">
+    <input type="choice" name="Horses" category="Restrictions" key="horse" description="Are cars and other private vehicles allowed?">
       <choice value="yes" text="Allowed" description="General right of way."/>
       <choice value="no" text="Prohibited" description="No access to the public."/>
       <choice value="permissive" text="Permissive" description="Access permitted through private land."/>
@@ -580,11 +524,11 @@ Quick documentation:
   </inputSet>
 
   <inputSet id="isBuilding">
-    <input type="checkbox" presence="onTagMatch" category="Misc" description="Does this thing also represent one, solid building?" name="Building" key="building"/>
+    <input type="checkbox" presence="onTagMatch" category="Details" description="Does this thing also represent one, solid building?" name="Building" key="building"/>
   </inputSet>
 
   <inputSet id="powerCables">
-    <input type="choice" name="Cables" key="cables" presence="always" category="Power">
+    <input type="choice" name="Cables" key="cables" presence="always" category="Details">
       <choice value="2" text="2"/>
       <choice value="3" text="3"/>
       <choice value="4" text="4"/>
@@ -593,7 +537,7 @@ Quick documentation:
       <choice value="10" text="10"/>
       <choice value="12" text="12"/>
     </input>
-    <input type="choice" name="Voltage" key="voltage" presence="always" category="Power">
+    <input type="choice" name="Voltage" key="voltage" presence="always" category="Details">
       <!-- choices based on http://osmdoc.com/en/tag/voltage/#values-->
       <choice value="400" text="400 V"/>
       <choice value="600" text="600 V"/>
@@ -649,6 +593,43 @@ Quick documentation:
     </input>
   </inputSet>
 
+  <inputSet id="pitchSport">
+    <input name="Sport" presence="always" category="Details" key="sport" type="choice" description="The sport that is predominantly played here.">
+      <choice value="9pin" text="9 pin bowling"/>
+      <choice value="10pin" text="10 pin bowling"/>
+      <choice value="american_football" text="American football"/>
+      <choice value="archery" text="Archery"/>
+      <choice value="athletics" text="Athletics"/>
+      <choice value="australian_football" text="Australian Rules Football"/>
+      <choice value="baseball" text="Baseball"/>
+      <choice value="basketball" text="Basketball"/>
+      <choice value="beachvolleyball" text="Beach volleyball"/>
+      <choice value="boules" text="Boules/petanque/bocci"/>
+      <choice value="bowls" text="Lawn bowls"/>
+      <choice value="canadian_football" text="Canadian football"/>
+      <choice value="chess" text="Chess"/>
+      <choice value="cricket" text="Cricket"/>
+      <choice value="cricket_nets" text="Cricket nets"/>
+      <choice value="croquet" text="Croquet"/>
+      <choice value="equestrian" text="Equestrian"/>
+      <choice value="gaelic_football" text="Gaelic football"/>
+      <choice value="gymnastics" text="Gymnastics"/>
+      <choice value="team_handball" text="(Team) handball"/>
+      <choice value="hockey" text="(Field) hockey"/>
+      <choice value="korfball" text="Korball"/>
+      <choice value="pelota" text="Pelota"/>
+      <choice value="rugby_league" text="Rugby league"/>
+      <choice value="rugby_union" text="Rugby union"/>
+      <choice value="shooting" text="Shooting"/>
+      <choice value="skating" text="Ice skating"/>
+      <choice value="skateboard" text="Skateboarding"/>
+      <choice value="soccer" text="Soccer/football"/>
+      <choice value="swimming" text="Swimming"/>
+      <choice value="table_tennis" text="Table tennis"/>
+      <choice value="tennis" text="Tennis"/>
+      <choice value="volleyball" text="Volleyball"/>
+    </input>
+  </inputSet>
 
 <!-- Features -->
 
index 988d6cf505d1aa6cd042bc32e854394b5a81f380..120002b7fdfa841c5b70bd937e3b90c34667fd98 100644 (file)
@@ -45,7 +45,7 @@
     <area/>\r
     <tag k="amenity" v="hospital"/>\r
     <inputSet ref="simpleName"/>\r
-    <input type="choice" presence="always" category="Hospital" name="Emergency treatment available" key="emergency" description="Are there accident and emergency facilities at this hospital?">\r
+    <input type="choice" presence="always" category="Details" name="Emergency treatment available" key="emergency" description="Are there accident and emergency facilities at this hospital?">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
@@ -60,7 +60,7 @@
     <point/>\r
     <tag k="amenity" v="place_of_worship"/>\r
     <inputSet ref="simpleName" />\r
-    <input type="choice" presence="always" category="" name="Religion" key="religion" description="The religion worshipped here.">\r
+    <input type="choice" presence="always" category="Details" name="Religion" key="religion" description="The religion worshipped here.">\r
       <choice value="christian" text="Christianity (church)"/>\r
       <choice value="jewish" text="Judaism (synagogue)"/>\r
       <choice value="muslim" text="Islam (mosque)"/>\r
@@ -70,7 +70,7 @@
       <choice value="shinto" text="Shinto (shrine)"/>\r
     </input>\r
 \r
-    <input type="freetext" presence="always" category="" name="denomination" key="denomination" description="The denomination of the religion worshiped here." priority="low"/>\r
+    <input type="freetext" presence="always" category="Details" name="denomination" key="denomination" description="The denomination of the religion worshiped here." priority="low"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
@@ -81,8 +81,8 @@
     <help>http://wiki.openstreetmap.org/wiki/Atm</help>\r
     <point/>\r
     <tag k="amenity" v="atm"/>\r
-    <input type="freetext" presence="always" category="Banking" name="Operator" key="operator" description="The organisation that provides this ATM" priority="low"/>\r
-    <input type="freetext" presence="always" category="Banking" name="Fee" key="fee" description="Is there a charge for using this ATM? If so how much?"/>\r
+    <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The organisation that provides this ATM" priority="low"/>\r
+    <input type="freetext" presence="always" category="Details" name="Fee" key="fee" description="Is there a charge for using this ATM? If so how much?"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
@@ -97,7 +97,7 @@
     <tag k="amenity" v="bank"/>\r
     <inputSet ref="names"/>\r
     <inputSet ref="buildingAddress"/>\r
-    <input type="choice" presence="always" category="Bank" name="Public ATM available" key="atm" description="Is there a public ATM available?">\r
+    <input type="choice" presence="always" category="Details" name="Public ATM available" key="atm" description="Is there a public ATM available?">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
     <area/>\r
     <tag k="amenity" v="recycling"/>\r
     <inputSet ref="simpleName"/>\r
-    <input type="choice" presence="always" category="Recycling" name="Type of facility" key="recycling_type" description="Is this containers in a rural area or at an manned facility?" priority="high">\r
+    <input type="choice" presence="always" category="Details" name="Type of facility" key="recycling_type" description="Is this containers in a rural area or at an manned facility?" priority="high">\r
       <choice value="container" text="Container"/>\r
       <choice value="centre" text="Recycling centre"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Batteries" key="recycling:batteries" description="Small batteries for household appliances" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Batteries" key="recycling:batteries" description="Small batteries for household appliances" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Books" key="recycling:books" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Books" key="recycling:books" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Cans" key="recycling:cans" description="Metal cans and other small metal packaging" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Cans" key="recycling:cans" description="Metal cans and other small metal packaging" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Cardboard" key="recycling:cardboard" description="I.e. large pieces of packaging" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Cardboard" key="recycling:cardboard" description="I.e. large pieces of packaging" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Cartons" key="recycling:cartons" description="Packaging for groceries, i.e. milk cartons" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Cartons" key="recycling:cartons" description="Packaging for groceries, i.e. milk cartons" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Clothes" key="recycling:clothes" description="Clothes, including shoes" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Clothes" key="recycling:clothes" description="Clothes, including shoes" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Electrical appliances" key="recycling:electrical_appliances" description="Larger electrical items, i.e. refrigerators, freezers, dishwashers" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Electrical appliances" key="recycling:electrical_appliances" description="Larger electrical items, i.e. refrigerators, freezers, dishwashers" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Glass" key="recycling:glass" description="I.e glass sheets" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Glass" key="recycling:glass" description="I.e glass sheets" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Glass bottles" key="recycling:glass_bottles" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Glass bottles" key="recycling:glass_bottles" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Green waste" key="recycling:green_waste" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Green waste" key="recycling:green_waste" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Magazines" key="recycling:magazines" description="Magazines (glossy pages)" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Magazines" key="recycling:magazines" description="Magazines (glossy pages)" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Newspaper" key="recycling:newspaper" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Newspaper" key="recycling:newspaper" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Paper" key="recycling:paper" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Paper" key="recycling:paper" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Paper packaging" key="recycling:paper_packaging" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Paper packaging" key="recycling:paper_packaging" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Plastic" key="recycling:plastic" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Plastic" key="recycling:plastic" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Plastic bottles" key="recycling:plastic_bottles" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Plastic bottles" key="recycling:plastic_bottles" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Plastic packaging" key="recycling:plastic_packaging" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Plastic packaging" key="recycling:plastic_packaging" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Scrap metal" key="recycling:scrap_metal" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Scrap metal" key="recycling:scrap_metal" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Small appliances" key="recycling:small_appliances" description="Small electrical appliances, i.e. walkman, power adapter, remote control" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Small appliances" key="recycling:small_appliances" description="Small electrical appliances, i.e. walkman, power adapter, remote control" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Waste" key="recycling:waste" description="General waste (black bags)" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Waste" key="recycling:waste" description="General waste (black bags)" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
-    <input type="choice" presence="onTagMatch" category="Recycling" name="Wood" key="recycling:wood" description="" priority="low">\r
+    <input type="choice" presence="onTagMatch" category="Details" name="Wood" key="recycling:wood" description="" priority="low">\r
       <choice value="yes" text="Yes"/>\r
       <choice value="no" text="No"/>\r
     </input>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
-\r
   <feature name="School">\r
     <category>amenity</category>\r
     <icon image="features/pois/education_school.n.24.png">\r
     <help>http://wiki.openstreetmap.org/wiki/Post_box</help>\r
     <point/>\r
     <tag k="amenity" v="post_box"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Ref" key="ref" description="Reference number of the post box"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>\r
+    <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of the post box"/>\r
+    <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
     <point/>\r
     <area/>\r
     <tag k="amenity" v="post_office"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Ref" key="ref" description="Reference number of the post office"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>\r
+    <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of the post office"/>\r
+    <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>\r
     <inputSet ref="common"/>\r
     <inputSet ref="simpleName"/>\r
   </feature>\r
     <point/>\r
     <area/>\r
     <tag k="amenity" v="shelter"/>\r
-    <input type="choice" presence="always" name="Type of shelter" key="shelter_type" description="The intended use of the shelter.">\r
-      <choice value="picnic_shelter" text="Picnic shelter"/>\r
-      <choice value="public_transport" text="Public transport"/>\r
-      <choice value="weather_shelter" text="Weather shelter"/>\r
-      <choice value="wildlife_hide" text="Wildlife hide"/>\r
-    </input>\r
-    <inputSet ref="names"/>\r
+      <input type="choice" presence="always" name="Type of shelter" key="shelter_type" description="The intended use of the shelter.">\r
+        <choice value="picnic_shelter" text="Picnic shelter"/>\r
+        <choice value="public_transport" text="Public transport"/>\r
+        <choice value="weather_shelter" text="Weather shelter"/>\r
+        <choice value="wildlife_hide" text="Wildlife hide"/>\r
+      </input>\r
+    <inputset ref="names"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
     <point/>\r
     <tag k="amenity" v="emergency_phone"/>\r
     <inputSet ref="common"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Ref" key="ref" description="Reference number of emergency phone."/>    \r
+    <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of emergency phone."/>    \r
   </feature>\r
 \r
 \r
     <inputSet ref="common"/>\r
     <inputSet ref="simpleName"/>\r
     <input type="freetext" presence="always" name="Product" key="vending" description="What is being sold: tickets, food, maps..."/>\r
-    <inputSet ref="simpleOperator"/>\r
+    <inputSet ref="simpleOperator" />\r
   </feature>\r
 \r
   <!-- ========= Entertainment ========= -->\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
-</featureGroup>\r
+</featureGroup>
\ No newline at end of file
index eee7f27d9099c244407e10309382f85e8d20b582..f2ab201bac1ffaf687e414c6b85d5d9cf3b28c56 100644 (file)
     <point/>\r
     <tag k="barrier" v="toll_booth"/>\r
     <inputSet ref="fee"/>\r
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The provider of the toll" priority="low"/>\r
+    <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The provider of the toll" priority="low"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
index d05720c587674d92bc7087c13d960588fd4a2cdb..28775a92e5e850c7c77d5a084b30b5bf9cccf362 100644 (file)
-<featureGroup>\r
-  <feature name="School">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/education_school.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="school"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="College">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/education_university.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="college"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="University">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/education_university.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="university"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Supermarket">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/shopping_supermarket.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="shop" v="supermarket"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Place of worship">\r
-    <category>buildings</category>\r
-    <icon image="icons/place_of_worship.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="place_of_worship"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <!-- sorted in reverse order of popularity in taginfo. -->\r
-    <input type="choice" category="Religion" name="Religion" key="religion" description="The religion to which this place of worship belongs." presence="always">\r
-      <choice value="christian" text="Christianity (church)"/>\r
-      <choice value="muslim" text="Islam (mosque)"/>\r
-      <choice value="buddhist" text="Buddhist (temple)"/>\r
-      <choice value="jewish" text="Judaism (synagogue)"/>\r
-      <choice value="hindu" text="Hindu (temple)"/>\r
-      <choice value="sikh" text="Sikh (gurdwara)"/>\r
-      <choice value="spiritualist" text="Spiritualism"/>\r
-      <choice value="unitarian" text="Unitarianism"/>\r
-      <choice value="taoist" text="Taoism"/>\r
-      <choice value="multifaith" text="Multi-faith"/>\r
-      <choice value="scientologist" text="Scientology"/>\r
-      <choice value="bahai" text="Bahai"/>\r
-    </input>\r
-    <!-- sorted in reverse order of popularity in taginfo. -->\r
-    <input type="choice" category="Religion" name="Denomination" key="denomination" description="The denomination, or sub-branch of the main religion." presence="always">\r
-      <choice value="catholic" text="Catholic"/>\r
-      <choice value="baptist" text="Baptist"/>\r
-      <choice value="methodist" text="Methodist"/>\r
-      <choice value="lutheran" text="Lutheran"/>\r
-      <choice value="protestant" text="Prostant"/>\r
-      <choice value="orthodox" text="Orthodox"/>\r
-      <choice value="presbyterian" text="Presbyterian"/>\r
-      <choice value="anglican" text="Anglican"/>\r
-      <choice value="roman_catholic" text="Roman Catholic"/>\r
-      <choice value="evangelical" text="Evangelical"/>\r
-      <choice value="pentecostal" text="Pentecostal"/>\r
-      <choice value="mormon" text="Mormon"/>\r
-      <choice value="sunni" text="Sunni"/>\r
-      <choice value="jehovahs_witness" text="Jehovah's Witness"/>\r
-      <!-- duplicate of Anglican? -->\r
-      <choice value="church_of_england" text="Church of England"/>\r
-      <choice value="greek_orthodox" text="Greek Orthodox"/>\r
-      <choice value="new_apostolic" text="New Apostolic"/>\r
-      <choice value="episcopal" text="Episcopal"/>\r
-      <choice value="russian_orthodox" text="Russian Orthodox"/>\r
-      <choice value="adventist" text="Adventist"/>\r
-      <choice value="seventh_day_adventist" text="Seventh Day Adventist"/>\r
-      <choice value="united_reformed" text="United Reformed"/>\r
-      <choice value="reformed" text="Reformed"/>\r
-      <choice value="iglesia_ni_cristo" text="Iglesia Ni Cristo"/>\r
-      <choice value="uniting" text="Uniting"/>\r
-      <choice value="salvation_army" text="Salvation Army"/>\r
-      <choice value="church_of_scotland" text="Church of Scotland"/>\r
-      <choice value="quaker" text="Quaker"/>\r
-      <choice value="scientist" text="Scientist"/>\r
-      <choice value="shia" text="Shia"/>\r
-      <choice value="congregational" text="Congregational"/>\r
-      <choice value="assembly_of_god" text="Assembly of God"/>\r
-      <choice value="united" text="United"/>\r
-      <choice value="mennonite" text="Mennonite"/>\r
-      <choice value="nazarene" text="Nazarene"/>\r
-      <!-- duplicate of Mormon? -->\r
-      <choice value="latter_day_saints" text="Latter Day Saints"/>\r
-      <choice value="dutch_reformed" text="Dutch Reformed"/>\r
-      <choice value="tibetan" text="Tibetan"/>\r
-      <choice value="shingon" text="Shingon"/>\r
-      <choice value="georgian_orthodox" text="Georgian Orthodox"/>\r
-      <choice value="unitarian" text="Unitarian"/>\r
-      <choice value="brethren" text="Brethren"/>\r
-      <choice value="armenian_apostolic" text="Armenian Apostolic"/>\r
-      <choice value="maronite" text="Maronite"/>\r
-    </input>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Public building">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/building_generic.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="public_building"/>\r
-    <tag k="building" v="yes"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Hospital">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/health_hospital.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="amenity" v="hospital"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-\r
-  <feature name="Museum">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/tourist_museum.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="tourism" v="museum"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Shopping centre">\r
-    <category>buildings</category>\r
-    <category>shopping</category>\r
-    <node/>\r
-    <area/>\r
-    <tag k="shop" v="mall"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Zoo">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/tourist_zoo.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="tourism" v="zoo"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Stadium">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/sport_stadium.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <tag k="leisure" v="stadium"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Building">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/building_generic.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
+<featureGroup>
+  <feature name="School">
+    <category>buildings</category>
+    <icon image="features/pois/education_school.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
     <area/>
-    <point/>\r
-    <!-- This should catch all the "building=*" tags in use: yes, hut, house, residential, entrance, apartments, garage, industrial,  garages, service, manufacture, collapsed... \r
-         Is this possible? -->\r
-    <!-- <tag k="building" v="*"/> -->\r
-    <tag k="building" v="yes"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Sports centre">\r
-    <category>buildings</category>\r
-    <icon image="features/pois/sport_leisure_centre.n.24.png">\r
-      <b>${name} ${addr:housename}</b><br/>\r
-      ${addr:housenumber} ${addr:street} ${addr:postcode}\r
-    </icon>\r
-\r
-    <area/>\r
-    <point/>\r
-    <tag k="leisure" v="sports_centre"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="pitchSport"/>\r
-    <inputSet ref="isBuilding"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-</featureGroup>\r
+    <tag k="amenity" v="school"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="College">
+    <category>buildings</category>
+    <icon image="features/pois/education_university.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="amenity" v="college"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="University">
+    <category>buildings</category>
+    <icon image="features/pois/education_university.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="amenity" v="university"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Supermarket">
+    <category>buildings</category>
+    <icon image="features/pois/shopping_supermarket.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="shop" v="supermarket"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Place of worship">
+    <category>buildings</category>
+    <icon image="icons/place_of_worship.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="amenity" v="place_of_worship"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <!-- sorted in reverse order of popularity in taginfo. -->
+    <input type="choice" category="Details" name="Religion" key="religion" description="The religion to which this place of worship belongs." presence="always">
+      <choice value="christian" text="Christianity (church)"/>
+      <choice value="muslim" text="Islam (mosque)"/>
+      <choice value="buddhist" text="Buddhist (temple)"/>
+      <choice value="jewish" text="Judaism (synagogue)"/>
+      <choice value="hindu" text="Hindu (temple)"/>
+      <choice value="sikh" text="Sikh (gurdwara)"/>
+      <choice value="spiritualist" text="Spiritualism"/>
+      <choice value="unitarian" text="Unitarianism"/>
+      <choice value="taoist" text="Taoism"/>
+      <choice value="multifaith" text="Multi-faith"/>
+      <choice value="scientologist" text="Scientology"/>
+      <choice value="bahai" text="Bahai"/>
+    </input>
+    <!-- sorted in reverse order of popularity in taginfo. -->
+    <input type="choice" category="Details" name="Denomination" key="denomination" description="The denomination, or sub-branch of the main religion." presence="always">
+      <choice value="catholic" text="Catholic"/>
+      <choice value="baptist" text="Baptist"/>
+      <choice value="methodist" text="Methodist"/>
+      <choice value="lutheran" text="Lutheran"/>
+      <choice value="protestant" text="Prostant"/>
+      <choice value="orthodox" text="Orthodox"/>
+      <choice value="presbyterian" text="Presbyterian"/>
+      <choice value="anglican" text="Anglican"/>
+      <choice value="roman_catholic" text="Roman Catholic"/>
+      <choice value="evangelical" text="Evangelical"/>
+      <choice value="pentecostal" text="Pentecostal"/>
+      <choice value="mormon" text="Mormon"/>
+      <choice value="sunni" text="Sunni"/>
+      <choice value="jehovahs_witness" text="Jehovah's Witness"/>
+      <!-- duplicate of Anglican? -->
+      <choice value="church_of_england" text="Church of England"/>
+      <choice value="greek_orthodox" text="Greek Orthodox"/>
+      <choice value="new_apostolic" text="New Apostolic"/>
+      <choice value="episcopal" text="Episcopal"/>
+      <choice value="russian_orthodox" text="Russian Orthodox"/>
+      <choice value="adventist" text="Adventist"/>
+      <choice value="seventh_day_adventist" text="Seventh Day Adventist"/>
+      <choice value="united_reformed" text="United Reformed"/>
+      <choice value="reformed" text="Reformed"/>
+      <choice value="iglesia_ni_cristo" text="Iglesia Ni Cristo"/>
+      <choice value="uniting" text="Uniting"/>
+      <choice value="salvation_army" text="Salvation Army"/>
+      <choice value="church_of_scotland" text="Church of Scotland"/>
+      <choice value="quaker" text="Quaker"/>
+      <choice value="scientist" text="Scientist"/>
+      <choice value="shia" text="Shia"/>
+      <choice value="congregational" text="Congregational"/>
+      <choice value="assembly_of_god" text="Assembly of God"/>
+      <choice value="united" text="United"/>
+      <choice value="mennonite" text="Mennonite"/>
+      <choice value="nazarene" text="Nazarene"/>
+      <!-- duplicate of Mormon? -->
+      <choice value="latter_day_saints" text="Latter Day Saints"/>
+      <choice value="dutch_reformed" text="Dutch Reformed"/>
+      <choice value="tibetan" text="Tibetan"/>
+      <choice value="shingon" text="Shingon"/>
+      <choice value="georgian_orthodox" text="Georgian Orthodox"/>
+      <choice value="unitarian" text="Unitarian"/>
+      <choice value="brethren" text="Brethren"/>
+      <choice value="armenian_apostolic" text="Armenian Apostolic"/>
+      <choice value="maronite" text="Maronite"/>
+    </input>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Public building">
+    <category>buildings</category>
+    <icon image="features/pois/building_generic.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="amenity" v="public_building"/>
+    <tag k="building" v="yes"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Hospital">
+    <category>buildings</category>
+    <icon image="features/pois/health_hospital.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="amenity" v="hospital"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+
+  <feature name="Museum">
+    <category>buildings</category>
+    <icon image="features/pois/tourist_museum.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="tourism" v="museum"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Shopping centre">
+    <category>buildings</category>
+    <category>shopping</category>
+    <node/>
+    <area/>
+    <tag k="shop" v="mall"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Zoo">
+    <category>buildings</category>
+    <icon image="features/pois/tourist_zoo.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="tourism" v="zoo"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Stadium">
+    <category>buildings</category>
+    <icon image="features/pois/sport_stadium.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <tag k="leisure" v="stadium"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Building">
+    <category>buildings</category>
+    <icon image="features/pois/building_generic.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <point/>
+    <!-- This should catch all the "building=*" tags in use: yes, hut, house, residential, entrance, apartments, garage, industrial,  garages, service, manufacture, collapsed... 
+         Is this possible? -->
+    <!-- <tag k="building" v="*"/> -->
+    <tag k="building" v="yes"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Sports centre">
+    <category>buildings</category>
+    <icon image="features/pois/sport_leisure_centre.n.24.png">
+      <b>${name} ${addr:housename}</b><br/>
+      ${addr:housenumber} ${addr:street} ${addr:postcode}
+    </icon>
+
+    <area/>
+    <point/>
+    <tag k="leisure" v="sports_centre"/>
+    <inputSet ref="names"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="pitchSport"/>
+    <inputSet ref="isBuilding"/>
+    <inputSet ref="common"/>
+  </feature>
+</featureGroup>
   
\ No newline at end of file
index 3ebbcbd5eee98e57e283a4e77ceed185a1c3c219..0a8dd883e35f2a4b03377beec39183f3785e8d2e 100644 (file)
     <inputSet ref="common"/>\r
   </feature>\r
 \r
-\r
   <feature name="Sports track">\r
     <category>sport</category>\r
     <area/>\r
 \r
   <feature name="Forest">\r
     <category>natural</category>\r
-    <icon image="features/pois/landuse_coniferous.n.24.png"/>\r
+    <icon image="/features/pois/landuse_coniferous.n.24.png"/>\r
 \r
     <area/>\r
     <tag k="landuse" v="forest"/>\r
     <tag k="landuse" v="meadow"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
-\r
-\r
 </featureGroup>
\ No newline at end of file
index 387f4b5a2990808253ffa302a0837d8617958342..5216f398799b6cdf7229eb82b73557a8e803dd6c 100644 (file)
     <tag k="highway" v="cycleway"/>\r
     <inputSet ref="path"/>\r
     <inputSet ref="common"/>\r
-    <input type="choice" name="Cycleway type" category="Cycle" description="What kind of bike path is this?" key="segregated" presence="onTagMatch" priority="low"> \r
-       <choice value="yes" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb." /> \r
-       <choice value="no" text="Shared" description="Cyclists and pedestrians share the full width of the path." /> \r
-    </input> \r
+    <input type="choice" name="Cycleway type" category="Cycle" description="What kind of bike path is this?" key="segregated" presence="onTagMatch" priority="low">\r
+      <choice value="yes" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb." />\r
+      <choice value="no" text="Shared" description="Cyclists and pedestrians share the full width of the path." />\r
   </feature>\r
 \r
   <feature name="Pedestrian street">\r
@@ -69,7 +68,7 @@
     <line/>\r
     <tag k="highway" v="steps"/>\r
     <inputSet ref="path"/>\r
-    <input type="freetext" presence="always" category="Naming" name="Number of steps" key="step_count" description="The number of steps in the way" priority="low"/>\r
+    <input type="freetext" presence="always" category="Details" name="Number of steps" key="step_count" description="The number of steps in the way" priority="low"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
   \r
index 2fafc86f8839e912162bc3bf1f0fce058c25e43f..87ff63f91084a022452fcf27abfdf9b3bc4cf75d 100644 (file)
@@ -1,82 +1,82 @@
-<featureGroup>\r
-  <feature name="High-voltage line">\r
-    <category>power</category>\r
-    <icon image="features/power_high.png"/>\r
-    <line/>\r
-    <tag k="power" v="line"/>\r
-    <inputSet ref="powerCables"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Low-voltage line">\r
-    <category>power</category>\r
-    <icon image="features/power_low.png"/>\r
-    <line/>\r
-    <tag k="power" v="minor_line"/>\r
-    <inputSet ref="powerCables"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="High-voltage pylon">\r
-    <category>power</category>\r
-    <icon image="features/pois/power_tower_high2.n.24.png"/>\r
-    <point/>\r
-    <tag k="power" v="tower"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Power pole">\r
-    <category>power</category>\r
-    <icon image="features/pois/power_tower_low.n.24.png"/>\r
-    <point/>\r
-    <tag k="power" v="pole"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Plant (station)">\r
-    <category>power</category>\r
-    <icon image="features/pois/power_station.png"/>\r
-    <area/>\r
-    <point/>\r
-    <tag k="power" v="generator"/>\r
-    <inputSet ref="names"/>\r
-    <input type="choice" presence="always"  name="Energy source" key="power_source" category="Power">\r
-      <choice value="coal" text="Coal"/>\r
-      <choice value="gas" text="Gas"/>\r
-      <choice value="oil" text="Oil"/>\r
-      <choice value="fossil" text="Unspecified fossil fuel"/>\r
-      <choice value="hydro" text="Hydroelectric"/>\r
-      <choice value="geothermal" text="Geothermal"/>\r
-      <choice value="nuclear" text="Nuclear"/>\r
-      <choice value="wind" text="Wind"/>\r
-      <choice value="photovoltaic" text="Solar PV"/>\r
-      <choice value="solar_thermal" text="Solar thermal"/>\r
-      <choice value="biofuel" text="Biofuel"/>\r
-    </input>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Substation">\r
-    <category>power</category>\r
-    <icon image="features/pois/power_substation.n.24.png"/>"\r
-    <area/>\r
-    <point/>\r
-    <tag k="power" v="station"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Transformer">\r
-    <category>power</category>\r
-    <icon image="features/pois/power_transformer.n.24.png"/>\r
-    <area/>\r
-    <point/>\r
-    <tag k="power" v="sub_station"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
+<featureGroup>
+  <feature name="High-voltage line">
+    <category>power</category>
+    <icon image="features/power_high.png"/>
+    <line/>
+    <tag k="power" v="line"/>
+    <inputSet ref="powerCables"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Low-voltage line">
+    <category>power</category>
+    <icon image="features/power_low.png"/>
+    <line/>
+    <tag k="power" v="minor_line"/>
+    <inputSet ref="powerCables"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="High-voltage pylon">
+    <category>power</category>
+    <icon image="features/pois/power_tower_high2.n.24.png"/>
+    <point/>
+    <tag k="power" v="tower"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Power pole">
+    <category>power</category>
+    <icon image="features/pois/power_tower_low.n.24.png"/>
+    <point/>
+    <tag k="power" v="pole"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Plant (station)">
+    <category>power</category>
+    <icon image="features/pois/power_station.png"/>
+    <area/>
+    <point/>
+    <tag k="power" v="generator"/>
+    <inputSet ref="names"/>
+    <input type="choice" presence="always"  name="Energy source" key="power_source" category="Details">
+      <choice value="coal" text="Coal"/>
+      <choice value="gas" text="Gas"/>
+      <choice value="oil" text="Oil"/>
+      <choice value="fossil" text="Unspecified fossil fuel"/>
+      <choice value="hydro" text="Hydroelectric"/>
+      <choice value="geothermal" text="Geothermal"/>
+      <choice value="nuclear" text="Nuclear"/>
+      <choice value="wind" text="Wind"/>
+      <choice value="photovoltaic" text="Solar PV"/>
+      <choice value="solar_thermal" text="Solar thermal"/>
+      <choice value="biofuel" text="Biofuel"/>
+    </input>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Substation">
+    <category>power</category>
+    <icon image="features/pois/power_substation.n.24.png"/>"
+    <area/>
+    <point/>
+    <tag k="power" v="station"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Transformer">
+    <category>power</category>
+    <icon image="features/pois/power_transformer.n.24.png"/>
+    <area/>
+    <point/>
+    <tag k="power" v="sub_station"/>
+    <inputSet ref="common"/>
+  </feature>
 </featureGroup>
\ No newline at end of file
index 865138bef670d485c9a635773845f11fd188ecdb..dc46eaf9e186520c1cd13083087fca8188c7857d 100644 (file)
-<featureGroup>\r
-  <feature name="Supermarket">\r
-    <category>shopping</category>\r
-    <icon image="features/pois/shopping_supermarket.n.24.png">\r
-      ${name}\r
-    </icon>\r
-    <help>http://wiki.openstreetmap.org/wiki/Tag:shop%3Dsupermarket</help>\r
-    <point/>\r
-    <area/>\r
-    <tag k="shop" v="supermarket"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Small Convenience Store">\r
-    <category>shopping</category>\r
-    <icon image="features/pois/shopping_convenience.n.24.png">\r
-      ${name}\r
-    </icon>\r
-    <help>http://wiki.openstreetmap.org/wiki/Tag:shop%3Dconvenience</help>\r
-    <point/>\r
-    <area/>\r
-    <tag k="shop" v="convenience"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Bakery">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_bakery.n.24.png"/>\r
-    <tag k="shop" v="bakery"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-\r
-\r
-  <feature name="Alcohol shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_alcohol.n.24.png"/>\r
-    <tag k="shop" v="alcohol"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-\r
-  <feature name="Bike shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_bicycle.n.24.png"/>\r
-    <tag k="shop" v="bicycle"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Bookshop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_book.n.24.png"/>\r
-    <tag k="shop" v="books"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Butcher">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_butcher.n.24.png"/>\r
-    <tag k="shop" v="butcher"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Car sales">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_car.n.24.png"/>\r
-    <tag k="shop" v="car"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Car repair">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_car_repair.n.24.png"/>\r
-    <tag k="shop" v="car_repair"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Clothes shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_clothes.n.24.png"/>\r
-    <tag k="shop" v="clothes"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Confectionery">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_confectionery.n.24.png"/>\r
-    <tag k="shop" v="confectionery"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="DIY">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_diy.n.24.png"/>\r
-    <tag k="shop" v="doityourself"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Fishmonger">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_fish.n.24.png"/>\r
-    <tag k="shop" v="fishmonger"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Florist">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_florist.n.24.png"/>\r
-    <tag k="shop" v="florist"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Garden centre">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_garden_centre.n.24.png"/>\r
-    <tag k="shop" v="garden_centre"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Gift shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_gift.n.24.png"/>\r
-    <tag k="shop" v="gift"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Greengrocer">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_greengrocer.n.24.png"/>\r
-    <tag k="shop" v="greengrocer"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Hairdresser">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_hairdresser.n.24.png"/>\r
-    <tag k="shop" v="hairdresser"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Hifi shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_hifi.n.24.png"/>\r
-    <tag k="shop" v="hifi"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Jewellery">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_jewelry.n.24.png"/>\r
-    <tag k="shop" v="jewelry"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Kiosk">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_kiosk.n.24.png"/>\r
-    <tag k="shop" v="kiosk"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Laundrette">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_laundrette.n.24.png"/>\r
-    <tag k="shop" v="laundry"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Motorbike shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_motorcycle.n.24.png"/>\r
-    <tag k="shop" v="motorcycle"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Music shop">\r
-    <category>shopping</category>\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <icon image="features/pois/shopping_music.n.24.png"/>\r
-    <tag k="shop" v="music"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-\r
-  <feature name="Pharmacy">\r
-    <category>shopping</category>\r
-    <icon image="features/pois/health_pharmacy.n.24.png">\r
-      ${name}\r
-    </icon>\r
-    <help>http://wiki.openstreetmap.org/wiki/Pharmacy</help>\r
-    <point/>\r
-    <area/>\r
-    <tag k="amenity" v="pharmacy"/>\r
-    <inputSet ref="names"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <input type="checkbox" category="Amenity" presence="always" description="Does this pharmacy sell prescription drugs?" name="Dispensing" key="dispensing" layout="horizontal"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-\r
-  <feature name="Toy shop">\r
-    <category>shopping</category>\r
-    <icon image="features/pois/shopping_toys.n.24.png" />\r
-    <point/>\r
-    <area/>\r
-    <inputSet ref="simpleName"/>\r
-    <inputSet ref="web"/>\r
-    <inputSet ref="buildingAddress"/>\r
-    <tag k="shop" v="toys"/>\r
-    <inputSet ref="common"/>\r
-  </feature>\r
-</featureGroup>\r
-\r
+<featureGroup>
+  <feature name="Supermarket">
+    <category>shopping</category>
+    <icon image="features/pois/shopping_supermarket.n.24.png">
+      ${name}
+    </icon>
+    <help>http://wiki.openstreetmap.org/wiki/Tag:shop%3Dsupermarket</help>
+    <point/>
+    <area/>
+    <tag k="shop" v="supermarket"/>
+    <inputSet ref="names"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Small Convenience Store">
+    <category>shopping</category>
+    <icon image="features/pois/shopping_convenience.n.24.png">
+      ${name}
+    </icon>
+    <help>http://wiki.openstreetmap.org/wiki/Tag:shop%3Dconvenience</help>
+    <point/>
+    <area/>
+    <tag k="shop" v="convenience"/>
+    <inputSet ref="names"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Bakery">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_bakery.n.24.png"/>
+    <tag k="shop" v="bakery"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+
+
+  <feature name="Alcohol shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_alcohol.n.24.png"/>
+    <tag k="shop" v="alcohol"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+
+  <feature name="Bike shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_bicycle.n.24.png"/>
+    <tag k="shop" v="bicycle"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Bookshop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_book.n.24.png"/>
+    <tag k="shop" v="books"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Butcher">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_butcher.n.24.png"/>
+    <tag k="shop" v="butcher"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Car sales">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_car.n.24.png"/>
+    <tag k="shop" v="car"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Car repair">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_car_repair.n.24.png"/>
+    <tag k="shop" v="car_repair"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Clothes shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_clothes.n.24.png"/>
+    <tag k="shop" v="clothes"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Confectionery">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_confectionery.n.24.png"/>
+    <tag k="shop" v="confectionery"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="DIY">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_diy.n.24.png"/>
+    <tag k="shop" v="doityourself"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Fishmonger">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_fish.n.24.png"/>
+    <tag k="shop" v="fishmonger"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Florist">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_florist.n.24.png"/>
+    <tag k="shop" v="florist"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Garden centre">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_garden_centre.n.24.png"/>
+    <tag k="shop" v="garden_centre"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Gift shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_gift.n.24.png"/>
+    <tag k="shop" v="gift"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Greengrocer">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_greengrocer.n.24.png"/>
+    <tag k="shop" v="greengrocer"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Hairdresser">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_hairdresser.n.24.png"/>
+    <tag k="shop" v="hairdresser"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Hifi shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_hifi.n.24.png"/>
+    <tag k="shop" v="hifi"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Jewellery">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_jewelry.n.24.png"/>
+    <tag k="shop" v="jewelry"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Kiosk">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_kiosk.n.24.png"/>
+    <tag k="shop" v="kiosk"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Laundrette">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_laundrette.n.24.png"/>
+    <tag k="shop" v="laundry"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Motorbike shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_motorcycle.n.24.png"/>
+    <tag k="shop" v="motorcycle"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Music shop">
+    <category>shopping</category>
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <icon image="features/pois/shopping_music.n.24.png"/>
+    <tag k="shop" v="music"/>
+    <inputSet ref="common"/>
+  </feature>
+
+
+  <feature name="Pharmacy">
+    <category>shopping</category>
+    <icon image="features/pois/health_pharmacy.n.24.png">
+      ${name}
+    </icon>
+    <help>http://wiki.openstreetmap.org/wiki/Pharmacy</help>
+    <point/>
+    <area/>
+    <tag k="amenity" v="pharmacy"/>
+    <inputSet ref="names"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <input type="checkbox" category="Details" presence="always" description="Does this pharmacy sell prescription drugs?" name="Dispensing" key="dispensing" layout="horizontal"/>
+    <inputSet ref="common"/>
+  </feature>
+
+  <feature name="Toy shop">
+    <category>shopping</category>
+    <icon image="features/pois/shopping_toys.n.24.png" />
+    <point/>
+    <area/>
+    <inputSet ref="simpleName"/>
+    <inputSet ref="web"/>
+    <inputSet ref="buildingAddress"/>
+    <tag k="shop" v="toys"/>
+    <inputSet ref="common"/>
+  </feature>
+</featureGroup>
+
   
\ No newline at end of file
index 4e9a6f6f59f9e50e232787975a6d208c5c5180a2..027f3b1f60367b9083788435b24fb4c26ba95a04 100644 (file)
@@ -13,7 +13,6 @@
         <inputSet ref="tunnel"/>
         <inputSet ref="embankment-cutting"/>
         <inputSet ref="rail-electrification"/>
-        <inputSet ref="rail-usage"/>
         <inputSet ref="common"/>
       </feature>
     
         <line/>
         <area/>
         <tag k="railway" v="platform"/>
-        <input type="freetext" presence="onTagMatch" category="Naming" name="Reference" key="ref" description="The number of the platform" priority="low"/>
+        <input type="freetext" presence="onTagMatch" category="Details" name="Reference" key="ref" description="The number of the platform" priority="low"/>
         <inputSet ref="common"/>
       </feature>
     
     <area/>
     <tag k="amenity" v="car_wash"/>
     <inputSet ref="names"/>
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The company/organisation that runs the car wash" priority="low"/>
-    <input type="freetext" presence="onTagMatch" category="Operation" name="Opening hours" key="opening_hours" priority="normal"/>
-    <input type="choice" presence="onTagMatch" category="Operation" name="Self service" key="self_service" priority="low">
+    <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The company/organisation that runs the car wash" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Opening hours" key="opening_hours" priority="normal"/>
+    <input type="choice" presence="onTagMatch" category="Details" name="Self service" key="self_service" priority="low">
        <choice value="yes" text="Yes" />
        <choice value="no" text="No" />
     </input>
-    <input type="choice" presence="onTagMatch" category="Operation" name="Automated" key="automated" priority="low">
+    <input type="choice" presence="onTagMatch" category="Details" name="Automated" key="automated" priority="low">
        <choice value="yes" text="Yes" />
        <choice value="no" text="No" />
     </input>
         <area/>
         <point/>
         <inputSet ref="names"/>
-        <input type="freetext" presence="always" category="Naming" name="International Air Transport Association (IATA) airport code" key="ref"/>
+        <input type="freetext" presence="always" category="Details" name="International Air Transport Association (IATA) airport code" key="ref"/>
         <help>http://wiki.openstreetmap.org/wiki/Key:aeroway</help>
         <inputSet ref="common"/>
       </feature>
         <tag k="aeroway" v="runway"/>
         <line/>
         <inputSet ref="names"/>
-        <input type="freetext" presence="always" category="Naming" name="Runway number (01-36)" key="ref"/>
+        <input type="freetext" presence="always" category="Details" name="Runway number (01-36)" key="ref"/>
         <help>http://wiki.openstreetmap.org/wiki/Key:aeroway</help>
         <inputSet ref="common"/>
       </feature>
         <tag k="aeroway" v="taxiway"/>
         <line/>
         <inputSet ref="names"/>
-        <input type="freetext" presence="always" category="Naming" name="Taxiway number" key="ref" />
+        <input type="freetext" presence="always" category="Details" name="Taxiway number" key="ref" />
         <help>http://wiki.openstreetmap.org/wiki/Key:aeroway</help>
         <inputSet ref="common"/>
       </feature>
         <icon image="features/pois/transport_airport_gate.n.24.png"/>
         <tag k="aeroway" v="gate"/>
         <point/>
-        <input type="freetext" presence="always" category="Naming" name="Gate number" key="ref"/>
+        <input type="freetext" presence="always" category="Details" name="Gate number" key="ref"/>
         <help>http://wiki.openstreetmap.org/wiki/Key:aeroway</help>
         <inputSet ref="common"/>
       </feature>
     <area/>
     <tag k="amenity" v="parking"/>
     <inputSet ref="names"/>
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
     <input type="number" minimum="0" maximum="99999" stepSize="1" presence="always" category="Parking" name="Capacity" key="capacity" description="The number of cars that can be parked in the car park"/>
     <inputSet ref="fee"/>
     <inputSet ref="common"/>
     <point/>
     <tag k="amenity" v="bicycle_parking"/>
     <inputSet ref="names"/>
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
     <input type="number" minimum="0" maximum="99999" stepSize="1"
         presence="always" category="Cycle" name="Capacity" key="capacity"
         description="The number of bicycles that can be parked in the group of bicycle parking racks"/>
     <point/>
     <tag k="railway" v="station"/>
     <inputSet ref="names"/>
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Reference" key="ref" description="The shortcode/reference for the station" priority="low"/>
-    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The provider of the service" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Reference" key="ref" description="The shortcode/reference for the station" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The provider of the service" priority="low"/>
     <inputSet ref="common"/>
   </feature>
 
 
   <feature name="Fuel">
-    <category>transport</category> 
-    <point /> 
-    <inputSet ref="simpleName" /> 
+    <category>transport</category>
+    <point />
+    <inputSet ref="simpleName" />
     <icon image="features/pois/transport_fuel.n.24.png" />
     <tag k="amenity" v="fuel"/>
     <inputSet ref="simpleBrand"/>
     <inputSet ref="simpleOperator"/>
 
-    <input type="choice" category="Fuels" name="Diesel" key="fuel:diesel" description="Is diesel fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Diesel" key="fuel:diesel" description="Is diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="GTL Diesel" key="fuel:GTL_diesel" description="Is GTL diesel fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="GTL Diesel" key="fuel:GTL_diesel" description="Is GTL diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="HGV Diesel" key="fuel:HGV_diesel" description="Is HGV diesel fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="HGV Diesel" key="fuel:HGV_diesel" description="Is HGV diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Biodiesel" key="fuel:biodiesel" description="Is biodiesel unleaded fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Biodiesel" key="fuel:biodiesel" description="Is biodiesel unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 91" key="fuel:octane_91" description="Is octane 91 unleaded fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Octane 91" key="fuel:octane_91" description="Is octane 91 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 95" key="fuel:octane_95" description="Is octane 95 unleaded fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Octane 95" key="fuel:octane_95" description="Is octane 95 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 98" key="fuel:octane_98" description="Is octane 98 unleaded fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Octane 98" key="fuel:octane_98" description="Is octane 98 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 100" key="fuel:octane_100" description="Is octane 100 unleaded fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Octane 100" key="fuel:octane_100" description="Is octane 100 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Mixture 1:25" key="fuel:1_25" description="Is mixture 1:25 fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Mixture 1:25" key="fuel:1_25" description="Is mixture 1:25 fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Mixture 1:50" key="fuel:1_50" description="Is mixture 1:50 fuel sold here?" priority="low">
+    <input type="choice" category="Details" name="Mixture 1:50" key="fuel:1_50" description="Is mixture 1:50 fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="E10" key="fuel:e10" description="Is E10 sold here?" priority="low">
+    <input type="choice" category="Details" name="E10" key="fuel:e10" description="Is E10 sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="E85" key="fuel:e85" description="Is E85 sold here?" priority="low">
+    <input type="choice" category="Details" name="E85" key="fuel:e85" description="Is E85 sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Biogas" key="fuel:biogas" description="Is biogas sold here?" priority="low">
+    <input type="choice" category="Details" name="Biogas" key="fuel:biogas" description="Is biogas sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="CNG" key="fuel:cng" description="Is CNG sold here?" priority="low">
+    <input type="choice" category="Details" name="CNG" key="fuel:cng" description="Is CNG sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="LPG" key="fuel:lpg" description="Is LPG sold here?" priority="low">
+    <input type="choice" category="Details" name="LPG" key="fuel:lpg" description="Is LPG sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Electricity" key="fuel:electricity" description="Is it possible to charge an electric car here?" priority="low">
+    <input type="choice" category="Details" name="Electricity" key="fuel:electricity" description="Is it possible to charge an electric car here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
     <tag k="amenity" v="ferry_terminal"/>
     <inputSet ref="simpleName" />
     <input type="freetext" presence="always" category="" name="Operator" key="operator" description="The operator of the ferry terminal." priority="low"/>
-    <input type="freetext" presence="onTagMatch" category="Cargo" name="Cargo" key="cargo" description="The cargo shipped from here." priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Details" name="Cargo" key="cargo" description="The cargo shipped from here." priority="low"/>
     <inputSet ref="common"/>
   </feature>
 
     <tag k="route" v="bus"/>
 
     <inputSet ref="route"/>
-    <input type="freetext" presence="always" category="Naming" name="Operator" key="operator" description="The provider of the bus service" priority="low"/>
-    <input type="freetext" presence="always" category="Naming" name="Network" key="network" description="The network of the bus service" priority="low"/>
+    <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the bus service" priority="low"/>
+    <input type="freetext" presence="always" category="Details" name="Network" key="network" description="The network of the bus service" priority="low"/>
     <inputSet ref="common"/>
   </feature>
 
     <tag k="route" v="tram"/>
 
     <inputSet ref="route"/>
-    <input type="freetext" presence="always" category="Naming" name="Operator" key="operator" description="The provider of the tram service" priority="low"/>
-    <input type="freetext" presence="always" category="Naming" name="Network" key="network" description="The network of the tram service" priority="low"/>
+    <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the tram service" priority="low"/>
+    <input type="freetext" presence="always" category="Details" name="Network" key="network" description="The network of the tram service" priority="low"/>
     <inputSet ref="common"/>
   </feature>
 
index 0c02f6117da02723879b5d2dc8eaa28a37bf0c37..aaf1e489d2fc9c25659c7a42a1e0e5386353adc5 100644 (file)
@@ -19,8 +19,8 @@ way :tiger { casing-color: #ff00ff;}
 node :dupe { z-index: 9; icon-image: circle; icon-width:8; color: white; opacity: 0.4; casing-opacity: 0.4; casing-color: red; casing-width: 3; }
 node :hoverway { z-index: 9; icon-image: square; icon-width: 7; color: blue; layer: 5; }
 node !:drawn :poi { z-index: 2; icon-image: circle; icon-width: 4; color: green; casing-color: black; casing-width: 1; }
+node !:drawn :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: black; layer: 5; }
 node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 4; color: black; }
-node :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: black; layer: 5; }
 node !:drawn :selectedway { z-index: 9;&nb