1 <?xml version="1.0" encoding="utf-8"?>
3 xmlns:mx="http://www.adobe.com/2006/mxml"
4 paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"
5 horizontalAlign="left" backgroundColor="white" borderStyle="inset">
7 <mx:List width="100%" height="100%" id="background" change="updateBackground();" verticalScrollPolicy="on">
8 <!-- This should be pulled in from an XML file rather than sitting in the source -->
10 <mx:Object label="None" data="" />
11 <mx:Object label="Yahoo!" data="yahoo" />
12 <mx:Object label="OSM - Mapnik" data="http://tile.openstreetmap.org/$z/$x/$y.png" />
13 <mx:Object label="OSM - Osmarender" data="http://tah.openstreetmap.org/Tiles/tile/$z/$x/$y.png" />
14 <mx:Object label="OSM - Maplint (errors)" data="http://tah.openstreetmap.org/Tiles/maplint/$z/$x/$y.png" />
15 <mx:Object label="OpenCycleMap" data="http://andy.sandbox.cloudmade.com/tiles/cycle/$z/$x/$y.png" />
16 <mx:Object label="UK historic: 1:25k" data="http://ooc.openstreetmap.org/os1/$z/$x/$y.png" />
17 <mx:Object label="UK historic: 7th" data="http://ooc.openstreetmap.org/os7/$z/$x/$y.png" />
18 <mx:Object label="UK historic: NPE" data="http://ooc.openstreetmap.org/npe/$z/$x/$y.png" />
19 <mx:Object label="Australia: NearMap" data="http://www.nearmap.com/maps/nml=Vert&zxy=$z,$x,$y" />
22 <mx:CheckBox width="100%" label="Dim background" selected="true" id="dim"
23 change="Globals.vars.root.tileset.setDimming(dim.selected); Globals.vars.yahoo.alpha = dim.selected ? 0.5 : 1" />
25 <mx:Button label="Load vector file..." click="new VectorSourceDialog().init();"/>
28 import net.systemeD.halcyon.*;
29 import net.systemeD.halcyon.connection.*;
30 import net.systemeD.potlatch2.*;
32 import mx.managers.PopUpManager;
33 import com.yahoo.maps.api.YahooMap;
34 import com.yahoo.maps.api.YahooMapEvent;
35 import com.yahoo.maps.api.core.location.LatLon;
37 private function updateBackground():void {
38 var theMap:Map = Globals.vars.root;
39 var yahoo:YahooMap = Globals.vars.yahoo;
40 var bg:String=background.selectedItem.data;
42 theMap.tileset.init('',false);
44 yahoo.zoomLevel = 18-theMap.scale;
45 yahoo.centerLatLon = new LatLon(theMap.centre_lat, theMap.centre_lon);
47 theMap.tileset.init(background.selectedItem.data,true);