Merge branch 'master' into snapshotserver
authorAndy Allan <andy@gravitystorm.co.uk>
Fri, 30 Sep 2011 15:04:57 +0000 (16:04 +0100)
committerAndy Allan <andy@gravitystorm.co.uk>
Fri, 30 Sep 2011 15:04:57 +0000 (16:04 +0100)
21 files changed:
.gitignore
build.xml
net/systemeD/controls/DataGridWarningField.as
net/systemeD/halcyon/Map.as
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/Trace.as
net/systemeD/halcyon/connection/XMLBaseConnection.as
net/systemeD/halcyon/connection/XMLConnection.as
net/systemeD/halcyon/connection/actions/SetTagAction.as
net/systemeD/potlatch2/controller/ControllerState.as
net/systemeD/potlatch2/find/FindDialog.mxml
potlatch2.mxml
resources/imagery.xml
resources/map_features.xml
resources/map_features/amenities.xml
resources/map_features/barriers.xml
resources/map_features/landuse.xml
resources/map_features/paths.xml
resources/map_features/transport.xml
resources/potlatch2.html
resources/server.rb [changed mode: 0644->0755]

index b07f606..a70a75a 100644 (file)
@@ -9,6 +9,7 @@ resources/*.swf
 resources/*.cache
 resources/docs
 resources/mapquest
+resources/generated
 
 /tests/bin/
 /tests/report/
index 19b91a5..aa58536 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,4 +1,4 @@
-<project name="Potlatch2 ├╝ber compile system" default="debug">
+<project name="Potlatch 2" default="debug">
 
   <!-- load properties from the environment -->
   <property environment="env" />
@@ -45,7 +45,7 @@
   </target>
 
   <!-- Build and output potlatch2.swf in release mode -->
-  <target name="release" depends="init">
+  <target name="release" depends="init"> <!-- FIXME convention is dist not release -->
     <mxmlc file="potlatch2.mxml">
       <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
       <source-path path-element="${FLEX_HOME}/frameworks"/>
     <deployLocale locale="pl_PL" />
   </target>
 
+
+  <target name="clean"
+    description="clean up" >
+    <!-- Delete the ${build} and ${dist} directory trees -->
+    <!--
+
+    FIXME what is supposed to be cleaned?
+
+    <delete dir="${build}"/>
+    <delete dir="${dist}"/>
+
+    -->
+  </target>
+
+
 </project>
index dbc4777..47ac699 100644 (file)
@@ -8,6 +8,7 @@ package net.systemeD.controls {
 
                private var _image:Image;
                [Embed(source="../../../embedded/warning.png")] private var warningIcon:Class;
+               private var _whiteList:Array = ["source","collection_times","service_times","smoking_hours","opening_hours"];
 
                function DataGridWarningField():void {
                        super();
@@ -25,8 +26,8 @@ package net.systemeD.controls {
 
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
                        super.updateDisplayList(unscaledWidth, unscaledHeight);
-                       if (data.value && data.value.indexOf(';')>-1) {
+
+                       if (data.value && (_whiteList.indexOf(data.key)==-1) && (data.value.indexOf(';')>-1)) { 
                                setStyle('color',0xFF0000);
                                _image.visible=true;
                                _image.x = width -_image.width -5;
index e214800..b84e0fc 100644 (file)
@@ -120,7 +120,7 @@ package net.systemeD.halcyon {
                // ------------------------------------------------------------------------------------------
                /** Recalculate co-ordinates from new Flash origin */
 
