Add this to the default.css:esri|PopUpRenderer
{
skin-class: ClassReference("com.esri.ags.skins.PopUpRendererSkin");
}
and this modification to the PopUpRendererSkin.mxml: for each (var fieldInfo:PopUpFieldInfo in popUpInfo.popUpFieldInfos)
{
var fldName:String = formattedAttributes[fieldInfo.fieldName];
if (fieldInfo.visible && hostComponent.featureLayer.url == "http://gis.ncdcr.gov/ArcGIS/rest/services/NC_Surveyed_Only/MapServer/0"
&& fieldInfo.fieldName == "County" && fldName!= "Bertie" && fldName!= "Brunswick")
{
validMediaInfos = null;
}
if (fieldInfo.visible && formattedAttributes[fieldInfo.fieldName] && formattedAttributes[fieldInfo.fieldName] != " ")
{
var fieldLabel:Label = new Label();
does it. The idea being to make it fail this test just below the above code if (validMediaInfos && validMediaInfos.length > 0)
{
vGroup.addElement(mediaBrowser);
mediaBrowser.attributes = graphic.attributes;
mediaBrowser.formattedAttributes = formattedAttributes;
mediaBrowser.popUpFieldInfos = popUpInfo.popUpFieldInfos;
mediaBrowser.popUpMediaInfos = validMediaInfos;
}
so that the medias don't get added to the vGroup.(again, the red code removes items with null or empty values from the popup, so remove that if you want to see no values.)R_Of course this will still give you the broken link/preview for the sites in the two counties that do NOT have a photo (noticed there are a few).Thought one could get fancy and test to see if the jpeg file exists, if so, then add it. However, there is no http://www.hpo.ncdcr.gov/crossdomain.xml file, so it doesn't allow access to the images from index.swf so throws a debugger error every time. However, if it does exist, it will still preview it and give you the link? Not sure why, almost as if the crossdomain.xml doesn't apply from within the popup? Once clicked, it opens in a separate browser, not within flex, so that makes sense. Don't really understand why I get the sandbox violation and still load the preview/link.