identGfxLayer.add(lastIdentifyResultGraphic);
var infoData:Object =
{
title: title,
content: content,
link: link,
point: point,
geometry: resultGraphic.geometry
};
infoPopup.infoData = infoData;
var infoData:Object =
{
title: title,
content: content,
link: link,
point: point,
geometry: resultGraphic.geometry
};
var infoWindowRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
infoWindowRenderer.properties = { popUpInfo: configurePopUpInfo(infoData)};
lastIdentifyResultGraphic.infoWindowRenderer = infoWindowRenderer;
identGfxLayer.add(lastIdentifyResultGraphic); identGfxLayer.add(lastIdentifyResultGraphic);
var infoData:Object =
{
title: title,
content: content,
link: link,
point: point,
geometry: resultGraphic.geometry
};
var popUpInfo:PopUpInfo = new PopUpInfo;
popUpInfo = configurePopUpInfo(infoData);
var myInfoPopup:PopUpRenderer = new PopUpRenderer;
myInfoPopup.popUpInfo = popUpInfo;
map.infoWindow.content = myInfoPopup;
map.infoWindow.show(infoData.point); var infoData:Object =
{
title: title,
content: content,
link: link,
point: point,
geometry: resultGraphic.geometry
};
identGfxLayer.add(lastIdentifyResultGraphic);
var popUpInfo:PopUpInfo = new PopUpInfo;
popUpInfo = configurePopUpInfo(infoData);
var myInfoPopup:PopUpRenderer = new PopUpRenderer;
myInfoPopup.popUpInfo = popUpInfo;
map.infoWindow.content = myInfoPopup;
map.infoWindow.show(infoData.point);
private function configurePopUpInfo(popUpData:Object):PopUpInfo
{
var popUpInfo:PopUpInfo = new PopUpInfo;
popUpInfo.title = popUpData.title;
popUpInfo.description = popUpData.content;
if (popUpData.link)
{
var pos:Number = popUpData.link.length - 4;
var sfx:String = popUpData.link.substr(pos, 4).toLowerCase();
if ((sfx == ".jpg") || (sfx == ".png") || (sfx == ".gif")) // use PopUpMediaInfo if it is an image
{
var popUpMediaInfo:PopUpMediaInfo = new PopUpMediaInfo;
popUpMediaInfo.type = PopUpMediaInfo.IMAGE;
popUpMediaInfo.imageLinkURL = popUpData.link;
popUpMediaInfo.imageSourceURL = popUpData.link;
popUpInfo.popUpMediaInfos = [ popUpMediaInfo ];
}
else
{
popUpInfo.description += "<br/><a href='" + popUpData.link + "'>Click here for more info</a>"
}
}
return popUpInfo;
} var infoData:Object =
{
title: title,
content: content,
link: link,
point: point,
geometry: resultGraphic.geometry
};
identGfxLayer.add(lastIdentifyResultGraphic);
popUpRenderer.popUpInfo = configurePopUpInfo(infoData);
popUpRenderer.graphic = lastIdentifyResultGraphic;
map.infoWindow.content = popUpRenderer;
map.infoWindow.contentOwner = popUpRenderer;
map.infoWindow.show(infoData.point);