Merge remote-tracking branch 'gravitystorm/ruin'
authorRichard Fairhurst <richard@systemeD.net>
Sun, 22 May 2011 14:51:02 +0000 (15:51 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sun, 22 May 2011 14:51:02 +0000 (15:51 +0100)
29 files changed:
.gitignore
embedded/search.svg [new file with mode: 0644]
net/systemeD/halcyon/connection/Connection.as
net/systemeD/halcyon/connection/XMLBaseConnection.as
net/systemeD/halcyon/connection/XMLConnection.as
net/systemeD/halcyon/connection/actions/DeleteRelationAction.as
net/systemeD/halcyon/styleparser/RuleSet.as
net/systemeD/potlatch2/RelationLoaderPanel.mxml [new file with mode: 0644]
net/systemeD/potlatch2/RelationSelectPanel.mxml
net/systemeD/potlatch2/TagViewer.mxml
net/systemeD/potlatch2/Yahoo.as
net/systemeD/potlatch2/collections/Imagery.as
net/systemeD/potlatch2/controller/DrawQuadrilateral.as [new file with mode: 0644]
net/systemeD/potlatch2/controller/SelectedPOINode.as
net/systemeD/potlatch2/find/FindDialog.mxml [new file with mode: 0644]
net/systemeD/potlatch2/save/OAuthPanel.mxml
potlatch2.mxml
resources/features/pois/transport_car_wash.n.24.png [new file with mode: 0644]
resources/icons/accommodation_blank.png [deleted file]
resources/icons/shopping_garden_centre.n.16.png
resources/icons/transport_car_wash.n.16.png [new file with mode: 0644]
resources/imagery.xml
resources/map_features/buildings.xml
resources/map_features/transport.xml
resources/ok_go.html [new file with mode: 0644]
resources/potlatch2.html
resources/stylesheets/core_pois.css
resources/swfobject.js
version.as.template

index f3b6c16..b07f606 100644 (file)
@@ -2,13 +2,18 @@ build.properties
 l10n/locale/bundles
 version.as
 halcyon.tmproj
+Potlatch2.as3proj
 
 resources/locales
 resources/*.swf
 resources/*.cache
 resources/docs
+resources/mapquest
 
 /tests/bin/
 /tests/report/
 
 /generated
+
+bin/
+obj/
diff --git a/embedded/search.svg b/embedded/search.svg
new file mode 100644 (file)
index 0000000..f06e194
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 11 Build 196, SVG Export Plug-In . SVG Version: 6.0.0 Build 78)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"    "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
+       <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+       <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
+       <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
+       <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
+       <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
+       <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
+       <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
+       <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
+       <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
+       <!ENTITY ns_svg "http://www.w3.org/2000/svg">
+       <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
+]>
+<svg 
+        width="16" height="15.71" viewBox="0 0 16 15.71">
+               
+               <g id="layer1">
+
+    <path
+       style="fill:#000000;fill-opacity:0.3;fill-rule:evenodd;stroke:none"
+       d="M 7.1875 0.4375 C 3.5583203 0.68135784 0.6403418 2.5439031 0.09375 4.90625 L 0 4.90625 L 0 9.3125 L 0 10.59375 L 0 12.6875 C 0 14.5157 1.4843 16 3.3125 16 L 12.6875 16 C 14.5157 16 16 14.5157 16 12.6875 L 16 10.59375 L 16 9.3125 L 16 4.90625 L 15.90625 4.90625 C 15.31917 2.3689146 12.002 0.43750001 8 0.4375 C 7.724 0.4375 7.4563281 0.41943646 7.1875 0.4375 z "
+       id="rect2395" />
+
+    <path
+       style="fill:#000000;fill-opacity:0.3;fill-rule:evenodd;stroke:none"
+       d="M 7.1875,15.991972 C 3.5583203,15.748114 0.6403418,13.885569 0.09375,11.523222 l -0.09375,0 0,-4.4062502 0,-1.28125 0,-2.09375 c 0,-1.8282 1.4843,-3.31250004 3.3125,-3.31250004 l 9.375,0 c 1.8282,0 3.3125,1.48430004 3.3125,3.31250004 l 0,2.09375 0,1.28125 0,4.4062502 -0.09375,0 C 15.31917,14.060557 12.002,15.991972 8,15.991972 c -0.276,0 -0.5436719,0.01806 -0.8125,0 z"
+       id="rect2395" />
+
+<!-- hand-editing SVGs sucks. Thanks, Illustrator. -->
+                       <circle fill="none" stroke="#FFFFFF" cx="7.126" cy="6.613" r="3.625"/> 
+                       <line fill="none" stroke="#FFFFFF" stroke-width="2" x1="9.188" y1="9.582" x2="12.22" y2="12.613"/>
+               </g>
+       </svg>
index f355b9b..74514eb 100644 (file)
@@ -544,7 +544,7 @@ package net.systemeD.halcyon.connection {
                public function loadBbox(left:Number, right:Number,
                                                                top:Number, bottom:Number):void {
            }
-           public function loadEntity(entity:Entity):void {}
+           public function loadEntityByID(type:String, id:Number):void {}
            public function setAuthToken(id:Object):void {}
         public function setAccessToken(key:String, secret:String):void {}
            public function createChangeset(tags:Object):void {}
@@ -553,6 +553,11 @@ package net.systemeD.halcyon.connection {
         public function fetchUserTraces(refresh:Boolean=false):void {}
         public function fetchTrace(id:Number, callback:Function):void {}
         public function hasAccessToken():Boolean { return false; }
+
+               public function loadEntity(entity:Entity):void {
+                       loadEntityByID(entity.getType(),entity.id);
+               }
+
     }
 
 }
index 7d083b5..01c4360 100644 (file)
@@ -6,6 +6,8 @@ package net.systemeD.halcyon.connection {
        import flash.net.*;
     import org.iotashan.oauth.*;
 
+    import net.systemeD.halcyon.MapEvent;
+
     /**
     * XMLBaseConnection is the common code between connecting to an OSM server
     * (i.e. XMLConnection) and connecting to a standalone .osm file (i.e. OSMConnection)
@@ -18,129 +20,135 @@ package net.systemeD.halcyon.connection {
                
         protected function loadedMap(event:Event):void {
             var map:XML = new XML(URLLoader(event.target).data);
-            var id:Number;
-            var version:uint;
-            var uid:Number;
-            var timestamp:String;
-            var tags:Object;
-            var node:Node, newNode:Node;
-            var unusedNodes:Object={};
+            
+                       if (map.localName=="osmError") {
+                dispatchEvent(new MapEvent(MapEvent.ERROR, { message: "Couldn't load the map: " + map.message } ));
+                       } else {
+                var id:Number;
+                var version:uint;
+                var uid:Number;
+                var timestamp:String;
+                var tags:Object;
+                var node:Node, newNode:Node;
+                var unusedNodes:Object={};
 
-                       var minlon:Number, maxlon:Number, minlat:Number, maxlat:Number;
-                       var singleEntityRequest:Boolean=true;
-                       if (map.bounds.@minlon.length()) {
-                               minlon=map.bounds.@minlon;
-                               maxlon=map.bounds.@maxlon;
-                               minlat=map.bounds.@minlat;
-                               maxlat=map.bounds.@maxlat;
-                               singleEntityRequest=false;
-                       }
+                       var minlon:Number, maxlon:Number, minlat:Number, maxlat:Number;
+                       var singleEntityRequest:Boolean=true;
+                       if (map.bounds.@minlon.length()) {
+                               minlon=map.bounds.@minlon;
+                               maxlon=map.bounds.@maxlon;
+                               minlat=map.bounds.@minlat;
+                               maxlat=map.bounds.@maxlat;
+                               singleEntityRequest=false;
+                       }
 
-            for each(var relData:XML in map.relation) {
-                id = Number(relData.@id);
-                version = uint(relData.@version);
-                uid = Number(relData.@uid);
-                timestamp = relData.@timestamp;
+                for each(var relData:XML in map.relation) {
+                    id = Number(relData.@id);
+                    version = uint(relData.@version);
+                    uid = Number(relData.@uid);
+                    timestamp = relData.@timestamp;
                 
-                var rel:Relation = getRelation(id);
-                if ( rel == null || !rel.loaded ) {
-                    tags = parseTags(relData.tag);
-                    var members:Array = [];
-                    for each(var memberXML:XML in relData.member) {
-                        var type:String = memberXML.@type.toLowerCase();
-                        var role:String = memberXML.@role;
-                        var memberID:Number = Number(memberXML.@ref);
-                        var member:Entity = null;
-                        if ( type == "node" ) {
-                            member = getNode(memberID);
-                            if ( member == null ) {
-                                member = new Node(memberID,0,{},false,0,0);
-                                setNode(Node(member),true);
-                            } else if (member.isDeleted()) {
-                                member.setDeletedState(false);
-                            }
-                        } else if ( type == "way" ) {
-                            member = getWay(memberID);
-                            if (member == null) {
-                                member = new Way(memberID,0,{},false,[]);
-                                setWay(Way(member),true);
-                            }
-                        } else if ( type == "relation" ) {
-                            member = getRelation(memberID);
-                            if (member == null) {
-                                member = new Relation(memberID,0,{},false,[]);
-                                setRelation(Relation(member),true);
+                    var rel:Relation = getRelation(id);
+                    if ( rel == null || !rel.loaded ) {
+                        tags = parseTags(relData.tag);
+                        var members:Array = [];
+                        for each(var memberXML:XML in relData.member) {
+                            var type:String = memberXML.@type.toLowerCase();
+                            var role:String = memberXML.@role;
+                            var memberID:Number = Number(memberXML.@ref);
+                            var member:Entity = null;
+                            if ( type == "node" ) {
+                                member = getNode(memberID);
+                                if ( member == null ) {
+                                    member = new Node(memberID,0,{},false,0,0);
+                                    setNode(Node(member),true);
+                                } else if (member.isDeleted()) {
+                                    member.setDeletedState(false);
+                                }
+                            } else if ( type == "way" ) {
+                                member = getWay(memberID);
+                                if (member == null) {
+                                    member = new Way(memberID,0,{},false,[]);
+                                    setWay(Way(member),true);
+                                }
+                            } else if ( type == "relation" ) {
+                                member = getRelation(memberID);
+                                if (member == null) {
+                                    member = new Relation(memberID,0,{},false,[]);
+                                    setRelation(Relation(member),true);
+                                }
                             }
-                        }
                         
-                        if ( member != null )
-                            members.push(new RelationMember(member, role));
-                    }
+                            if ( member != null )
+                                members.push(new RelationMember(member, role));
+                        }
                     
-                    if ( rel == null )
-                        setRelation(new Relation(id, version, tags, true, members, uid, timestamp), false);
-                    else {
-                        rel.update(version, tags, true, false, members, uid, timestamp);
-                        sendEvent(new EntityEvent(NEW_RELATION, rel), false);
+                        if ( rel == null )
+                            setRelation(new Relation(id, version, tags, true, members, uid, timestamp), false);
+                        else {
+                            rel.update(version, tags, true, false, members, uid, timestamp);
+                            sendEvent(new EntityEvent(NEW_RELATION, rel), false);
+                        }
                     }
                 }
-            }
 
-            for each(var nodeData:XML in map.node) {
-                               id = Number(nodeData.@id);
-                               node = getNode(id);
-                               newNode = new Node(id, 
-                                                  uint(nodeData.@version), 
-                                                  parseTags(nodeData.tag),
-                                                  true, 
-                                                  Number(nodeData.@lat),
-                                                  Number(nodeData.@lon),
-                                                  Number(nodeData.@uid),
-                                                  nodeData.@timestamp);
+                for each(var nodeData:XML in map.node) {
+                               id = Number(nodeData.@id);
+                               node = getNode(id);
+                               newNode = new Node(id, 
+                                                  uint(nodeData.@version), 
+                                                  parseTags(nodeData.tag),
+                                                  true, 
+                                                  Number(nodeData.@lat),
+                                                  Number(nodeData.@lon),
+                                                  Number(nodeData.@uid),
+                                                  nodeData.@timestamp);
                                
-                               if ( singleEntityRequest ) {
-                                       // it's a revert request, so create/update the node
-                                       setOrUpdateNode(newNode, true);
-                               } else if ( node == null || !node.loaded) {
-                                       // the node didn't exist before, so create/update it
-                                       newNode.parentsLoaded=newNode.within(minlon,maxlon,minlat,maxlat);
-                                       setOrUpdateNode(newNode, true);
-                               } else {
-                                       // the node's already in memory, but store it in case one of the new ways needs it
-                                       if (newNode.within(minlon,maxlon,minlat,maxlat)) newNode.parentsLoaded=true;
-                                       unusedNodes[id]=newNode;
-                               }
-                       }
+                               if ( singleEntityRequest ) {
+                                       // it's a revert request, so create/update the node
+                                       setOrUpdateNode(newNode, true);
+                               } else if ( node == null || !node.loaded) {
+                                       // the node didn't exist before, so create/update it
+                                       newNode.parentsLoaded=newNode.within(minlon,maxlon,minlat,maxlat);
+                                       setOrUpdateNode(newNode, true);
+                               } else {
+                                       // the node's already in memory, but store it in case one of the new ways needs it
+                                       if (newNode.within(minlon,maxlon,minlat,maxlat)) newNode.parentsLoaded=true;
+                                       unusedNodes[id]=newNode;
+                               }
+                       }
             
-            for each(var data:XML in map.way) {
-                id = Number(data.@id);
-                version = uint(data.@version);
-                uid = Number(data.@uid);
-                timestamp = data.@timestamp;
+                for each(var data:XML in map.way) {
+                    id = Number(data.@id);
+                    version = uint(data.@version);
+                    uid = Number(data.@uid);
+                    timestamp = data.@timestamp;
 
-                var way:Way = getWay(id);
-                if ( way == null || !way.loaded || singleEntityRequest) {
-                    var nodes:Array = [];
-                    for each(var nd:XML in data.nd) {
-                                               var nodeid:Number=Number(nd.@ref)
-                                               if (getNode(nodeid).isDeleted() && unusedNodes[nodeid]) { 
-                                                       setOrUpdateNode(unusedNodes[nodeid], true); 
-                                               }
-                        nodes.push(getNode(nodeid));
-                                       }
-                    tags = parseTags(data.tag);
-                    if ( way == null ) {
-                        setWay(new Way(id, version, tags, true, nodes, uid, timestamp),false);
-                    } else {
-                                               waycount++;
-                        way.update(version, tags, true, true, nodes, uid, timestamp);
-                        sendEvent(new EntityEvent(NEW_WAY, way), false);
+                    var way:Way = getWay(id);
+                    if ( way == null || !way.loaded || singleEntityRequest) {
+                        var nodes:Array = [];
+                        for each(var nd:XML in data.nd) {
+                                               var nodeid:Number=Number(nd.@ref)
+                                               if (getNode(nodeid).isDeleted() && unusedNodes[nodeid]) { 
+                                                       setOrUpdateNode(unusedNodes[nodeid], true); 
+                                               }
+                            nodes.push(getNode(nodeid));
+                                       }
+                        tags = parseTags(data.tag);
+                        if ( way == null ) {
+                            setWay(new Way(id, version, tags, true, nodes, uid, timestamp),false);
+                        } else {
+                                               waycount++;
+                            way.update(version, tags, true, true, nodes, uid, timestamp);
+                            sendEvent(new EntityEvent(NEW_WAY, way), false);
+                        }
                     }
                 }
-            }
             
-            markBboxLoaded(minlon,maxlon,maxlat,minlat);
-            registerPOINodes();
+                markBboxLoaded(minlon,maxlon,maxlat,minlat);
+                registerPOINodes();
+            }
+
             dispatchEvent(new Event(LOAD_COMPLETED));
         }
         
index a76f5ff..7fe45ec 100644 (file)
@@ -46,9 +46,9 @@ package net.systemeD.halcyon.connection {
             sendLoadRequest(mapRequest);
                }
 
-               override public function loadEntity(entity:Entity):void {
-                       var url:String=Connection.apiBaseURL + entity.getType() + "/" + entity.id;
-                       if (entity is Relation || entity is Way) url+="/full";
+               override public function loadEntityByID(type:String, id:Number):void {
+                       var url:String=Connection.apiBaseURL + type + "/" + id;
+                       if (type=='way') url+="/full";
                        sendLoadRequest(new URLRequest(url));
                }
 
@@ -57,6 +57,7 @@ package net.systemeD.halcyon.connection {
                        mapLoader.addEventListener(Event.COMPLETE, loadedMap);
                        mapLoader.addEventListener(IOErrorEvent.IO_ERROR, errorOnMapLoad);
                        mapLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, mapLoadStatus);
+            request.requestHeaders.push(new URLRequestHeader("X-Error-Format", "XML"));
                        mapLoader.load(request);
                        dispatchEvent(new Event(LOAD_STARTED));
                }
index 4ca186f..56e6cdb 100644 (file)
@@ -25,7 +25,7 @@ package net.systemeD.halcyon.connection.actions {
                        for each (var member:RelationMember in memberList) {
                            member.entity.removeParent(relation);
                        }
-                       memberList.splice(0, memberList.length);
+                       memberList=[];
                        effects.doAction();
                        setDeleted(true);
             
@@ -52,6 +52,7 @@ package net.systemeD.halcyon.connection.actions {
             effects.undoAction();
             for each(var member:RelationMember in oldMemberList) {
                 memberList.push(member);
+                member.entity.addParent(relation);
                 relation.dispatchEvent(new RelationMemberEvent(
                         Connection.RELATION_MEMBER_ADDED, member.entity, relation, 0));
             }
index fed1ea7..33c20b9 100644 (file)
@@ -304,7 +304,7 @@ package net.systemeD.halcyon.styleparser {
 
                private function loadedImage(event:Event):void {
                        var fn:String=event.target.info['filename'];
-                       images[fn]=event.target.data;
+                       images[fn]=event.target.data; if (images[fn].length==0) return;
 
                        var loader:ExtendedLoader = new ExtendedLoader();
                        loader.info['filename']=fn;
diff --git a/net/systemeD/potlatch2/RelationLoaderPanel.mxml b/net/systemeD/potlatch2/RelationLoaderPanel.mxml
new file mode 100644 (file)
index 0000000..53c9624
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:TitleWindow
+       xmlns:mx="http://www.adobe.com/2006/mxml"
+       xmlns:potlatch2="net.systemeD.potlatch2.*"
+       title="Load Relation" width="350" height="160"
+       creationComplete="requestedID.setFocus()"
+       showCloseButton="true" close="PopUpManager.removePopUp(this);">
+       
+       <mx:HBox paddingLeft="3" paddingTop="4">
+               <mx:Label text="Relation ID: " />
+               <mx:TextInput id="requestedID" restrict="0-9" />
+       </mx:HBox>
+    <mx:ControlBar>
+      <mx:Spacer width="100%"/>
+      <mx:Button label="Load" click="loadRelation();" styleName="titleWindowButton" />
+    </mx:ControlBar>
+       <mx:Script><![CDATA[
+               import net.systemeD.halcyon.*;
+               import net.systemeD.halcyon.connection.*;
+               import net.systemeD.potlatch2.*;
+               import mx.managers.PopUpManager;
+
+               private var entity:Entity;
+               private var relid:Number;
+               
+               public function setEntity(e:Entity):void {
+                       entity=e;
+               }
+
+               private function loadRelation():void {
+                       relid = Number(requestedID.text);
+                       PopUpManager.removePopUp(this);
+
+                       var conn:Connection = Connection.getConnectionInstance();
+                       if (!relid) return;
+                       if (conn.getRelation(relid)) {
+                               relationLoaded(null);
+                       } else {
+                               conn.loadEntityByID("relation",relid);
+                               conn.addEventListener(Connection.LOAD_COMPLETED, relationLoaded);
+                       }
+               }
+               
+               private function relationLoaded(event:Event):void {
+                       var conn:Connection = Connection.getConnectionInstance();
+                       var relation:Relation = conn.getRelation(relid);
+                       conn.removeEventListener(Connection.LOAD_COMPLETED, relationLoaded);
+                       if (!relation) return;
+
+                       var undo:CompositeUndoableAction = new CompositeUndoableAction("Add to relation");
+                       if (entity is EntityCollection) {
+                               for each (var e:Entity in EntityCollection(entity).entities) {
+                                       if (relation.findEntityMemberIndex(e)==-1) {
+                                               relation.appendMember(new RelationMember(e, ''), undo.push);
+                                       }
+                               }
+                       } else {
+                               relation.appendMember(new RelationMember(entity, ''), undo.push);
+                       }
+                       MainUndoStack.getGlobalStack().addAction(undo);
+               }
+               
+    ]]></mx:Script>    
+</mx:TitleWindow>
+
index 37a184f..6cd409e 100644 (file)
                        panel.setRelation(relation);
                        PopUpManager.centerPopUp(panel);
         }
+
+               public function closeAndLoadRelation():void {
+                       PopUpManager.removePopUp(this);
+                       var panel:RelationLoaderPanel = RelationLoaderPanel(
+                           PopUpManager.createPopUp(Application(Application.application), RelationLoaderPanel, true));
+                       panel.setEntity(entity);
+                       PopUpManager.centerPopUp(panel);
+               }
         
     ]]></mx:Script> 
     <mx:Text id="warning" text="" />
@@ -87,6 +95,7 @@
     </mx:List>
     <mx:ControlBar>
       <mx:Button label="New Relation..." click="closeAndNewRelation();" styleName="titleWindowButton" />
+      <mx:Button label="Load Relation..." click="closeAndLoadRelation();" styleName="titleWindowButton" />
       <mx:Spacer width="100%"/>
       <mx:Button label="Select" click="updateEntityAndClose();" enabled="{relationSelector.selectedItems.length>0}" styleName="titleWindowButton" />
     </mx:ControlBar>
index b107fe0..a6f961b 100644 (file)
       import mx.core.*;
       import mx.managers.PopUpManager;
       import mx.controls.Menu;
+      import mx.controls.Alert;
       import flash.geom.Point;
       import flash.net.*;
       import mx.events.DragEvent;
                var menu:Menu = new Menu(); 
                var dp:Object = [ {label: "Select all members"}, 
                                                  {label: "Deselect all members"}, 
-                                                 {label: "Add selection to this relation", enabled: false} ]; 
+                                                 {label: "Add selection to this relation", enabled: false},
+                                                 {label: "Delete relation"} ]; 
                menu.dataProvider = dp; 
                menu.addEventListener("itemClick", selectRelationMenu); 
                button.popUp = menu;
                                }
                                MainUndoStack.getGlobalStack().addAction(undo);
                                break;
+                       
+                       case 3: // Delete relation
+                               Alert.show("Do you really want to delete the relation?","Are you sure?",Alert.YES | Alert.CANCEL,null,
+                                       function(event:CloseEvent):void { 
+                                               if (event.detail==Alert.CANCEL) return;
+                                               rel.remove(MainUndoStack.getGlobalStack().addAction);
+                                       } );
+                               break;
                }
        }
 
index 6e0cefb..7530324 100644 (file)
@@ -13,54 +13,68 @@ package net.systemeD.potlatch2 {
                private static const token:String="f0a.sejV34HnhgIbNSmVHmndXFpijgGeun0fSIMG9428hW_ifF3pYKwbV6r9iaXojl1lU_dakekR";
                private static const MAXZOOM:int=17;
 
+               private static const UNINITIALISED:uint=0;
+               private static const INITIALISING:uint=1;
+               private static const HIDDEN:uint=2;
+               private static const SHOWING:uint=3;
+               private var currentState:uint=UNINITIALISED;
+
                private var _lat:Number;
                private var _lon:Number;
                private var _scale:Number;
                private var offset_lat:Number=0;
                private var offset_lon:Number=0;
-               private var inited:Boolean;
-               private var enabled:Boolean;
 
-               public function Yahoo(w:Number, h:Number, map:Map) {
+               public function Yahoo(map:Map) {
                        super();
-                       this.init(token, w, h);  
-                       this.mapType="satellite";
-                       this.alpha=0.5;
+                       currentState=UNINITIALISED;
                        this.map=map;
-                       inited=false;
-                       visible=enabled=false;
-                       this.addEventListener(YahooMapEvent.MAP_INITIALIZE, initHandler);
+                       visible=false;
                }
                
                public function show():void {
-                       visible=enabled=true;
-                       if (inited) { 
+                       visible=true;
+                       if (currentState==UNINITIALISED) {
+                               currentState=INITIALISING;
+                               this.addEventListener(YahooMapEvent.MAP_INITIALIZE, initHandler);
+                               this.init(token, map.mapwidth, map.mapheight);
+                               this.mapType="satellite";
+                               this.alpha=0.5;                         // ** FIXME - should take the value the user has chosen
+                               activateListeners();
+                       } else if (currentState==HIDDEN) { 
+                               currentState=SHOWING;
                                moveto(map.centre_lat, map.centre_lon, map.scale);
                                this.setSize(map.mapwidth,map.mapheight);
+                               activateListeners();
                        }
+               }
+
+               public function hide():void {
+                       deactivateListeners();
+                       visible=false;
+                       if (currentState==SHOWING) currentState=HIDDEN;
+               }
 
+               private function activateListeners():void {
                        map.addEventListener(MapEvent.MOVE, moveHandler);
                        map.addEventListener(MapEvent.RESIZE, resizeHandler);
                        map.addEventListener(MapEvent.NUDGE_BACKGROUND, nudgeHandler);
                }
-
-               public function hide():void {
-                       visible=enabled=false;
-
+               
+               private function deactivateListeners():void {
                        map.removeEventListener(MapEvent.MOVE, moveHandler);
                        map.removeEventListener(MapEvent.RESIZE, resizeHandler);
                        map.removeEventListener(MapEvent.NUDGE_BACKGROUND, nudgeHandler);
                }
                
                private function initHandler(event:YahooMapEvent):void {
-                       inited=true;
+                       currentState=visible ? SHOWING : HIDDEN;
                        if (map.centre_lat) { moveto(map.centre_lat, map.centre_lon, map.scale); }
                        this.removeEventListener(YahooMapEvent.MAP_INITIALIZE, initHandler);
-                       visible=enabled;
                }
 
                private function moveHandler(event:MapEvent):void {
-                       if (!inited) { return; }
+                       if (currentState!=SHOWING) { return; }
                        moveto(event.params.lat, event.params.lon, event.params.scale);
                }
 
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;
             }
diff --git a/net/systemeD/potlatch2/controller/DrawQuadrilateral.as b/net/systemeD/potlatch2/controller/DrawQuadrilateral.as
new file mode 100644 (file)
index 0000000..4fc5589
--- /dev/null
@@ -0,0 +1,87 @@
+package net.systemeD.potlatch2.controller {
+       import flash.events.*;
+       import flash.display.Stage;
+    import net.systemeD.halcyon.connection.*;
+    import net.systemeD.halcyon.Map;
+       import net.systemeD.potlatch2.tools.Parallelise;
+
+    public class DrawQuadrilateral extends ControllerState {
+               private var sourceNode:Node;
+               private var way:Way;
+               private var centrelon:Number;
+               private var centrelatp:Number;
+               private var radius:Number;
+               private var startX:Number;
+               private var startY:Number;
+
+        public function DrawQuadrilateral(node:Node) {
+                       sourceNode = node;
+        }
+
+        override public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
+                       if (event.type==MouseEvent.MOUSE_MOVE) {
+                               // redraw the rectangle sprite
+                               var undo:CompositeUndoableAction = new CompositeUndoableAction("Draw quadrilateral");
+
+                               var dx:Number=controller.map.mouseX-startX;
+                               var dy:Number=controller.map.mouseY-startY;
+                               var angle:Number=(dy % 360) * Math.PI/180;
+
+                               way.getNode(1).setLonLatp(centrelon +radius*Math.sin(angle),
+                                                             centrelatp+radius*Math.cos(angle),
+                                                             undo.push);
+                               way.getNode(3).setLonLatp(centrelon -radius*Math.sin(angle),
+                                                         centrelatp-radius*Math.cos(angle),
+                                                         undo.push);
+                               undo.doAction();
+                       } else if (event.type==MouseEvent.CLICK || event.type==MouseEvent.MOUSE_UP) {
+                               // select the new rectangle
+                               return new SelectedWay(way);
+                       } else {
+                               trace(event.type);
+                       }
+                       return this;
+        }
+
+               override public function processKeyboardEvent(event:KeyboardEvent):ControllerState {
+                       if (event.keyCode==27) {                        // Escape
+                               // make sure the rectangle sprite is cleared
+                               return new NoSelection();
+                       }
+                       var cs:ControllerState = sharedKeyboardEvents(event);
+                       return cs ? cs : this;
+               }
+
+               override public function enterState():void {
+                       controller.map.draggable=false;
+                       var conn:Connection=controller.connection;
+                       var undo:CompositeUndoableAction = new CompositeUndoableAction("Draw quadrilateral");
+                       var cornerlon:Number =controller.map.coord2lon(controller.map.mouseX);
+                       var cornerlat:Number =controller.map.coord2lat(controller.map.mouseY);
+                       var cornerlatp:Number=controller.map.coord2latp(controller.map.mouseY);
+                       
+                       var xradius:Number=(cornerlon-sourceNode.lon)/2;
+                       var yradius:Number=(cornerlatp-sourceNode.latp)/2;
+                       centrelon =sourceNode.lon +xradius;
+                       centrelatp=sourceNode.latp+yradius;
+                       radius=Math.sqrt(xradius*xradius+yradius*yradius);
+
+                       startX=controller.map.mouseX;
+                       startY=controller.map.mouseY;
+                       var node1:Node=conn.createNode({}, cornerlat     , sourceNode.lon, undo.push);
+                       var node2:Node=conn.createNode({}, cornerlat     , cornerlon     , undo.push);
+                       var node3:Node=conn.createNode({}, sourceNode.lat, cornerlon     , undo.push);
+                       way = conn.createWay(sourceNode.getTagsCopy(), [sourceNode,node1,node2,node3,sourceNode], undo.push);
+                       for (var k:String in sourceNode.getTagsCopy()) sourceNode.setTag(k, null, undo.push);
+
+                       MainUndoStack.getGlobalStack().addAction(undo);
+        }
+               override public function exitState(newState:ControllerState):void {
+                       controller.map.draggable=true;
+        }
+
+        override public function toString():String {
+            return "DrawQuadrilateral";
+        }
+    }
+}
index 415004d..178f2b0 100644 (file)
@@ -35,6 +35,9 @@ package net.systemeD.potlatch2.controller {
                        if (event.type==MouseEvent.MOUSE_DOWN && event.ctrlKey && entity && entity!=firstSelected) {
                                return new SelectedMultiple([firstSelected,entity]);
                        }
+                       if (event.type==MouseEvent.MOUSE_DOWN && event.shiftKey && !entity) {
+                               return new DrawQuadrilateral(firstSelected as Node);
+                       }
                        var cs:ControllerState = sharedMouseEvents(event, entity);
                        return cs ? cs : this;
         }
diff --git a/net/systemeD/potlatch2/find/FindDialog.mxml b/net/systemeD/potlatch2/find/FindDialog.mxml
new file mode 100644 (file)
index 0000000..a64c90e
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<mx:TitleWindow
+       xmlns:mx="http://www.adobe.com/2006/mxml" 
+       layout="vertical" showCloseButton="true"
+       horizontalAlign="center" title="Search"
+       width="458" height="350" verticalGap="0" creationComplete="txtFind.setFocus()">
+       <mx:Script><![CDATA[
+        import flash.events.Event;
+               import mx.core.Application;
+               import mx.events.CloseEvent;
+               import mx.events.FlexEvent;
+               import mx.managers.PopUpManager;
+               import mx.rpc.events.ResultEvent;
+               import mx.rpc.http.HTTPService;
+               import mx.controls.Alert;
+        import mx.events.ListEvent;
+                       
+               import net.systemeD.halcyon.Globals;
+               
+               private var nominatim:HTTPService = new HTTPService;
+               private var nominatimURL:String = "http://open.mapquestapi.com/nominatim/v1/search?";   // ** FIXME - this should be user-configurable
+               private var nomOptions:Object = { addressdetails:"1", limit:"10", format:"xml" };
+        private var selectedResult:Object = {lat: "0", lon: "0"};
+
+               [Bindable]
+        private var searchResults:XMLList;
+                               
+               
+               public function init():void {
+                       PopUpManager.addPopUp(this, Application(Application.application), true);
+                       PopUpManager.centerPopUp(this);
+                       this.addEventListener(CloseEvent.CLOSE, findDialog_close);
+                       
+                       var obj:SharedObject = SharedObject.getLocal("user_state");
+       
+               }
+               
+               private function findDialog_close(evt:CloseEvent):void {
+                       PopUpManager.removePopUp(this);
+               }
+
+               private function goFetch(q:String):void {
+
+                       var searchCall:String = nominatimURL;
+                       for (var item:String in nomOptions) {
+                               searchCall += item + "="; 
+                               searchCall += nomOptions[item] + "&";
+                       }
+                       searchCall += "q=" + q;
+                       this.nominatim.url = searchCall
+                       this.nominatim.addEventListener(ResultEvent.RESULT, goneFetched);
+                       this.nominatim.resultFormat = 'e4x';
+
+                       this.nominatim.send();
+                       
+               }
+               
+               private function goneFetched(e:ResultEvent):void {
+                       searchResults = e.result.* as XMLList;
+               }
+
+               protected function btnFind_clickHandler(event:MouseEvent):void {
+                       goFetch(txtFind.text);
+               }
+
+
+               protected function txtFind_enterHandler(event:FlexEvent):void {
+                       goFetch(txtFind.text);
+               }
+
+        private function setSelected(evt:ListEvent):void {
+            //Alert.show(evt.itemRenderer.data.@lat);
+            selectedResult = { lat: evt.itemRenderer.data.@lat, lon: evt.itemRenderer.data.@lon };
+        }
+        
+        private function goToSelected():void {
+            Application.application.theMap.updateCoordsFromLatLon(selectedResult.lat, selectedResult.lon);
+            Application.application.theMap.download();
+            //Application.application.theMap.redraw();            
+            PopUpManager.removePopUp(this);
+        }
+        
+        
+       ]]>
+       </mx:Script>
+
+       <mx:HBox horizontalAlign="left" width="100%">
+               <mx:Label text="Enter place name: " />
+               <mx:TextInput id="txtFind" width="100%" enter="txtFind_enterHandler(event)"/>
+               <mx:Button label="Search" id="btnFind" click="btnFind_clickHandler(event)"/>            
+       </mx:HBox>
+       
+       <mx:Spacer height="10"/>
+       
+       <mx:DataGrid id="dgResults" dataProvider="{searchResults}" change="setSelected(event)" width="100%" height="100%">
+               <mx:columns>
+                       <mx:DataGridColumn headerText="Name" dataField="@display_name" minWidth="200" />
+                       <mx:DataGridColumn headerText="Type" dataField="@type"/>
+                       <mx:DataGridColumn headerText="Class" dataField="@class"/>            
+                       <mx:DataGridColumn headerText="ID" dataField="@osm_id"/>
+        </mx:columns>
+       </mx:DataGrid>
+
+    <mx:ControlBar>
+       <mx:Label text="Results from Nominatim" />
+        <mx:Spacer width="100%"/>
+        <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);" styleName="titleWindowButton" />
+        <mx:Button label="Jump to" click="goToSelected();" styleName="titleWindowButton" enabled="{dgResults.selectedItem != null? true : false}" />        
+    </mx:ControlBar>
+    
+</mx:TitleWindow>
index 096222e..bada911 100644 (file)
        </mx:ControlBar>
        
        <mx:Script><![CDATA[
+               import flash.display.InteractiveObject;
         import flash.events.Event;
         import flash.net.*;
+               import flash.system.Capabilities;
         import mx.managers.PopUpManager;
         import net.systemeD.halcyon.connection.*;
         import org.iotashan.oauth.*;
+               import flash.external.ExternalInterface;
 
         private var connection:Connection;
         private var requestToken:OAuthToken;
         }
         
         private function openURL(url:String):void {
-            var urlRequest:URLRequest = new URLRequest(url);
-            navigateToURL(urlRequest, "_blank");
-        }
+                       if (ExternalInterface.available) {
+                               var winH:int = 560;
+                               var winW:int = 600;
+                               var leftPos:int  = (Capabilities.screenResolutionX - winW) / 2;
+                               var topPos:int = (Capabilities.screenResolutionY - winH) / 2;
+                               ExternalInterface.call( "window.open", url,"oAuthWin","height=" + winH + ",width=" + winW +",top=" + topPos + ", left=" + leftPos +", toolbar=no,scrollbars=no,status=no,location=no,menubar=no,directories=no");
+                               }               
+                       else
+                       {
+                               var urlRequest:URLRequest = new URLRequest(url);
+                               navigateToURL(urlRequest,"_blank");
+                       }
+               }
         
         private function getRequestToken():void {
             connection = Connection.getConnectionInstance();
             var params:Object = new Object();
             var oauthRequest:OAuthRequest = new OAuthRequest("GET", url, params, consumer, null);
             var urlStr:Object = oauthRequest.buildRequest(sig, OAuthRequest.RESULT_TYPE_URL_STRING)
-            
+
+                       //register the "pressTry" function so the oAuth callback page can try to advance the editor directly to the next step
+                       ExternalInterface.addCallback("pressTry", pressTry);            
+                       
             // build the actual request
             var urlReq:URLRequest = new URLRequest(String(urlStr));
             var loader:URLLoader = new URLLoader();
             
             var url:String = Connection.getParam("oauth_auth_url", "http://127.0.0.1:3000/oauth/authorize");            
             link.label = url;
-            authoriseURL = url + "?oauth_token="+requestToken.key;
-            progress.visible = false;
+                       authoriseURL = url + "?oauth_token="+requestToken.key;
+                       progress.visible = false;
             gotLinkBox.visible = true;
         }
 
             var secret:String = Connection.getParam("oauth_consumer_secret", "");
             return new OAuthConsumer(key, secret);
         }
+               
+               public function pressTry():void {
+                       getAccessToken();
+               }
         
        ]]></mx:Script>
 </mx:TitleWindow>
index fbf700e..368b7d3 100644 (file)
@@ -72,6 +72,8 @@
             rollOverEffect="glowImage" rollOutEffect="unglowImage" toolTip="{'Zoom in - currently z'+getScale()}" />
         <mx:Image source="@Embed('embedded/zoomOut.svg')" right="3" top="20" click="theMap.zoomOut();"
             rollOverEffect="glowImage" rollOutEffect="unglowImage" toolTip="{'Zoom out - currently z'+getScale()}" />
+        <mx:Image source="@Embed('embedded/search.svg')" right="3" top="40" click="new FindDialog().init();"
+            rollOverEffect="glowImage" rollOutEffect="unglowImage" toolTip="Find place" />
         <mx:TextArea id="dataWorking" text="" right="20" top="3" disabledColor="black" backgroundDisabledColor="0xFFFFEA" height="18"
             enabled="false" borderThickness="0"
             showEffect="{wipeIn}" hideEffect="{wipeOut}"/>
@@ -87,6 +89,7 @@
                import net.systemeD.halcyon.connection.*;
                import net.systemeD.potlatch2.*;
                import net.systemeD.potlatch2.save.SaveManager;
+               import net.systemeD.potlatch2.find.*;
                import net.systemeD.potlatch2.collections.*;
                import net.systemeD.potlatch2.controller.*;
                import net.systemeD.potlatch2.help.*;
             theMap.addEventListener(MapEvent.INITIALISED, function(e:Event):void { VectorBackgrounds.instance().init(theMap); });
 
                        theMap.backdrop=b;
-                       yahoo=new Yahoo(w,h,theMap);
+                       yahoo=new Yahoo(theMap);
                        yahoo.hide();
                        _root.addChild(yahoo);
                        _root.addChild(theMap);
diff --git a/resources/features/pois/transport_car_wash.n.24.png b/resources/features/pois/transport_car_wash.n.24.png
new file mode 100644 (file)
index 0000000..1c173e2
Binary files /dev/null and b/resources/features/pois/transport_car_wash.n.24.png differ
diff --git a/resources/icons/accommodation_blank.png b/resources/icons/accommodation_blank.png
deleted file mode 100644 (file)
index d12f23e..0000000
Binary files a/resources/icons/accommodation_blank.png and /dev/null differ
index 37d2ecc..7af4465 100644 (file)
Binary files a/resources/icons/shopping_garden_centre.n.16.png and b/resources/icons/shopping_garden_centre.n.16.png differ
diff --git a/resources/icons/transport_car_wash.n.16.png b/resources/icons/transport_car_wash.n.16.png
new file mode 100644 (file)
index 0000000..07acd4e
Binary files /dev/null and b/resources/icons/transport_car_wash.n.16.png differ
index f09c1bd..5caaf3b 100644 (file)
                <terms_url>http://opengeodata.org/microsoft-imagery-details</terms_url>
                <default>yes</default>
        </set>
+    <set>
+        <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>
     <set>
         <name>OSM - MapQuest</name>
         <url>http://otile1.mqcdn.com/tiles/1.0.0/osm/$z/$x/$y.png</url>
+    </set>
+    <set minlat="17" minlon="175" maxlat="72" maxlon="-46">
+      <name>OSM - Tiger Edited Map</name>
+      <type>900913</type>
+      <url>http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/$z/$x/$y.png</url>
     </set>
        <set minlat="49.8" minlon="-9" maxlat="61.1" maxlon="1.9">
                <name>OS OpenData Streetview</name>
                <url>http://hypercube.telascience.org/tiles/1.0.0/haiti-city/$z/$x/$y.jpg</url>
                <sourcetag>Haiti streetnames</sourcetag>
        </set>
-
+       <set minlat="24.2" minlon="-125.8" maxlat="49.5" maxlon="-62.3">
+               <name>National Agriculture Imagery Program</name>
+               <url>http://cube.telascience.org/tilecache/tilecache.py/1.0.0/NAIP_ALL/$z/$x/$y.png</url>
+               <sourcetag>NAIP</sourcetag>
+       </set>
+       <set minlat="55.3" minlon="-168.5" maxlat="71.5" maxlon="-140">
+               <name>National Agriculture Imagery Program</name>
+               <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>
index dc6dc3c..d05720c 100644 (file)
       ${addr:housenumber} ${addr:street} ${addr:postcode}\r
     </icon>\r
 \r
-    <area/>\r
+    <area/>
+    <point/>\r
     <!-- This should catch all the "building=*" tags in use: yes, hut, house, residential, entrance, apartments, garage, industrial,  garages, service, manufacture, collapsed... \r
          Is this possible? -->\r
     <!-- <tag k="building" v="*"/> -->\r
index a039e0a..7c0bad0 100644 (file)
         <inputSet ref="common"/>
       </feature>
     
+  <feature name="Car Wash">
+    <category>transport</category>
+    <icon image="features/pois/transport_car_wash.n.24.png">
+      ${name}
+    </icon>
+    <help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dcar_wash</help>
+    <point/>
+    <area/>
+    <tag k="amenity" v="car_wash"/>
+    <inputSet ref="names"/>
+    <input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The company/organisation that runs the car wash" priority="low"/>
+    <input type="freetext" presence="onTagMatch" category="Operation" name="Opening hours" key="opening_hours" priority="normal"/>
+    <input type="choice" presence="onTagMatch" category="Operation" name="Self service" key="self_service" priority="low">
+       <choice value="yes" text="Yes" />
+       <choice value="no" text="No" />
+    </input>
+    <input type="choice" presence="onTagMatch" category="Operation" name="Automated" key="automated" priority="low">
+       <choice value="yes" text="Yes" />
+       <choice value="no" text="No" />
+    </input>
+    
+    <inputSet ref="common"/>
+  </feature>
     
       <feature name="Bus station">
         <category>transport</category>
diff --git a/resources/ok_go.html b/resources/ok_go.html
new file mode 100644 (file)
index 0000000..d6b1baf
--- /dev/null
@@ -0,0 +1,20 @@
+<html>
+<head>
+       <script language="javascript">
+        function sendBack() {
+               if (window.self.opener) {
+                        window.self.opener.swfobject.getObjectById("map").pressTry();
+                        window.self.opener.focus();
+               }
+               window.self.close();
+        }
+       </script>
+</head>
+<body onload="sendBack()">
+SUCCESS!
+<br />
+<br />
+go <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html" target="_new">here</A> to clear cache and see this window again
+
+</body>
+</html>
\ No newline at end of file
index f4533ca..cb1f0a9 100644 (file)
@@ -5,12 +5,6 @@
 <head>
 <title>Potlatch TWO</title>
 <script type="text/javascript" src="swfobject.js"></script>
-</head>
-
-<body>
-
-<div id="map" style="width:100%; height: 100%; border: 1px solid black">
-</div>
 
 <script>
        function getArgs() {
 
     function markChanged(a) { changesaved=a; } /* called from flash */
 
+       var attributes = {
+               id: "map",
+               name: "map"
+       };
+
+       
        var args = getArgs();
        var lat;
        var 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;
        }
 
