First stab at linking through to the OSM pages
authorAndy Allan <gravitystorm@gmail.com>
Thu, 7 Oct 2010 14:32:38 +0000 (14:32 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Thu, 7 Oct 2010 14:32:38 +0000 (14:32 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index 38e526f..72716a1 100644 (file)
@@ -58,7 +58,7 @@
         </mx:HBox>
       </mx:VBox>
       <mx:VBox width="100%" height="100%" label="Advanced" id="advancedContainer" initialize="checkAdvanced()" verticalGap="1">
-        <mx:Label id="advancedID">
+        <mx:Label id="advancedID" click="openEntityPage()">
           <mx:htmlText><![CDATA[<i>No Selection</i>]]></mx:htmlText>
         </mx:Label>
 
               navigateToURL(new URLRequest(feature.helpURL), "potlatch_help");
       }
 
+      public function openEntityPage():void {
+          if (selectedEntity != null)
+              // TODO: make this robust against -ve ids
+              // TODO: make this choose the correct server
+              navigateToURL(new URLRequest('http://www.openstreetmap.org/browse/'+selectedEntity.getType()+'/'+selectedEntity.id), "potlatch_browse");
+      }
+
       public function addNewTag():void {
           if (stack.selectedChild!=advancedContainer || selectedEntity == null) { return; }
           var newKey:String = "(new tag)";