Don't hard-code the live osm.org instance
authorAndy Allan <gravitystorm@gmail.com>
Thu, 7 Oct 2010 14:32:42 +0000 (14:32 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Thu, 7 Oct 2010 14:32:42 +0000 (14:32 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index ffbbc57..1e2f72e 100644 (file)
       }
 
       public function openEntityPage():void {
-          if (selectedEntity != null && selectedEntity.id >= 0)
-              // TODO: make this choose the correct server
-              navigateToURL(new URLRequest('http://www.openstreetmap.org/browse/'+selectedEntity.getType()+'/'+selectedEntity.id), "potlatch_browse");
+          if (selectedEntity != null && selectedEntity.id >= 0) {
+              // This is slightly hard-coded, but not drastically. The ../s could be changed for string manipulation of the apiBase
+              var urlBase:String = Connection.getConnectionInstance().apiBase + '../../browse/'
+              navigateToURL(new URLRequest(urlBase+selectedEntity.getType()+'/'+selectedEntity.id), "potlatch_browse");
+          }
       }
 
       public function addNewTag():void {