-       var fo = new SWFObject("potlatch2.swf?d="+Math.round(Math.random()*1000), "map", "100%", "100%", "9", "#FFFFFF");
-       fo.addVariable("lat",lat);
-       fo.addVariable("lon",lon);
-       fo.addVariable("zoom",zoom);
-       fo.addVariable("api","http://api06.dev.openstreetmap.org/api/0.6/");
-       fo.addVariable("policy","http://api06.dev.openstreetmap.org/api/crossdomain.xml");
-       fo.addVariable("connection","XML");
-       fo.addVariable("oauth_policy", "http://api06.dev.openstreetmap.org/oauth/crossdomain.xml");
-       fo.addVariable("oauth_request_url", "http://api06.dev.openstreetmap.org/oauth/request_token");
-       fo.addVariable("oauth_access_url", "http://api06.dev.openstreetmap.org/oauth/access_token");
-       fo.addVariable("oauth_auth_url", "http://api06.dev.openstreetmap.org/oauth/authorize");
-       fo.addVariable("oauth_consumer_key", "fiM1IoqnKJk4JCfcl63DA");
-       fo.addVariable("oauth_consumer_secret", "7fYgJK9M4vB1CvBZ6jEsPGxYK9UD1hEnI6NqTxNGs");
-       fo.addVariable("serverName", "api06 Test On Dev");
-       fo.write("map");
+                       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>
 
 
-</script>
 
 </body>
 </html>
