Move Yahoo into imagery.xml rather than hard-coding it into the menu
authorRichard Fairhurst <richard@systemeD.net>
Sat, 7 May 2011 18:18:18 +0000 (19:18 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sat, 7 May 2011 18:18:18 +0000 (19:18 +0100)
net/systemeD/potlatch2/collections/Imagery.as
resources/imagery.xml

index e837e10..d0443c5 100644 (file)
@@ -61,9 +61,7 @@ package net.systemeD.potlatch2.collections {
             var backgroundSet:Boolean = false;
 
                        // Read all values from XML file
-            collection=new Array(
-                               { name: "None", url: "" },
-                               { name: "Yahoo", url: "yahoo", sourcetag: "Yahoo" } );
+                       collection=new Array({ name: "None", url: "" });
                        for each(var set:XML in xml.set) {
                                var obj:Object={};
                                var a:XML;
@@ -75,7 +73,7 @@ package net.systemeD.potlatch2.collections {
                        }
 
                        // Add user's previous preference (from SharedObject) if we didn't find it in the XML file
-            if (!isSet && saved.name && saved.url && saved.url!='' && saved.url!='yahoo') {
+            if (!isSet && saved.name && saved.url && saved.url!='') {
                 collection.push(saved);
                 isSet=true;
             }
index ddb2b29..fc51419 100644 (file)
         <name>MapQuest Open Aerial</name>
         <url>http://oatile1.mqcdn.com/naip/$z/$x/$y.png</url>
     </set>
+       <set>
+               <name>Yahoo</name>
+               <url>yahoo</url>
+               <sourcetag>yahoo</sourcetag>
+       </set>
        <set>
                <name>OSM - Mapnik</name>
                <url>http://c.tile.openstreetmap.org/$z/$x/$y.png</url>