(转) arcgis for flex 画的graphic面,在其面上也能移动地图(及补充)

附上文章链接:http://blog.csdn.net/ttbat/article/details/11566371 作者:ttbat

ArcGIS API for Flex 3.7

Graphic:

https://developers.arcgis.com/flex/api-reference/com/esri/ags/Graphic.html#checkForMouseListeners


下面附加本人的部分代码:

var myPolygon:Polygon=new Polygon();
var arrgon:Array=[];

...

myPolygon.addRing(arrgon);//arrgon是一个点集(Array),addRing方法实现面的绘制


var gonGraphic:Graphic = new Graphic();
//颜色填充
var s111:SimpleFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,0xaaaaaa,0.1,null);  
gonGraphic.symbol=s111;
gonGraphic.geometry = myPolygon;
gonGraphic.attributes=searchlist.dataProvider[i];
gonGraphic.checkForMouseListeners=false;//定义的Graphic 需要一个Infowindown窗口来显示详细信息,需要设置一个属性:checkForMouseListeners=false使在其上能移动地图
graphicslayer.add(gonGraphic);
gonGraphic.addEventListener(MouseEvent.CLICK,GraphicsClick)//添加鼠标点击监听事件
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值