自绘组件在infoWindow中显示(arcgis flex)

1 自定义悬浮框

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" width="80" height="30">
    <fx:Declarations>
        <!-- 将非可视元素(例如服务、值对象)放在此处 -->
        <fx:String id="name"></fx:String>
    </fx:Declarations>
    
    <mx:VBox>
        <s:Label text="姓名: {name}"/>
    </mx:VBox>
</mx:Canvas>

2 调用

private const m_content:info=new info();
var mapPoint:MapPoint=MapPoint(grahpic_locateInfo.geometry);
m_address.name = grahpic_locateInfo.attributes.locateInfoname;
myMap.infoWindow.content = m_address;
myMap.infoWindow.show(mapPoint);

 

posted on 2013-05-22 11:08  看天空的星星  阅读(455)  评论(0编辑  收藏  举报

导航