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 dataProvider="{_layers}" />
9 <mx:CheckBox width="100%" label="Dim background" selected="true" id="dim"
10 change="Globals.vars.root.tileset.setDimming(dim.selected); Globals.vars.yahoo.alpha = dim.selected ? 0.5 : 1" />
12 <mx:Button label="Load vector file..." click="new VectorSourceDialog().init();"/>
15 import net.systemeD.halcyon.*;
16 import net.systemeD.halcyon.connection.*;
17 import net.systemeD.potlatch2.*;
19 import mx.collections.ArrayCollection;
20 import mx.managers.PopUpManager;
21 import net.systemeD.halcyon.Globals;
23 [Bindable] private var _layers:Array=new Array(
24 { label: "None", data: "" },
25 { label: "Yahoo", data: "yahoo" } );
27 public function populate(xml:XML):void {
28 for each(var set:XML in xml.set) {
29 _layers.push({ label:set.child("name"), data:set.child("url") });
33 private function updateBackground():void {
34 var theMap:Map = Globals.vars.root;
35 var bg:String=background.selectedItem.data;
37 theMap.tileset.init('',false);
38 Globals.vars.yahoo.show();
40 theMap.tileset.init(background.selectedItem.data,true);
41 Globals.vars.yahoo.hide();