-               public function updateCoords(tx:Number,ty:Number):void {
+               private function updateCoords(tx:Number,ty:Number):void {
                        setScrollRectXY(tx,ty);
 
                        edge_t=coord2lat(-ty          );
@@ -133,7 +133,7 @@ package net.systemeD.halcyon {
                }
                
                /** Move the map to centre on a given latitude/longitude. */
-               public function updateCoordsFromLatLon(lat:Number,lon:Number):void {
+               private function updateCoordsFromLatLon(lat:Number,lon:Number):void {
                        var cy:Number=-(lat2coord(lat)-mapheight/2);
                        var cx:Number=-(lon2coord(lon)-mapwidth/2);
                        updateCoords(cx,cy);
index 148f605..ea6da9c 100644 (file)
@@ -440,7 +440,7 @@ package net.systemeD.halcyon.connection {
             return changeset;
         }
 
-        protected function addTrace(t:Object):void {
+        public function addTrace(t:Object):void {
             traces.push(t);
         }
 
@@ -448,6 +448,13 @@ package net.systemeD.halcyon.connection {
             traces = [];
         }
 
+               public function findTrace(id:int):Trace {
+                       for each (var t:Trace in traces) {
+                               if (t.id == id) return t;
+                       }
+                       return null;
+               }
+
         public function getTraces():Array {
             return traces;
         }
index 22a0b64..8a4199e 100644 (file)
@@ -24,7 +24,7 @@ package net.systemeD.halcyon.connection {
         private var _traceData:String; // the trace data, saved as a string
         private var map:Map;
         private var _layer:MapPaint;
-        private var masterConnection:XMLConnection; // The authenticated connection
+        private var masterConnection:Connection; // The authenticated connection
         private var _connection:Connection; // The one we store our fake nodes/ways in.
         private var simplify:Boolean = false;
 
@@ -33,9 +33,10 @@ package net.systemeD.halcyon.connection {
         /** Create a new trace.
         * @param masterConnection The authenticated connection to communicate with the server
         */
-        public function Trace(masterConnection:XMLConnection) {
+        public function Trace(masterConnection:Connection, id:int=0) {
             this.masterConnection = masterConnection;
             map = Globals.vars.root; // REFACTOR this prevents traces being added to arbitrary maps
+                       if (id!=0) _id=id;
         }
 
         /** Create a new trace, from the XML description given by the user/traces call.
@@ -112,6 +113,7 @@ package net.systemeD.halcyon.connection {
 
         private function processEvent(e:Event):void {
             removeEventListener("loaded_data", processEvent);
+            _isLoaded=true;
             process();
         }
 
index 28fbae8..48159ba 100644 (file)
@@ -22,7 +22,7 @@ package net.systemeD.halcyon.connection {
                protected function loadedMap(event:Event):void {
                        var map:XML = new XML(URLLoader(event.target).data);
                        
-                       if (map.localName=="osmError") {
+                       if (map.name().localName=="osmError") {
                                dispatchEvent(new MapEvent(MapEvent.ERROR, { message: "Couldn't load the map: " + map.message } ));
                        } else {
                                var id:Number;
index d420da9..9b94f20 100644 (file)
@@ -449,17 +449,17 @@ package net.systemeD.halcyon.connection {
             }
         }
 
-        private function tracesLoadComplete(event:Event):void {
-            clearTraces();
-            var files:XML = new XML(URLLoader(event.target).data);
-            for each(var traceData:XML in files.gpx_file) {
-              var t:Trace = new Trace(this).fromXML(traceData);
-              addTrace(t);
-            }
-            traces_loaded = true;
-            dispatchEvent(new Event(LOAD_COMPLETED));
-            dispatchEvent(new Event(TRACES_LOADED));
-        }
+               private function tracesLoadComplete(event:Event):void {
+                       var files:XML = new XML(URLLoader(event.target).data);
+                       for each(var traceData:XML in files.gpx_file) {
+                               var t:Trace = findTrace(traceData.@id);
+                               if (!t) { t=new Trace(this); addTrace(t); }
+                               t.fromXML(traceData);
+                       }
+                       traces_loaded = true;
+                       dispatchEvent(new Event(LOAD_COMPLETED));
+                       dispatchEvent(new Event(TRACES_LOADED));
+               }
 
         override public function fetchTrace(id:Number, callback:Function):void {
             sendOAuthGet(apiBaseURL+"gpx/"+id+"/data.xml", 
index c8b3bc6..2117f4b 100644 (file)
@@ -17,7 +17,9 @@ package net.systemeD.halcyon.connection.actions {
         public override function doAction():uint {
             var tags:Object = entity.getTagsHash();
             oldValue = tags[key];
-            if ( value == null || key == '' || oldValue != value ) {
+
+            if ( !( ( entity.getTag(key) == null ) && ( value == null && oldValue == null ) ) &&
+                ( value == null || key == '' || oldValue != value ) ) {
                 if ( value == null || key == '' || value == '' )
                     delete tags[key];
                 else
index 87ff4cb..8c7b32c 100644 (file)
@@ -131,17 +131,14 @@ package net.systemeD.potlatch2.controller {
                        } else if ( event.type == MouseEvent.MOUSE_DOWN ) {
                                if ( entity is Node && selectedWay && entity.hasParent(selectedWay) ) {
                                        // select node within this way
-                       return new DragWayNode(selectedWay,  getNodeIndex(selectedWay,entity as Node),  event, false);
-                               } else if ( entity is Node && focus is Way ) {
-                                       // select way node
-                                       return new DragWayNode(focus as Way, getNodeIndex(focus as Way,entity as Node), event, false);
+                                       return new DragWayNode(selectedWay,  getNodeIndex(selectedWay,entity as Node),  event, false);
                                } else if ( controller.keyDown(Keyboard.SPACE) ) {
                                        // drag the background imagery to compensate for poor alignment
                                        return new DragBackground(event);
                                } else if (entity && selection.indexOf(entity)>-1) {
                                        return new DragSelection(selection, event);
                                } else if (entity) {
-                                       return new DragSelection([entity], event);
+                                       return controller.findStateForSelection([entity]);
                                } else if (event.ctrlKey && !layer.isBackground) {
                                        return new SelectArea(event.localX,event.localY,selection);
                                }
index a64c90e..653dfe6 100644 (file)
@@ -74,8 +74,7 @@
         }
         
         private function goToSelected():void {
-            Application.application.theMap.updateCoordsFromLatLon(selectedResult.lat, selectedResult.lon);
-            Application.application.theMap.download();
+            Application.application.theMap.moveMapFromLatLon(selectedResult.lat, selectedResult.lon);
             //Application.application.theMap.redraw();            
             PopUpManager.removePopUp(this);
         }
index 0c3e996..bb95c41 100644 (file)
     <mx:WipeRight id="wipeIn" duration="250"/>
 
     <mx:ApplicationControlBar 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:Spacer width="40"/>
+        <mx:Button id="undo" label="Undo" click="MainUndoStack.getGlobalStack().undo();" styleName="appBarButton"
+            enabled="{MainUndoStack.getGlobalStack().canUndo()}"
+            toolTip="{MainUndoStack.getGlobalStack().getUndoDescription() ? 'Undo '+MainUndoStack.getGlobalStack().getUndoDescription() : 'Undo last action'}" />
+        <mx:Button id="redo" label="Redo" click="MainUndoStack.getGlobalStack().redo();" styleName="appBarButton"
+            enabled="{MainUndoStack.getGlobalStack().canRedo()}"
+            toolTip="{MainUndoStack.getGlobalStack().getRedoDescription() ? 'Redo '+MainUndoStack.getGlobalStack().getRedoDescription() : 'Redo last action'}" />
+        <mx:Spacer width="100%"/>
         <mx:PopUpButton id="bgButton" label="Background" openAlways="true" styleName="appBarButton"
             creationComplete="bgButton.popUp = new BackgroundSelector();"/>
         <mx:PopUpButton id="styleButton" label="Map Style" openAlways="true" styleName="appBarButton"
                                </mx:Array>
                        </mx:dataProvider>
                </mx:PopUpMenuButton>
-        <mx:Spacer width="100%"/>
-        <mx:Button id="undo" label="Undo" click="MainUndoStack.getGlobalStack().undo();" styleName="appBarButton"
-            enabled="{MainUndoStack.getGlobalStack().canUndo()}"
-            toolTip="{MainUndoStack.getGlobalStack().getUndoDescription() ? 'Undo '+MainUndoStack.getGlobalStack().getUndoDescription() : 'Undo last action'}" />
-        <mx:Button id="redo" label="Redo" click="MainUndoStack.getGlobalStack().redo();" styleName="appBarButton"
-            enabled="{MainUndoStack.getGlobalStack().canRedo()}"
-            toolTip="{MainUndoStack.getGlobalStack().getRedoDescription() ? 'Redo '+MainUndoStack.getGlobalStack().getRedoDescription() : 'Redo last action'}" />
-        <mx:Spacer width="100%"/>
-        <mx:Button id="helpButton" label="Help" click="new HelpDialog().init();" styleName="appBarButton" />
         <mx:Button id="optionsButton" label="Options" click="new OptionsDialog().init();" styleName="appBarButton" />
-        <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:ApplicationControlBar>
     
     <mx:HDividedBox width="100%" height="100%">
         }
 
         private function loadTrace(id:Number):void {
-            var conn:Connection = theMap.editableLayer.connection;
-            conn.addEventListener(Connection.TRACES_LOADED, function (e:Event):void {
-                for each (var trace:Trace in conn.getTraces()) {
-                    if (trace.id == id) { trace.addToMap(); }
-                }
-            });
-            conn.fetchUserTraces();
+                       var conn:Connection = theMap.editableLayer.connection;
+                       conn.addEventListener(Connection.TRACES_LOADED, function (e:Event):void {
+                               var t:Trace = conn.findTrace(id);
+                               if (!t) { t=new Trace(conn,id); conn.addTrace(t); }
+                               t.addToMap();
+                               conn.removeEventListener(Connection.TRACES_LOADED, arguments.callee);
+                       });
+                       conn.fetchUserTraces();
         }
 
        ]]></mx:Script>
index eaf416a..ebe2db7 100644 (file)
                <url>http://cube.telascience.org/tilecache/tilecache.py/1.0.0/NAIP_ALL/$z/$x/$y.png</url>
                <sourcetag>NAIP</sourcetag>
        </set>
-    <set minlat="54.44" minlon="7.81" maxlat="57.86" maxlon="15.49">
-        <name>Denmark - Fugro Aerial Imagery</name>
-        <url>http://fugro.findvej.dk/fugro2005/$z/$x/$y.jpg</url>
-        <sourcetag>Fugro (2005)</sourcetag>
-    </set>
+       <set minlat="54.44" minlon="7.81" maxlat="57.86" maxlon="15.49">
+               <name>Denmark - Fugro Aerial Imagery</name>
+               <url>http://tile.openstreetmap.dk/fugro2005/$z/$x/$y.jpg</url>
+               <sourcetag>Fugro (2005)</sourcetag>
+       </set>
+       <set minlat="55.23403" minlon="12.09144" maxlat="55.43647" maxlon="12.47712">
+               <name>Denmark - Stevns Kommune</name>
+               <url>http://tile.openstreetmap.dk/stevns/2009/$z/$x/$y.jpg</url>
+               <sourcetag>Stevns Kommune (2009)</sourcetag>
+       </set>
 </imagery>
index 93d7209..de8d458 100644 (file)
@@ -85,6 +85,13 @@ Quick documentation:
     <input type="freetext" presence="always" name="Reference number" key="ref" description="A reference number or code used to identify this thing." />
   </inputSet>
 
+   <inputSet id="simpleBrand"> 
+     <input type="freetext" category="Naming" presence="always" name="Brand" key="brand" description="Brand, i.e. Acme"/> 
+   </inputSet> 
+  
+   <inputSet id="simpleOperator"> 
+     <input type="freetext" category="Naming" presence="always" name="Operator" key="operator" description="Operator, i.e. Acme Springfield Ltd"/> 
+   </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"/>
@@ -296,6 +303,8 @@ Quick documentation:
     <input type="choice" name="Electrified" category="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"
@@ -602,6 +611,44 @@ Quick documentation:
     </input>
   </inputSet>
 
+  <inputSet id="pitchSport">
+    <input name="Sport" presence="always" category="Sport" 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="Korfball"/>
+      <choice value="pelota" text="Pelota"/>
+      <choice value="rugby_league" text="Rugby league"/>
+      <choice value="rugby_union" text="Rugby union"/>
+      <choice value="shooting" text="Shooting"/>
+      <choice value="skating" text="Ice skating"/>
+      <choice value="skateboard" text="Skateboarding"/>
+      <choice value="soccer" text="Soccer/football"/>
+      <choice value="swimming" text="Swimming"/>
+      <choice value="table_tennis" text="Table tennis"/>
+      <choice value="tennis" text="Tennis"/>
+      <choice value="volleyball" text="Volleyball"/>
+    </input>
+  </inputSet>
+
 
 <!-- Features -->
 
index 1ca1ddd..988d6cf 100644 (file)
     <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
     <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
+    <inputSet ref="simpleName"/>\r
   </feature>\r
 \r
   <feature name="Trash/rubbish bin">\r
     <point/>\r
     <area/>\r
     <tag k="amenity" v="shelter"/>\r
-    <inputset ref="names"/>\r
+    <input type="choice" presence="always" name="Type of shelter" key="shelter_type" description="The intended use of the shelter.">\r
+      <choice value="picnic_shelter" text="Picnic shelter"/>\r
+      <choice value="public_transport" text="Public transport"/>\r
+      <choice value="weather_shelter" text="Weather shelter"/>\r
+      <choice value="wildlife_hide" text="Wildlife hide"/>\r
+    </input>\r
+    <inputSet ref="names"/>\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
     <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
-    <input type="operator" presence="always" name="Operator" key="operator" description="Which company provides the service" />\r
+    <inputSet ref="simpleOperator"/>\r
   </feature>\r
 \r
   <!-- ========= Entertainment ========= -->\r
     <inputSet ref="common"/>\r
   </feature>\r
 \r
-</featureGroup>
\ No newline at end of file
+</featureGroup>\r
index fc3dbff..eee7f27 100644 (file)
 \r
     <point/>\r
     <tag k="barrier" v="toll_booth"/>\r
-    <tagSet ref="fee"/>\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
index e297d2e..3ebbcbd 100644 (file)
   </feature>\r
 \r
 \r
-  <inputSet id="pitchSport">\r
-    <input name="Sport" presence="always" category="Sport" key="sport" type="choice" description="The sport that is predominantly played here.">\r
-      <choice value="9pin" text="9 pin bowling"/>\r
-      <choice value="10pin" text="10 pin bowling"/>\r
-      <choice value="american_football" text="American football"/>\r
-      <choice value="archery" text="Archery"/>\r
-      <choice value="athletics" text="Athletics"/>\r
-      <choice value="australian_football" text="Australian Rules Football"/>\r
-      <choice value="baseball" text="Baseball"/>\r
-      <choice value="basketball" text="Basketball"/>\r
-      <choice value="beachvolleyball" text="Beach volleyball"/>\r
-      <choice value="boules" text="Boules/petanque/bocci"/>\r
-      <choice value="bowls" text="Lawn bowls"/>\r
-      <choice value="canadian_football" text="Canadian football"/>\r
-      <choice value="chess" text="Chess"/>\r
-      <choice value="cricket" text="Cricket"/>\r
-      <choice value="cricket_nets" text="Cricket nets"/>\r
-      <choice value="croquet" text="Croquet"/>\r
-      <choice value="equestrian" text="Equestrian"/>\r
-      <choice value="gaelic_football" text="Gaelic football"/>\r
-      <choice value="gymnastics" text="Gymnastics"/>\r
-      <choice value="team_handball" text="(Team) handball"/>\r
-      <choice value="hockey" text="(Field) hockey"/>\r
-      <choice value="korfball" text="Korball"/>\r
-      <choice value="pelota" text="Pelota"/>\r
-      <choice value="rugby_league" text="Rugby league"/>\r
-      <choice value="rugby_union" text="Rugby union"/>\r
-      <choice value="shooting" text="Shooting"/>\r
-      <choice value="skating" text="Ice skating"/>\r
-      <choice value="skateboard" text="Skateboarding"/>\r
-      <choice value="soccer" text="Soccer/football"/>\r
-      <choice value="swimming" text="Swimming"/>\r
-      <choice value="table_tennis" text="Table tennis"/>\r
-      <choice value="tennis" text="Tennis"/>\r
-      <choice value="volleyball" text="Volleyball"/>\r
-    </input>\r
-  </inputSet>\r
-\r
   <feature name="Sports track">\r
     <category>sport</category>\r
     <area/>\r
 \r
   <feature name="Forest">\r
     <category>natural</category>\r
-    <icon image="/features/pois/landuse_coniferous.n.24.png"/>\r
+    <icon image="features/pois/landuse_coniferous.n.24.png"/>\r
 \r
     <area/>\r
     <tag k="landuse" v="forest"/>\r
index 87e7e0d..387f4b5 100644 (file)
@@ -9,7 +9,6 @@
     <tag k="highway" v="footway"/>\r
     <inputSet ref="path"/>\r
     <inputSet ref="common"/>\r
-    <inputset ref="naming"/>\r
   </feature>\r
 \r
   <feature name="Cycle path">\r
     <tag k="highway" v="cycleway"/>\r
     <inputSet ref="path"/>\r
     <inputSet ref="common"/>\r
-    <inputset ref="naming"/>\r
-    <input type="choice"\r
-        name="Cycleway type" category="Cycle" description="What kind of bike path is this?"\r
-        key="cycleway" presence="onTagMatch" priority="low">\r
-        <choice value="segregated" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb."/>\r
-        <choice value="shared" text="Shared" description="Cyclists and pedestrians share the full width of the path."/>\r
+    <input type="choice" name="Cycleway type" category="Cycle" description="What kind of bike path is this?" key="segregated" presence="onTagMatch" priority="low"> \r
+       <choice value="yes" text="Segregated" description="Cyclists and pedestrians are separated by a painted line or kerb." /> \r
+       <choice value="no" text="Shared" description="Cyclists and pedestrians share the full width of the path." /> \r
     </input> \r
   </feature>\r
 \r
@@ -51,7 +47,6 @@
     </area>\r
     <inputSet ref="minorRoad"/>\r
     <inputSet ref="common"/>\r
-    <inputset ref="naming"/>\r
   </feature>\r
 \r
   <feature name="Bridleway">\r
@@ -63,7 +58,6 @@
     <tag k="highway" v="bridleway"/>\r
     <inputSet ref="path"/>\r
     <inputSet ref="common"/>\r
-    <inputset ref="naming"/>\r
   </feature>\r
 \r
   <feature name="Steps">\r
     <inputSet ref="common"/>\r
   </feature>\r
   \r
-  <feature name="Generic path">
-    <category>paths</category>
-    <icon image="features/paths__unofficial.png">
-      ${name} <i>${ncn_ref} ${rcn_ref} ${lcn_ref} ${ref}</i>
-    </icon>
-    <help>http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpath</help>
-
-    <line/>
-    <tag k="highway" v="path"/>
-    <inputSet ref="path"/>
-    <inputSet ref="common"/>
-    <inputset ref="naming"/>
-  </feature>
-
+  <feature name="Generic path">\r
+    <category>paths</category>\r
+    <icon image="features/paths__unofficial.png">\r
+      ${name} <i>${ncn_ref} ${rcn_ref} ${lcn_ref} ${ref}</i>\r
+    </icon>\r
+    <help>http://wiki.openstreetmap.org/wiki/Tag:highway%3Dpath</help>\r
+\r
+    <line/>\r
+    <tag k="highway" v="path"/>\r
+    <inputSet ref="path"/>\r
+    <inputSet ref="common"/>\r
+  </feature>\r
+\r
   \r
   <!-- Bicycle routes -->\r
   <feature name="National Cycle Network">\r
     <category>paths</category>\r
-    <icon image="features/route__ncn.png" background="red" foreground="white">
+    <icon image="features/route__ncn.png" background="red" foreground="white">\r
       <font size="14pt">\r
         <b>${ref}</b>\r
       </font>\r
 \r
     <relation/>\r
     <tag k="type" v="route"/>\r
-    <tag k="route" v="bicycle"/>
+    <tag k="route" v="bicycle"/>\r
     <tag k="network" v="ncn"/>\r
 \r
     <inputSet ref="route"/>\r
 \r
   <feature name="Regional Cycle Network">\r
     <category>paths</category>\r
-    <icon image="features/route__rcn.png" background="cyan" foreground="white">
+    <icon image="features/route__rcn.png" background="cyan" foreground="white">\r
       <font size="14pt"><b>${ref}</b></font><br/>\r
       <font size="12pt">${name}</font>\r
     </icon>\r
 \r
     <relation/>\r
     <tag k="type" v="route"/>\r
-    <tag k="route" v="bicycle"/>
+    <tag k="route" v="bicycle"/>\r
     <tag k="network" v="lcn"/>\r
 \r
     <inputSet ref="route"/>\r
   \r
   <feature name="Long Distance Path">\r
     <category>paths</category>\r
-    <icon image="features/route__nwn.png" background="green" foreground="white">
+    <icon image="features/route__nwn.png" background="green" foreground="white">\r
       <font size="14pt">\r
         <b>${ref}</b>\r
       </font>\r
     <inputSet ref="common"/>\r
   </feature>\r
   \r
-</featureGroup>
\ No newline at end of file
+</featureGroup>\r
index 7c0bad0..4e9a6f6 100644 (file)
@@ -98,7 +98,7 @@
         <tag k="railway" v="light_rail"/>
         <inputSet ref="bridge"/>
         <inputSet ref="tunnel"/>
-        <inputset ref="embankment-cutting"/>
+        <inputSet ref="embankment-cutting"/>
         <inputSet ref="rail-electrification"/>
         <inputSet ref="common"/>
       </feature>
         <input ref="tram-route"/>
         <inputSet ref="bridge"/>
         <inputSet ref="tunnel"/>
-        <inputset ref="embankment-cutting"/>
+        <inputSet ref="embankment-cutting"/>
         <inputSet ref="rail-electrification"/>
         <inputSet ref="common"/>
       </feature>
         <tag k="railway" v="subway"/>
         <inputSet ref="bridge"/>
         <inputSet ref="tunnel"/>
-        <inputset ref="embankment-cutting"/>
+        <inputSet ref="embankment-cutting"/>
         <inputSet ref="rail-electrification"/>
         <inputSet ref="common"/>
       </feature>
 
 
   <feature name="Fuel">
-    <category>transport</category>
-    <point/>
-    <inputSet ref="simpleName"/>
-    <icon image="features/pois/transport_fuel.n.24.png"/>
+    <category>transport</category> 
+    <point /> 
+    <inputSet ref="simpleName" /> 
+    <icon image="features/pois/transport_fuel.n.24.png" />
     <tag k="amenity" v="fuel"/>
-    <input type="freetext" category="Naming" name="Operator" key="operator" description="The provider of the service"/>
-    <input type="choice" category="Fuels" name="Diesel" key="diesel" description="Is diesel fuel sold here?">
+    <inputSet ref="simpleBrand"/>
+    <inputSet ref="simpleOperator"/>
+
+    <input type="choice" category="Fuels" name="Diesel" key="fuel:diesel" description="Is diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 91" key="diesel" description="Is octane 91 unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="GTL Diesel" key="fuel:GTL_diesel" description="Is GTL diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 95" key="octane_95" description="Is octane 95 unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="HGV Diesel" key="fuel:HGV_diesel" description="Is HGV diesel fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 98" key="octane_98" description="Is octane 98 unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="Biodiesel" key="fuel:biodiesel" description="Is biodiesel unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 100" key="octane_100" description="Is octane 100 unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="Octane 91" key="fuel:octane_91" description="Is octane 91 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Ethanol" key="ethanol" description="Is ethanol sold here?">
+    <input type="choice" category="Fuels" name="Octane 95" key="fuel:octane_95" description="Is octane 95 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="LPG" key="lpg" description="Is LPG (liquid petroleum gas) sold here?">
+    <input type="choice" category="Fuels" name="Octane 98" key="fuel:octane_98" description="Is octane 98 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Octane 91" key="diesel" description="Is octane 91 unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="Octane 100" key="fuel:octane_100" description="Is octane 100 unleaded fuel sold here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-    <input type="choice" category="Fuels" name="Bio-diesel" key="biodiesel" description="Is biodiesel unleaded fuel sold here?">
+    <input type="choice" category="Fuels" name="Mixture 1:25" key="fuel:1_25" description="Is mixture 1:25 fuel sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="Mixture 1:50" key="fuel:1_50" description="Is mixture 1:50 fuel sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="E10" key="fuel:e10" description="Is E10 sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="E85" key="fuel:e85" description="Is E85 sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="Biogas" key="fuel:biogas" description="Is biogas sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="CNG" key="fuel:cng" description="Is CNG sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="LPG" key="fuel:lpg" description="Is LPG sold here?" priority="low">
+      <choice value="yes" text="Yes"/>
+      <choice value="no" text="No"/>
+    </input>
+    <input type="choice" category="Fuels" name="Electricity" key="fuel:electricity" description="Is it possible to charge an electric car here?" priority="low">
       <choice value="yes" text="Yes"/>
       <choice value="no" text="No"/>
     </input>
-
-
     <inputSet ref="common"/>
   </feature>
 
   </feature>
 
       
-</featureGroup>
\ No newline at end of file
+</featureGroup>
index cb1f0a9..801b38d 100644 (file)
@@ -1,93 +1,90 @@
 <html>
+  <!-- Potlatch 2 script -->
+  <head>
+    <title>Potlatch Two</title>
+    <script type="text/javascript" src="swfobject.js"></script>
+
+    <script>
+      function getArgs() {
+        var args = new Object();
+        var query = location.search.substring(1);
+        var pairs = query.split("&");
+        for(var i = 0; i < pairs.length; i++) {
+          var pos = pairs[i].indexOf('=');
+          if (pos == -1) continue;
+          var argname = pairs[i].substring(0,pos);
+          var value = pairs[i].substring(pos+1);
+          args[argname] = unescape(value);
+        }
+        return args;
+      }
+
+      var changesaved=true;
 
-<!-- Potlatch 2 script -->
-
-<head>
-<title>Potlatch TWO</title>
-<script type="text/javascript" src="swfobject.js"></script>
-
-<script>
-       function getArgs() {
-               var args = new Object();
-               var query = location.search.substring(1);
-               var pairs = query.split("&");
-               for(var i = 0; i < pairs.length; i++) {
-                       var pos = pairs[i].indexOf('=');
-                       if (pos == -1) continue;
-                       var argname = pairs[i].substring(0,pos);
-                       var value = pairs[i].substring(pos+1);
-                       args[argname] = unescape(value);
-               }
-               return args;
-       }
-
-    var changesaved=true;
-  
-    window.onbeforeunload=function() {
+      window.onbeforeunload=function() {
         if (!changesaved) {
-            return 'You have unsaved changes. You need to press the Save button to save them';
+          return 'You have unsaved changes. You need to press the Save button to save them';
         }
-    }
-
-    function markChanged(a) { changesaved=a; } /* called from flash */
-
-       var attributes = {
-               id: "map",
-               name: "map"
-       };
-
-       
-       var args = getArgs();
-       var lat;
-       var lon;
-       var zoom;
-       if (args.lat && args.lon) {
-               lat = parseFloat(args.lat);
-               lon = parseFloat(args.lon);
-       } else {
-               lat=51.875;
-               lon=-1.492;
-               args["lat"] = lat;
-               args["lon"] = lon;
-       }
-
-       if (args.zoom) {
-               zoom = parseInt(args.zoom);
-       } else {
-               zoom = 16;
-               args["zoom"] = 16;
-       }
-
-                       args["api"] = "http://api06.dev.openstreetmap.org/api/0.6/";
-                       args["policy"] = "http://api06.dev.openstreetmap.org/api/crossdomain.xml";
-                       args["connection"] = "XML";
-                       args["oauth_policy"] = "http://api06.dev.openstreetmap.org/oauth/crossdomain.xml";
-                       args["oauth_request_url"] = "http://api06.dev.openstreetmap.org/oauth/request_token";
-                       args["oauth_access_url"] = "http://api06.dev.openstreetmap.org/oauth/access_token";
-                       args["oauth_auth_url"] = "http://api06.dev.openstreetmap.org/oauth/authorize";
-                       args["oauth_consumer_key"] = "fiM1IoqnKJk4JCfcl63DA";
-                       args["oauth_consumer_secret"] = "7fYgJK9M4vB1CvBZ6jEsPGxYK9UD1hEnI6NqTxNGs";
-                       args["serverName"] = "api06 Test On Dev";
-               args["show_help"] = "once";
-               args["site_name"] = "OpenStreetMap";
-               args["force_auth"] = "force";
-       
-       var params = false;
-       
-       swfobject.embedSWF("potlatch2.swf?d="+Math.round(Math.random()*1000), "mapHolder", "100%", "100%", "9.0.0", "expressInstall.swf", args, params, attributes);
-</script>
-
-
-</head>
-
-<body>
-
-<div id="mapHolder" style="width:100%; height: 100%; border: 1px solid black">
-       If you see this message you need to install Flash Play 9.0 or above, from Adobe, <a href="http://get.adobe.com/flashplayer/" target="_blank">available here</a> in order to use Potlatch 2
-</div>
-
-
-
-</body>
+      }
+
+      function markChanged(a) { changesaved=a; } /* called from flash */
+
+      var attributes = {
+        id: "map",
+        name: "map"
+      };
+
+
+      var args = getArgs();
+      var lat;
+      var lon;
+      var zoom;
+      if (args.lat && args.lon) {
+        lat = parseFloat(args.lat);
+        lon = parseFloat(args.lon);
+        } else {
+        lat=51.875;
+        lon=-1.492;
+        args["lat"] = lat;
+        args["lon"] = lon;
+      }
+
+      if (args.zoom) {
+        zoom = parseInt(args.zoom);
+        } else {
+        zoom = 16;
+        args["zoom"] = 16;
+      }
+
+      args["api"] = "http://api06.dev.openstreetmap.org/api/0.6/";
+      args["policy"] = "http://api06.dev.openstreetmap.org/api/crossdomain.xml";
+      args["connection"] = "XML";
+      args["oauth_policy"] = "http://api06.dev.openstreetmap.org/oauth/crossdomain.xml";
+      args["oauth_request_url"] = "http://api06.dev.openstreetmap.org/oauth/request_token";
+      args["oauth_access_url"] = "http://api06.dev.openstreetmap.org/oauth/access_token";
+      args["oauth_auth_url"] = "http://api06.dev.openstreetmap.org/oauth/authorize";
+      args["oauth_consumer_key"] = "fiM1IoqnKJk4JCfcl63DA";
+      args["oauth_consumer_secret"] = "7fYgJK9M4vB1CvBZ6jEsPGxYK9UD1hEnI6NqTxNGs";
+      args["serverName"] = "api06 Test On Dev";
+      args["show_help"] = "once";
+      args["site_name"] = "OpenStreetMap";
+      args["force_auth"] = "force";
+
+      var params = false;
+
+      swfobject.embedSWF("potlatch2.swf?d="+Math.round(Math.random()*1000), "mapHolder", "100%", "100%", "9.0.0", "expressInstall.swf", args, params, attributes);
+    </script>
+
+
+  </head>
+
+  <body>
+
+    <div id="mapHolder" style="width:100%; height: 100%; border: 1px solid black">
+      If you see this message you need to install Flash Play 9.0 or above, from Adobe, <a href="http://get.adobe.com/flashplayer/" target="_blank">available here</a> in order to use Potlatch 2
+    </div>
+
+
+  </body>
 </html>
 
old mode 100644 (file)
new mode 100755 (executable)