Allow pubs to be given names.
[potlatch2.git] / potlatch2.mxml
index 6553c615c654905824e4c01f87806c03a3edf2e3..0ed126352b574ea8fb59740d0abbe2b3ca4f9b6b 100755 (executable)
@@ -27,9 +27,6 @@
             creationComplete="bgButton.popUp = new BackgroundSelector();"/>
         <mx:PopUpButton id="styleButton" label="Map Style" openAlways="true"
             creationComplete="styleButton.popUp = new StyleSelector();"/>
             creationComplete="bgButton.popUp = new BackgroundSelector();"/>
         <mx:PopUpButton id="styleButton" label="Map Style" openAlways="true"
             creationComplete="styleButton.popUp = new StyleSelector();"/>
-        <mx:Image id="pub" source="@Embed('resources/icons/pub.png')" mouseMove="dragPOI(event, [['amenity','pub']])" />
-        <mx:Image id="station" source="@Embed('resources/icons/station.png')"
-            mouseMove="dragPOI(event, [['railway', 'station'],['name','Charbury International']])" />
         <mx:Spacer width="100%"/>
         <mx:Button label="Help" click="new HelpDialog().init();" />
         <mx:Button label="Options" click="new OptionsDialog().init();" />
         <mx:Spacer width="100%"/>
         <mx:Button label="Help" click="new HelpDialog().init();" />
         <mx:Button label="Options" click="new OptionsDialog().init();" />
             dataWorking.visible = false;
         }
         
             dataWorking.visible = false;
         }
         
-        private function dragPOI(event:MouseEvent, tags:Array):void {
-            // Get the drag initiator component from the event object.
-            var dragInitiator:Image = event.currentTarget as Image;
-            var dragSource:DragSource = new DragSource();
-            dragSource.addData(tags, 'tags');
-            
-            var dragProxy:Image = new Image();
-            dragProxy.source = event.currentTarget.source;
-            
-            DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);
-        }
+
         
         private function dragEnterHandler(event:DragEvent):void {
             // Get the drop target component from the event object.
         
         private function dragEnterHandler(event:DragEvent):void {
             // Get the drop target component from the event object.
             var lat:Number = Globals.vars.root.coord2lat(mapLoc.y);
             var lon:Number = Globals.vars.root.coord2lon(mapLoc.x);
             var node:Node = Connection.getConnectionInstance().createNode({}, lat, lon);
             var lat:Number = Globals.vars.root.coord2lat(mapLoc.y);
             var lon:Number = Globals.vars.root.coord2lon(mapLoc.x);
             var node:Node = Connection.getConnectionInstance().createNode({}, lat, lon);
-            for each( var tag:Array in tags ) {
-              node.setTag(tag[0],tag[1]);
+            for each ( var tag:Object in tags ) {
+              node.setTag(tag.k, tag.v);
             }
             }
+                       Connection.getConnectionInstance().registerPOI(node);
         }
 
        ]]></mx:Script>
         }
 
        ]]></mx:Script>