mapgis web java_基于Flex的MapGIS web开发——地图操作

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;

}

]]>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值