index 97c2c73..62d8040 100644 (file)
@@ -70,6 +70,7 @@ node[aeroway=aerodrome] { icon-image: icons/transport_aerodrome.n.16.png; z-inde
 node[amenity=bus_station] { icon-image: icons/transport_bus_station.n.16.png; z-index: 20; }
 node[highway=bus_stop] { icon-image: icons/transport_bus_stop2.n.16.png; z-index: 20; }
 node[amenity=fuel] { icon-image: icons/transport_fuel.n.16.png; z-index: 20; }
+node[amenity=car_wash] { icon-image: icons/transport_car_wash.n.16.png; z-index: 20; }
 node[amenity=bicycle_parking] { icon-image: icons/transport_parking_bicycle.n.16.png; text-offset: 15; text: capacity; z-index: 20; }
 node[amenity=parking] { icon-image: icons/transport_parking_car.n.16.png; z-index: 20; }
 node[amenity=ferry_terminal] { icon-image: icons/transport_port.n.16.png; z-index: 20; }
index e7edd42..8eafe9d 100644 (file)
@@ -1,8 +1,4 @@
-/**
- * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
- *
- * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
\ No newline at end of file
+/*     SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+       is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+*/
+var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
\ No newline at end of file
index 8e51cc0..c58ef7f 100644 (file)
@@ -3,4 +3,5 @@
 // at some point in the future.
 
 public var build_number:String="@@@buildnumber@@@";
-public var version:String="2.0";
+public var version:String="2.1";
+