Hey Don,Thanks for reporting this. There are couple of issues here. The kml(http://www.srh.noaa.gov/gis/kml/SpotForecast/spotLink.kml) contains 1 screen overlay and 1 network link(pointing to http://www.srh.noaa.gov/gis/kml/SpotForecast/spot2.kmz). - There is a bug in Flex Viewer 2.4, where the TOC does not show a network link which has default visibility of 0(false), hence not allowing you to turn it on(make the request). If you are working with the viewer code base you can make the following change to TOCMapLayerItem.as(replace createKMLFolderTocItem() and createKmlNetworkLinkTocItem()):
private static function createKmlFolderTocItem(parentItem:TocItem, folder:KMLFolder, folders:Array, layer:KMLLayer):TocKmlFolderItem
{
var item:TocKmlFolderItem = new TocKmlFolderItem(parentItem, folder, layer);
// Handle any sublayers of a group layer
if (folder.subFolderIds && folder.subFolderIds.length > 0)
{
var lookInFeatureInfos:Boolean = true;
for each (var childId:Number in folder.subFolderIds)
{
var childFolder:KMLFolder = findFolderById(childId, folders);
if (childFolder)
{
item.addChild(createKmlFolderTocItem(item, childFolder, folders, layer));
}
}
}
else if (folder.featureInfos && folder.featureInfos.length > 0)
{
for each (var featureInfo:KMLFeatureInfo in folder.featureInfos)
{
if (featureInfo.type == KMLFeatureInfo.NETWORK_LINK)
{
var networkLink:KMLLayer = layer.getFeature(featureInfo) as KMLLayer;
item.addChild(createKmlNetworkLinkTocItem(item, networkLink, layer));
}
}
}
return item;
}
private static function createKmlNetworkLinkTocItem(item:TocItem, networkLink:KMLLayer, layer:KMLLayer):TocKmlNetworkLinkItem
{
var tocKmlNetworkLinkItem:TocKmlNetworkLinkItem = new TocKmlNetworkLinkItem(item, networkLink, layer);
if (networkLink.loaded)
{
createKMLLayerTocItems(tocKmlNetworkLinkItem, networkLink); // as network link is also a type of KMLLayer
}
else
{
networkLink.addEventListener(LayerEvent.LOAD, layerLoadHandler);
}
function layerLoadHandler(event:LayerEvent):void
{
createKMLLayerTocItems(tocKmlNetworkLinkItem, networkLink);
}
return tocKmlNetworkLinkItem;
}
- The screen overlay would still not be shown, it is a bug in the api because of the sizeX and sizeY values being -1 and we are looking to fix that.This applies to the other kml samples that you have been trying as well. Hope this helps.