I am utilizing the following code from the MapServicesWidget:
This allows me to pick from a list, and load the service into the current map.
Was wondering if there is a way to set the popupconfig file to use for each sublayer (similar to the config.xml file) so that when i load the service with the widget (something like in red above), it will recongnize the appropriate popupconfig.xml file?
Thanks for any suggestions,
R_
Code:
case "dynamic":
{
var dynLayer:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(url);
dynLayer.alpha = alpha;
dynLayer.id = label;
dynLayer.name = label;
dynLayer.token = token;
dynLayer.visible = visible;
dynLayer.useMapTime = useMapTime;
dynLayer.sublayerid = sublayerid ;
dynLayer.popupconfig= popupconfig;
if (autoRefresh > 0)
{
setInterval(dynLayer.refresh, autoRefresh * 1000);
}
if (imageFormat)
{
dynLayer.imageFormat = imageFormat;
}
if (visibleLayers)
{
var vizLayers:Array = visibleLayers.split(",");
for (i = 0; i < vizLayers.length; i++)
{
vizLayers[i] = Number(vizLayers[i]); // convert to Numbers
}
dynLayer.visibleLayers = new ArrayCollection(vizLayers);
}
if (proxyUrl && useProxy)
{
dynLayer.proxyURL = proxyUrl;
}
map.addLayer(dynLayer);
break;
}
Was wondering if there is a way to set the popupconfig file to use for each sublayer (similar to the config.xml file) so that when i load the service with the widget (something like in red above), it will recongnize the appropriate popupconfig.xml file?
Thanks for any suggestions,
R_