Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

set ArcGISDynamicMapServiceLayer properties

$
0
0
I am utilizing the following code from the MapServicesWidget:


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;
                                                }

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_

Viewing all articles
Browse latest Browse all 2097

Trending Articles