import mx.controls.Alert;
import zdims.map.TileLayer;
import zdims.map.VectorMapDoc;private var doc:VectorMapDoc=null;private var tilmap:TileLayer=null;protected function button1_clickHandler(event:MouseEvent):void{this.eagle.switchEagleEye();
}protected function button2_clickHandler(event:MouseEvent):void{if(doc!=null)
{this.mymap.removeElement(doc)
}if(tilmap==null)
{
tilmap=newTileLayer();
tilmap.serverAddress="http://localhost:5142";
tilmap.hdfName="whMap.hdf";
}this.mymap.addElement(tilmap);
}protected function button3_clickHandler(event:MouseEvent):void{if(tilmap!=null)
{this.mymap.removeElement(tilmap)
}if(doc==null)
{
doc=newVectorMapDoc();
doc.serverAddress="http://localhost:5141";
doc.mapDocName="wh.map";
}this.mymap.addElement(doc);
}public function getWidth():void{
Alert.show("Width="+mymap.width);
}public function getHeight():void{
Alert.show("Height="+mymap.height);
}
import zdims.util.IMSOperType;protected function restore(event:MouseEvent):void{//this.mymap.setCurOper(IMSOperType.Restore);
this.mymap.restore(true); //这种方式也能够实现复位
}
import zdims.util.IMSOperType;public function refresh():void{this.mymap.setCurOper(IMSOperType.Refresh);//this.mymap.refresh();
}public function ShowLevel():void{this.mymap.setLevel(3);
}public function ceterClick():void{this.mymap.setCenter(114.2,30.5);
}public function MoveT():void{this.mymap.panTo(114.2,30.5);
}public function displayState():void{this.title.display=!this.title.display;
}
]]>