-
Notifications
You must be signed in to change notification settings - Fork 0
/
Legend.mxml
90 lines (68 loc) · 2.94 KB
/
Legend.mxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<s:Panel xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:ns1="*"
minWidth="300" minHeight="300" initialize="" creationComplete="init(event)" width="330" height="300" borderVisible="false" skinClass="MySkin" backgroundAlpha="0.6">
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<!--<s:WebService wsdl="http://spatial.polar.gov.cn:808/Service_fbc.asmx?wsdl" id="bdwc" useProxy="false">-->
<!--<s:operation name="getInfobyId"-->
<!--fault = "faultmsg(event)"-->
<!--result="getInfobyId(event)"/>-->
<!--</s:WebService>-->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.adobe.serialization.json.JSON;
import com.esri.ags.layers.GraphicsLayer;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.controls.DataGrid;
import mx.controls.DateField;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.events.DragEvent;
import mx.events.FlexEvent;
import mx.formatters.DateFormatter;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import shou.*;
private var result_Info:Array= new Array;//返回结果数据
private var xmlOper:XMLOperator=new XMLOperator();
[Bindable]
public var d1_info:String;
private var Group:LegendElem;
public var length:int;
//private var btn:shipbtn;
public var pathName:String;
protected function init(event:FlexEvent):void
{
// TODO Auto-generated method stub
}
private function faultmsg(event:FaultEvent):void {
Alert.show(event.message.toString());
}
protected function getInfobyId(event:ResultEvent):void
{
result_Info = com.adobe.serialization.json.JSON.decode(event.result.toString().substring(12,event.result.toString().length-1)) as Array;
}
public function addLegendPath(legendInfo:Legend_Info, planelayer:GraphicsLayer):void
{
var legendElem:LegendElem = new LegendElem();
legendElem.data = legendInfo;
legendElem.planeLayer = planelayer;
this.Group2.addElement(legendElem);
}
]]>
</fx:Script>
<!--<s:Scroller x="0" height="300">-->
<s:Group x="0" width="400" id="Group2">
<s:layout>
<s:VerticalLayout paddingTop="20">
</s:VerticalLayout>
<!--<s:TileLayout>-->
<!--</s:TileLayout>-->
</s:layout>
</s:Group>
<!--</s:Scroller>-->
</s:Panel>