== 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
=== 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.
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
<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}" />
--- /dev/null
+<?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>
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;
if (dropdown) {
if (typedTextChanged) {
- cursorPosition = textInput.selectionBeginIndex;
+ cursorPosition = TextInput(textInput).selectionBeginIndex;
updateDataProvider();
if( collection.length==0 || typedText=="" || typedText==null ) {
// 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) {
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;
--- /dev/null
+/*
+
+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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+ }
+
+}
+
--- /dev/null
+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
import flash.geom.Point;
import net.systemeD.halcyon.styleparser.*;
import net.systemeD.halcyon.connection.*;
+ import net.systemeD.halcyon.ImageBank;
public class MarkerUI extends EntityUI {
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); }
+ }
}
}
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; }
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 {
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); }
}
}
}
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; }
+++ /dev/null
-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
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 {
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;
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 = [];
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 {
return null;
}
- public function getTraces():Array {
+ public function getTraces():Vector.<Trace> {
return traces;
}
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.*;
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)
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;
}
/// ------------------------------------------------------------------------------------------------
- /** 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) {
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
package net.systemeD.halcyon.styleparser {
import net.systemeD.halcyon.connection.Entity;
+ import net.systemeD.halcyon.ImageBank;
public class StyleChooser {
// 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?
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) {
<?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>
<mx:LinkButton label="Add" click="addNewSource()"/>
</mx:HBox>
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
/*
Still to do:
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;
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;
}
]]>
- </mx:Script>
+ </fx:Script>
</mx:TitleWindow>
<?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>
<?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>
</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>
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 {
private var barFrame:Sprite;
private var mainColor:uint=0x045966;
+ private var assetscount:uint=0;
+ private var queuedEvents:Array=[];
+
public function Preloader()
{
super();
//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
{
<?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);">
<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.*;
if ( _relation != null )
tagViewer.setEntity([_relation]);
}
- ]]></mx:Script>
+ ]]></fx:Script>
</mx:TitleWindow>
<?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()"
<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.*;
MainUndoStack.getGlobalStack().addAction(undo);
}
- ]]></mx:Script>
+ ]]></fx:Script>
</mx:TitleWindow>
<?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;
//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 = [];
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>
<?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>
-->
<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"
restrict=" -"
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>
<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"
restrict=" -"
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>
<?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.*"
<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=" -" /></mx:Component></mx:itemEditor>
+ <mx:itemEditor><fx:Component><mx:TextInput restrict=" -" /></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=" -" /></mx:Component></mx:itemEditor>
+ <mx:itemEditor><fx:Component><mx:TextInput restrict=" -" /></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 && stack.selectedIndex==0}" />
+ enabled="{editorStack is TabNavigator && 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=" -" /></mx:Component></mx:itemEditor>
+ <mx:itemEditor><fx:Component><mx:TextInput restrict=" -" /></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.EditController;
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>
<?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>
<?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>
<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" />
</mx:HBox>
</mx:VBox>
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
import net.systemeD.halcyon.Map;
import net.systemeD.halcyon.MapPaint;
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>
}
// Get any attribution and logo details
- for each (bg in collection) {
+ collection.forEach(function(bg:Object, index:int, array:Array):void {
if (bg.logo) {
// load the logo
var loader:Loader = new Loader();
- var thisbg1:Object = bg; // scope it for the closure
- loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void { onLogoLoad(e,thisbg1); });
+ loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void { onLogoLoad(e,bg); });
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
loader.load(new URLRequest(bg.logo));
if (bg.attribution_url) {
// load the attribution
var urlloader:URLLoader = new URLLoader();
- var thisbg2:Object = bg; // scope it for the closure
- urlloader.addEventListener(Event.COMPLETE, function(e:Event):void { onAttributionLoad(e,thisbg2); });
+ urlloader.addEventListener(Event.COMPLETE, function(e:Event):void { onAttributionLoad(e,bg); });
urlloader.addEventListener(IOErrorEvent.IO_ERROR, onError);
urlloader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
urlloader.load(new URLRequest(bg.attribution_url));
}
- }
+ });
// Tell the function key manager that we'd like to receive function key calls
FunctionKeyManager.instance().registerListener('Background imagery',
<?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;
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: " />
<?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);
["/", "Cycle through overlapping ways"],
];
var text2:Array = [["+", "Add new tag"],
+ [", .", "Cycle through nodes in way"],
["D", "Dim features"],
["F", "Follow existing way"],
- ["R", "Repeat tags"],
- ["T", "Toggle between simple and advanced tags"],
+ ["M", "Maximise editor"],
["P", "Create parallel way"],
- ["V", "Reverse direction of way"]
+ ["Q", "Make area right-angled"],
+ ["R", "Repeat tags"],
];
- var text3:Array = [["Q", "Make area right-angled"],
- ["S", "Save"],
+ var text3:Array = [["S", "Save"],
+ ["T", "Toggle between simple and advanced tags"],
+ ["V", "Reverse direction of way"],
["X", "Cut way at node"],
["Z", "Undo"],
["Esc", "Cancel edit"],
- ["Space", "Hold to realign background image"]
+ ["Space", "Hold/drag to realign background image"]
];
shortcuts1.addChild(buildGrid(text));
shortcuts2a.addChild(buildGrid(text2));
}
]]>
- </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>
<?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}"
thumbRelease="progressThumbRelease(event);" />
</mx:HBox>
- <mx:Script>
+ <fx:Script>
<![CDATA[
/** VideoPlayer component for P2 help dialog.
the user actually wants it.)
*/
- import mx.events.VideoEvent;
-
[Bindable] public var file:String;
[Bindable] public var previewImage:String;
private var wasPlaying:Boolean;
video.playheadTime = event.currentTarget.value;
if (wasPlaying) playVideo();
}
- public function advanceProgress(event:VideoEvent):void {
- progressBar.value = event.playheadTime;
+ public function advanceProgress(event:Event):void {
+ progressBar.value = mx.events.VideoEvent(event).playheadTime;
}
public function stopPlaying():void {
if (!video.playing) return;
}
]]>
- </mx:Script>
+ </fx:Script>
</mx:VBox>
}
/** 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;
}
}
/** 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;
_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. */
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;
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);
+ }
}
}
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);
}
}
* @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;
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);
<?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"
labelPlacement="right" label=""
change="value=toYesNo()" />
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
protected function initCheckbox():void {
// ** FIXME - these should really be bindings (selected="{...}").
return inputBox.selected ? 'yes':'no';
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:SingleTagEditor>
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();
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);
}
}
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);
}
}
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};
<?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>
public var choices:Array;
public function ChoiceEditorFactory(inputXML:XML) {
- super(inputXML);
+ super(inputXML,"horizontal");
choices = [];
for each( var choiceXML:XML in inputXML.choice ) {
<?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=" -" />
- <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>
private var _notPresentText:String;
public function FreeTextEditorFactory(inputXML:XML) {
- super(inputXML);
+ super(inputXML,"horizontal");
_notPresentText = inputXML.hasOwnProperty("@absenceText") ? String(inputXML.@absenceText) : "Unset";
}
<?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"
<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;
value = null;
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:SingleTagEditor>
<?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}"
<?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"
<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;
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);
}
new RelationSelectPanel().init(_entity, _factory.relationTagPatterns);
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:RelationMemberEditor>
<?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"
<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.*;
Relation(_route["relation"]).removeMember(_route["entity"], MainUndoStack.getGlobalStack().addAction);
}
- ]]></mx:Script>
+ ]]></fx:Script>
</mx:HBox>
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 {
<?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"
liveDragging="true"
change="setTagValueFromSlider()" />
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
private function setTagValueFromSlider():void {
// unset the tag if being set to the default
return parsed;
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:SingleTagEditor>
<?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">
fontWeight="normal">
</edit:ChoiceComboBox>
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
import mx.collections.*;
import mx.utils.*;
import net.systemeD.potlatch2.mapfeatures.Feature;
choice.value = null;
return choice;
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:SingleTagEditor>
<?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"
<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.*;
addTurnRestrictions();
}
- ]]></mx:Script>
+ ]]></fx:Script>
</edit:RelationMemberEditor>
<?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>
</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;
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>
<?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;
return new ObjectProxy(data);
}
- ]]></mx:Script>
+ ]]></fx:Script>
</mx:Canvas>
<?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.*;
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);
}
[Bindable(event="traces_loaded")]
- private function get traces():Array {
+ private function get traces():Vector.<Trace> {
return conn.getTraces();
}
}
}
]]>
- </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>
<?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;
}
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()" />
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>
<mx:Button label="Not complete" click="markNotComplete()"/>
</mx:VBox>
</mx:ViewStack>
- <mx:Script><![CDATA[
+ <fx:Script><![CDATA[
import net.systemeD.halcyon.connection.*;
import net.systemeD.halcyon.MapPaint;
}
}
]]>
- </mx:Script>
+ </fx:Script>
</mx:VBox>
\ No newline at end of file
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" />
</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
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>
<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;
for each(var tag:Tag in tags) { tagDataProvider.addItem(tag); }
}
]]>
- </mx:Script>
+ </fx:Script>
</mx:VBox>
\ No newline at end of file
<?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()"
<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>
<?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=" -" /></mx:Component></mx:itemEditor>
+ <mx:itemEditor><fx:Component><mx:TextInput restrict=" -" /></fx:Component></mx:itemEditor>
</mx:DataGridColumn>
<mx:DataGridColumn editable="true" dataField="v" headerText="Value">
- <mx:itemEditor><mx:Component><mx:TextInput restrict=" -" /></mx:Component></mx:itemEditor>
+ <mx:itemEditor><fx:Component><mx:TextInput restrict=" -" /></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;
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>
import flash.net.*;
import mx.managers.PopUpManager;
import mx.core.Application;
+ import mx.core.FlexGlobals;
import net.systemeD.halcyon.connection.*;
import org.iotashan.oauth.*;
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);
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);
-<?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>
<?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" />
</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>
<name>Denmark - Stevns Kommune</name>
<url>http://tile.openstreetmap.dk/stevns/2009/$z/$x/$y.jpg</url>
<sourcetag>Stevns Kommune (2009)</sourcetag>
+ </set>
+ <set minlat="46.33" minlon="9.36" maxlat="49.09" maxlon="17.28">
+ <name>Austria - geoimage.at</name>
+ <url>http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/$z/$x/$y.jpg</url>
+ <sourcetag>geoimage.at</sourcetag>
+ </set>
+ <set minlon="19.02" minlat="40.96" maxlon="77.34" maxlat="70.48">
+ <name>Russia - Kosmosnimki.ru IRS Satellite</name>
+ <url>http://irs.gis-lab.info/?layers=irs&request=GetTile&z=$z&x=$x&y=$y</url>
+ <sourcetag>Kosmosnimki.ru IRS</sourcetag>
+ </set>
+ <set minlon="23.16" minlat="51.25" maxlon="32.83" maxlat="56.19">
+ <name>Belarus - Kosmosnimki.ru SPOT4 Satellite</name>
+ <url>http://irs.gis-lab.info/?layers=spot&request=GetTile&z=$z&x=$x&y=$y</url>
+ <sourcetag>Kosmosnimki.ru SPOT4</sourcetag>
</set>
</imagery>
<?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>
</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">
<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"/>
</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"/>
<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"/>
<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>
<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>
</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"/>
<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"/>
</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>
</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"/>
</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=""/>
<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>
<font size="12pt">${name}</font>
</icon>
</input>
+ <input type="route" name="Mountain bike route" description="A signposted route for mountain biking." category="Cycle" priority="lowest">
+ <match k="type" v="route"/>
+ <match k="route" v="mtb"/>
+ <icon image="features/route__mtb.png" background="#9f4404" foreground="white">
+ <font size="14pt"><b>${ref}</b></font><br/>
+ <font size="12pt">${name}</font>
+ </icon>
+ </input>
</inputSet>
<inputSet id="bicycle-permission">
</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"/>
<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"/>
<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"/>
<!-- 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."/>
</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."/>
<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."/>
<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."/>
</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"/>
<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"/>
</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 -->
-<featureGroup>\r
- <!-- =========== Amenity ============ -->\r
-\r
- <feature name="Fire station">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_firestation2.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dfire_station</help>\r
- <point/>\r
- <tag k="amenity" v="fire_station"/>\r
- <inputSet ref="simpleName" />\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Police Station">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_police2.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dpolice</help>\r
- <point/>\r
- <area/>\r
- <tag k="amenity" v="police"/>\r
- <inputSet ref="simpleName"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Library">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_library.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dlibrary</help>\r
- <point/>\r
- <area/>\r
- <tag k="amenity" v="library"/>\r
- <inputSet ref="simpleName"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Hospital">\r
- <category>amenity</category>\r
- <icon image="features/pois/health_hospital.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dhospital</help>\r
- <point/>\r
- <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
- <choice value="yes" text="Yes"/>\r
- <choice value="no" text="No"/>\r
- </input>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Place of Worship">\r
- <category>amenity</category>\r
- <icon image="features/pois/place_of_worship_unknown.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dplace_of_worship</help>\r
- <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
- <choice value="christian" text="Christianity (church)"/>\r
- <choice value="jewish" text="Judaism (synagogue)"/>\r
- <choice value="muslim" text="Islam (mosque)"/>\r
- <choice value="hindu" text="Hinduism (temple)"/>\r
- <choice value="buddhist" text="Buddhism (temple)"/>\r
- <choice value="sikh" text="Sikhism (gurdwara)"/>\r
- <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
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="ATM">\r
- <category>amenity</category>\r
- <icon image="features/pois/money_atm.n.24.png"/>\r
- <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
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Bank">\r
- <category>amenity</category>\r
- <icon image="features/pois/money_bank2.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dbank</help>\r
- <point/>\r
- <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
- <choice value="yes" text="Yes"/>\r
- <choice value="no" text="No"/>\r
- </input>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Recycling">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_recycling.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Drecycling</help>\r
- <point/>\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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- <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
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dschool</help>\r
- <point/>\r
- <tag k="amenity" v="school"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Kindergarten">\r
- <category>amenity</category>\r
- <category>buildings</category>\r
- <icon image="features/pois/education_nursery3.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dkindergarten</help>\r
- <point/>\r
- <tag k="amenity" v="kindergarten"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Town hall">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_town_hall.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dtownhall</help>\r
- <point/>\r
- <tag k="amenity" v="townhall"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Post Box">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_post_box.n.24.png">\r
- ${ref}\r
- </icon>\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
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Post Office">\r
- <category>amenity</category>\r
- <category>buildings</category>\r
- <icon image="features/pois/amenity_post_office.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity=post_office</help>\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
- <inputSet ref="common"/>\r
- <inputSet ref="simpleName"/>\r
- </feature>\r
-\r
- <feature name="Trash/rubbish bin">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_waste_bin.n.24.png">\r
- ${ref}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity=waste_basket</help>\r
- <point/>\r
- <tag k="amenity" v="waste_basket"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Toilets">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_toilets.n.24.png">\r
- ${ref}\r
- </icon>\r
- <point/>\r
- <tag k="amenity" v="toilets"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Water fountain">\r
- <category>amenity</category>\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_drinkingtap.n.24.png">\r
- ${ref}\r
- </icon>\r
- <point/>\r
- <tag k="amenity" v="drinking_water"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Shelter">\r
- <category>amenity</category>\r
- <icon image="features/pois/accommodation_shelter2.n.24.png">\r
- ${name}\r
- </icon> \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
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Barbecue">\r
- <category>amenity</category>\r
- <icon image="features/pois/tourist_picnic.n.24.png"/>\r
- <!-- specific icon needed -->\r
- <point/>\r
- <tag k="amenity" v="bbq"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Hunting stand">\r
- <category>sport</category>\r
- <icon image="features/pois/sport_shooting.n.24.png"/>\r
- <point/>\r
- <tag k="amenity" v="hunting_stand"/>\r
- <inputSet ref="common"/>\r
- <inputSet ref="names"/>\r
- </feature>\r
-\r
-\r
- <feature name="Park bench">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_bench.n.24.png" />\r
- <point/>\r
- <tag k="amenity" v="bench"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Public telephone">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_telephone.n.24.png" />\r
- <point/>\r
- <tag k="amenity" v="telephone"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Emergency phone">\r
- <category>amenity</category>\r
- <icon image="features/pois/emergency-telephone-24.png" />\r
- <!-- icon from http://www.clker.com/clipart-emergency-telephone-blue.html, feel free to (re)move this notice -->\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
- </feature>\r
-\r
-\r
- <feature name="Swimming pool">\r
- <category>amenity</category>\r
- <category>sport</category>\r
- <icon image="features/pois/sport_swimming_outdoor.n.24.png">\r
- ${name}\r
- </icon>\r
- <point/>\r
- <area/>\r
- <tag k="amenity" v="swimming_pool"/>\r
- <inputSet ref="simpleName"/> \r
- <inputSet ref="common"/>\r
-\r
- </feature>\r
-\r
- <feature name="Fountain">\r
- <category>amenity</category>\r
- <icon image="features/pois/amenity_fountain2.n.24.png">\r
- ${name}\r
- </icon>\r
- <point/>\r
- <tag k="amenity" v="fountain"/>\r
- <inputSet ref="common"/>\r
- <inputSet ref="simpleName"/>\r
- </feature>\r
-\r
- <feature name="Vending machine">\r
- <category>amenity</category>\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/shopping_vending_machine.n.24.png">A vending machine.</icon>\r
-\r
- <point/>\r
- <tag k="amenity" v="vending_machine"/>\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
- </feature>\r
-\r
- <!-- ========= Entertainment ========= -->\r
-\r
- <feature name="Pub">\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_pub.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dpub</help>\r
- <point/>\r
- <tag k="amenity" v="pub"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="web"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="wifi"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Bar">\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_bar.n.24.png">\r
- ${name}\r
- </icon>\r
- <point/>\r
- <tag k="amenity" v="bar"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="web"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="wifi"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Restaurant">\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_restaurant.n.24.png">\r
- ${name}\r
- </icon>\r
- <point/>\r
- <tag k="amenity" v="restaurant"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="web"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="cuisine"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Cafe">\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_cafe.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dcafe</help>\r
- <point/>\r
- <tag k="amenity" v="cafe"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="web"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="cuisine"/>\r
- <inputSet ref="wifi"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Fast Food">\r
- <category>foodanddrink</category>\r
- <icon image="features/pois/food_fastfood.n.24.png">\r
- ${name}\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dfast_food</help>\r
- <point/>\r
- <tag k="amenity" v="fast_food"/>\r
- <inputSet ref="names"/>\r
- <inputSet ref="web"/>\r
- <inputSet ref="buildingAddress"/>\r
- <inputSet ref="cuisine"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-</featureGroup>\r
+<featureGroup>
+ <!-- =========== Amenity ============ -->
+
+ <feature name="Fire station">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_firestation2.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dfire_station</help>
+ <point/>
+ <tag k="amenity" v="fire_station"/>
+ <inputSet ref="simpleName" />
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Police Station">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_police2.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dpolice</help>
+ <point/>
+ <area/>
+ <tag k="amenity" v="police"/>
+ <inputSet ref="simpleName"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Library">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_library.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dlibrary</help>
+ <point/>
+ <area/>
+ <tag k="amenity" v="library"/>
+ <inputSet ref="simpleName"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Hospital">
+ <category>amenity</category>
+ <icon image="features/pois/health_hospital.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dhospital</help>
+ <point/>
+ <area/>
+ <tag k="amenity" v="hospital"/>
+ <inputSet ref="simpleName"/>
+ <input type="choice" presence="always" category="Details" name="Emergency treatment available" key="emergency" description="Are there accident and emergency facilities at this hospital?">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Place of Worship">
+ <category>amenity</category>
+ <icon image="features/pois/place_of_worship_unknown.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dplace_of_worship</help>
+ <point/>
+ <tag k="amenity" v="place_of_worship"/>
+ <inputSet ref="simpleName" />
+ <input type="choice" presence="always" category="Details" name="Religion" key="religion" description="The religion worshipped here.">
+ <choice value="christian" text="Christianity (church)"/>
+ <choice value="jewish" text="Judaism (synagogue)"/>
+ <choice value="muslim" text="Islam (mosque)"/>
+ <choice value="hindu" text="Hinduism (temple)"/>
+ <choice value="buddhist" text="Buddhism (temple)"/>
+ <choice value="sikh" text="Sikhism (gurdwara)"/>
+ <choice value="shinto" text="Shinto (shrine)"/>
+ </input>
+
+ <input type="freetext" presence="always" category="Details" name="denomination" key="denomination" description="The denomination of the religion worshiped here." priority="low"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="ATM">
+ <category>amenity</category>
+ <icon image="features/pois/money_atm.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Atm</help>
+ <point/>
+ <tag k="amenity" v="atm"/>
+ <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The organisation that provides this ATM" priority="low"/>
+ <input type="freetext" presence="always" category="Details" name="Fee" key="fee" description="Is there a charge for using this ATM? If so how much?"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Bank">
+ <category>amenity</category>
+ <icon image="features/pois/money_bank2.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dbank</help>
+ <point/>
+ <tag k="amenity" v="bank"/>
+ <inputSet ref="names"/>
+ <inputSet ref="buildingAddress"/>
+ <input type="choice" presence="always" category="Details" name="Public ATM available" key="atm" description="Is there a public ATM available?">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Recycling">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_recycling.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Drecycling</help>
+ <point/>
+ <area/>
+ <tag k="amenity" v="recycling"/>
+ <inputSet ref="simpleName"/>
+ <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">
+ <choice value="container" text="Container"/>
+ <choice value="centre" text="Recycling centre"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Batteries" key="recycling:batteries" description="Small batteries for household appliances" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Books" key="recycling:books" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Cans" key="recycling:cans" description="Metal cans and other small metal packaging" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Cardboard" key="recycling:cardboard" description="I.e. large pieces of packaging" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Cartons" key="recycling:cartons" description="Packaging for groceries, i.e. milk cartons" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Clothes" key="recycling:clothes" description="Clothes, including shoes" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <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">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Glass" key="recycling:glass" description="I.e glass sheets" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Glass bottles" key="recycling:glass_bottles" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Green waste" key="recycling:green_waste" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Magazines" key="recycling:magazines" description="Magazines (glossy pages)" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Newspaper" key="recycling:newspaper" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Paper" key="recycling:paper" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Paper packaging" key="recycling:paper_packaging" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Plastic" key="recycling:plastic" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Plastic bottles" key="recycling:plastic_bottles" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Plastic packaging" key="recycling:plastic_packaging" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Scrap metal" key="recycling:scrap_metal" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <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">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Waste" key="recycling:waste" description="General waste (black bags)" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <input type="choice" presence="onTagMatch" category="Details" name="Wood" key="recycling:wood" description="" priority="low">
+ <choice value="yes" text="Yes"/>
+ <choice value="no" text="No"/>
+ </input>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="School">
+ <category>amenity</category>
+ <icon image="features/pois/education_school.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dschool</help>
+ <point/>
+ <tag k="amenity" v="school"/>
+ <inputSet ref="names"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Kindergarten">
+ <category>amenity</category>
+ <category>buildings</category>
+ <icon image="features/pois/education_nursery3.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dkindergarten</help>
+ <point/>
+ <tag k="amenity" v="kindergarten"/>
+ <inputSet ref="names"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Town hall">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_town_hall.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dtownhall</help>
+ <point/>
+ <tag k="amenity" v="townhall"/>
+ <inputSet ref="names"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Post Box">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_post_box.n.24.png">
+ ${ref}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Post_box</help>
+ <point/>
+ <tag k="amenity" v="post_box"/>
+ <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of the post box"/>
+ <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Post Office">
+ <category>amenity</category>
+ <category>buildings</category>
+ <icon image="features/pois/amenity_post_office.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity=post_office</help>
+ <point/>
+ <area/>
+ <tag k="amenity" v="post_office"/>
+ <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of the post office"/>
+ <input type="freetext" presence="always" category="Details" name="Operator" key="operator" description="The provider of the postal service" priority="low"/>
+ <inputSet ref="common"/>
+ <inputSet ref="simpleName"/>
+ </feature>
+
+ <feature name="Trash/rubbish bin">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_waste_bin.n.24.png">
+ ${ref}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity=waste_basket</help>
+ <point/>
+ <tag k="amenity" v="waste_basket"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Toilets">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_toilets.n.24.png">
+ ${ref}
+ </icon>
+ <point/>
+ <tag k="amenity" v="toilets"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Water fountain">
+ <category>amenity</category>
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_drinkingtap.n.24.png">
+ ${ref}
+ </icon>
+ <point/>
+ <tag k="amenity" v="drinking_water"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Shelter">
+ <category>amenity</category>
+ <icon image="features/pois/accommodation_shelter2.n.24.png">
+ ${name}
+ </icon>
+ <point/>
+ <area/>
+ <tag k="amenity" v="shelter"/>
+ <input type="choice" presence="always" name="Type of shelter" key="shelter_type" description="The intended use of the shelter.">
+ <choice value="picnic_shelter" text="Picnic shelter"/>
+ <choice value="public_transport" text="Public transport"/>
+ <choice value="weather_shelter" text="Weather shelter"/>
+ <choice value="wildlife_hide" text="Wildlife hide"/>
+ </input>
+ <inputset ref="names"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Barbecue">
+ <category>amenity</category>
+ <icon image="features/pois/tourist_picnic.n.24.png"/>
+ <!-- specific icon needed -->
+ <point/>
+ <tag k="amenity" v="bbq"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Hunting stand">
+ <category>sport</category>
+ <icon image="features/pois/sport_shooting.n.24.png"/>
+ <point/>
+ <tag k="amenity" v="hunting_stand"/>
+ <inputSet ref="common"/>
+ <inputSet ref="names"/>
+ </feature>
+
+
+ <feature name="Park bench">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_bench.n.24.png" />
+ <point/>
+ <tag k="amenity" v="bench"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Public telephone">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_telephone.n.24.png" />
+ <point/>
+ <tag k="amenity" v="telephone"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Emergency phone">
+ <category>amenity</category>
+ <icon image="features/pois/emergency-telephone-24.png" />
+ <!-- icon from http://www.clker.com/clipart-emergency-telephone-blue.html, feel free to (re)move this notice -->
+ <point/>
+ <tag k="amenity" v="emergency_phone"/>
+ <inputSet ref="common"/>
+ <input type="freetext" presence="always" category="Details" name="Ref" key="ref" description="Reference number of emergency phone."/>
+ </feature>
+
+
+ <feature name="Swimming pool">
+ <category>amenity</category>
+ <category>sport</category>
+ <icon image="features/pois/sport_swimming_outdoor.n.24.png">
+ ${name}
+ </icon>
+ <point/>
+ <area/>
+ <tag k="amenity" v="swimming_pool"/>
+ <inputSet ref="simpleName"/>
+ <inputSet ref="common"/>
+
+ </feature>
+
+ <feature name="Fountain">
+ <category>amenity</category>
+ <icon image="features/pois/amenity_fountain2.n.24.png">
+ ${name}
+ </icon>
+ <point/>
+ <tag k="amenity" v="fountain"/>
+ <inputSet ref="common"/>
+ <inputSet ref="simpleName"/>
+ </feature>
+
+ <feature name="Vending machine">
+ <category>amenity</category>
+ <category>foodanddrink</category>
+ <icon image="features/pois/shopping_vending_machine.n.24.png">A vending machine.</icon>
+
+ <point/>
+ <tag k="amenity" v="vending_machine"/>
+ <inputSet ref="common"/>
+ <inputSet ref="simpleName"/>
+ <input type="freetext" presence="always" name="Product" key="vending" description="What is being sold: tickets, food, maps..."/>
+ <inputSet ref="simpleOperator" />
+ </feature>
+
+ <!-- ========= Entertainment ========= -->
+
+ <feature name="Pub">
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_pub.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dpub</help>
+ <point/>
+ <tag k="amenity" v="pub"/>
+ <inputSet ref="names"/>
+ <inputSet ref="web"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="wifi"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Bar">
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_bar.n.24.png">
+ ${name}
+ </icon>
+ <point/>
+ <tag k="amenity" v="bar"/>
+ <inputSet ref="names"/>
+ <inputSet ref="web"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="wifi"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Restaurant">
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_restaurant.n.24.png">
+ ${name}
+ </icon>
+ <point/>
+ <tag k="amenity" v="restaurant"/>
+ <inputSet ref="names"/>
+ <inputSet ref="web"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="cuisine"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Cafe">
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_cafe.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dcafe</help>
+ <point/>
+ <tag k="amenity" v="cafe"/>
+ <inputSet ref="names"/>
+ <inputSet ref="web"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="cuisine"/>
+ <inputSet ref="wifi"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Fast Food">
+ <category>foodanddrink</category>
+ <icon image="features/pois/food_fastfood.n.24.png">
+ ${name}
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dfast_food</help>
+ <point/>
+ <tag k="amenity" v="fast_food"/>
+ <inputSet ref="names"/>
+ <inputSet ref="web"/>
+ <inputSet ref="buildingAddress"/>
+ <inputSet ref="cuisine"/>
+ <inputSet ref="common"/>
+ </feature>
+
+</featureGroup>
\ No newline at end of file
-<featureGroup>\r
- <feature name="Wall">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dwall</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="wall"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Ditch">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dditch</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="ditch"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Retaining wall">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dretaining_wall</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="retaining_wall"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="City wall">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcity_wall</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="city_wall"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Fence">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dfence</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="fence"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Hedge">\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- <icon>\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dhedge</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="hedge"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Bollard">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_bollard.n.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dbollard</help>\r
-\r
- <point/>\r
- <tag k="barrier" v="bollard"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Gate">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_gate.n.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dgate</help>\r
-\r
- <point/>\r
- <tag k="barrier" v="gate"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Lift Gate">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_lift_gate.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dlift_gate</help>\r
- <point/>\r
- <tag k="barrier" v="lift_gate"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Kissing Gate">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_kissing_gate.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dkissing_gate</help>\r
- <point/>\r
- <tag k="barrier" v="kissing_gate"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
-\r
- <feature name="Cycle Barrier">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_cycle_barrier.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcycle_barrier</help>\r
-\r
- <point/>\r
- <tag k="barrier" v="cycle_barrier"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Big Concrete Blocks">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_blocks.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dblock</help>\r
-\r
- <point/>\r
- <tag k="barrier" v="block"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Cattle Grid">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_cattle_grid.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcattle_grid</help>\r
-\r
- <point/>\r
- <tag k="barrier" v="cattle_grid"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Toll Booth">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_toll_booth.n.24.png">\r
- </icon>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dtoll_booth</help>\r
-\r
- <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
- <inputSet ref="common"/>\r
- </feature>\r
-\r
-\r
- <feature name="Stile">\r
- <category>barrier</category>\r
- <icon image="features/pois/barrier_stile.n.24.png"/>\r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dstile</help>\r
- <point/>\r
- <tag k="barrier" v="stile"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
-\r
- <feature name="Wire fence">\r
- <!-- no idea, but taginfo says 2700 uses -->\r
- <category>barrier</category>\r
- <icon image="features/barrier_generic.png"/>\r
- \r
- <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dwire_fence</help>\r
-\r
- <line/>\r
- <tag k="barrier" v="wire_fence"/>\r
- <inputSet ref="common"/>\r
- </feature>\r
+<featureGroup>
+ <feature name="Wall">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dwall</help>
+
+ <line/>
+ <tag k="barrier" v="wall"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Ditch">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dditch</help>
+
+ <line/>
+ <tag k="barrier" v="ditch"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Retaining wall">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dretaining_wall</help>
+
+ <line/>
+ <tag k="barrier" v="retaining_wall"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="City wall">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcity_wall</help>
+
+ <line/>
+ <tag k="barrier" v="city_wall"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Fence">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dfence</help>
+
+ <line/>
+ <tag k="barrier" v="fence"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Hedge">
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+ <icon>
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dhedge</help>
+
+ <line/>
+ <tag k="barrier" v="hedge"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Bollard">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_bollard.n.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dbollard</help>
+
+ <point/>
+ <tag k="barrier" v="bollard"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Gate">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_gate.n.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dgate</help>
+
+ <point/>
+ <tag k="barrier" v="gate"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Lift Gate">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_lift_gate.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dlift_gate</help>
+ <point/>
+ <tag k="barrier" v="lift_gate"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Kissing Gate">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_kissing_gate.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dkissing_gate</help>
+ <point/>
+ <tag k="barrier" v="kissing_gate"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+
+ <feature name="Cycle Barrier">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_cycle_barrier.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcycle_barrier</help>
+
+ <point/>
+ <tag k="barrier" v="cycle_barrier"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Big Concrete Blocks">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_blocks.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dblock</help>
+
+ <point/>
+ <tag k="barrier" v="block"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Cattle Grid">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_cattle_grid.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dcattle_grid</help>
+
+ <point/>
+ <tag k="barrier" v="cattle_grid"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Toll Booth">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_toll_booth.n.24.png">
+ </icon>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dtoll_booth</help>
+
+ <point/>
+ <tag k="barrier" v="toll_booth"/>
+ <inputSet ref="fee"/>
+ <input type="freetext" presence="onTagMatch" category="Details" name="Operator" key="operator" description="The provider of the toll" priority="low"/>
+ <inputSet ref="common"/>
+ </feature>
+
+
+ <feature name="Stile">
+ <category>barrier</category>
+ <icon image="features/pois/barrier_stile.n.24.png"/>
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dstile</help>
+ <point/>
+ <tag k="barrier" v="stile"/>
+ <inputSet ref="common"/>
+ </feature>
+
+ <feature name="Wire fence">
+ <!-- no idea, but taginfo says 2700 uses -->
+ <category>barrier</category>
+ <icon image="features/barrier_generic.png"/>
+
+ <help>http://wiki.openstreetmap.org/wiki/Tag:barrier%3Dwire_fence</help>
+
+ <line/>
+ <tag k="barrier" v="wire_fence"/>
+ <inputSet ref="common"/>
+ </feature>
</featureGroup>
\ No newline at end of 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
-<!-- This is a bit of a dumping ground for real landuse=*, but also outdoor natural/leisure/agriculture type keys. -->\r
-<featureGroup>\r
- <feature name="Industrial Area">\r
- <category>landuse</category>\r
- <area/>\r
- <icon image="features/pois/building_generic.png">\r
- <b>${name}</b>\r
- </icon>\r