【发布时间】:2013-10-26 08:04:36
【问题描述】:
我正在尝试在我的地图中添加一些 InfoSymbol,这就是我所做的:
<esri:InfoSymbol id="infoSymbol1">
<esri:infoRenderer>
<fx:Component>
<s:DataRenderer>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<s:Image id="eventImg" source="{imgSource}"/>
<s:Label id="eventName" text="{eventTitle}"/>
</s:DataRenderer>
</fx:Component>
</esri:infoRenderer>
</esri:InfoSymbol>
我正在从传递给视图的数据中填写一个列表,(该应用程序是一个基于移动视图的应用程序)
public function fillDataGrid():void {
for each(var object:Object in data) {
initDG.addItem(object);
drawEvent(object);
}
}
最后我将 InfoSymbols 添加到 drawEvent(objt) 方法中:
private function drawEvent(object:Object):void{
var myGraphicText:Graphic = new Graphic(new WebMercatorMapPoint(
object.local.longitude, object.local.latitude));
var event:InfoSymbol = new InfoSymbol();
imgSource = "http://192.168.0.22:3000" + object.logo_thumb_url;
eventTitle = object.name;
event = infoSymbol1;
myGraphicText.symbol = event;
myGraphicsLayer.add(myGraphicText);
}
当然imgSource 和eventTitle 是可绑定的,
问题是我得到了
描述资源路径位置类型 1120:访问未定义的属性 eventTitle。
和 imgSource 的消息相同,
任何帮助将不胜感激!
【问题讨论】:
标签: actionscript-3 apache-flex maps arcgis