Select to view content in your preferred language

set ArcGISDynamicMapServiceLayer properties

1950
3
Jump to solution
11-29-2012 05:07 PM
RhettZufelt
MVP Notable Contributor
I am utilizing the following code from the MapServicesWidget:


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 = Number(vizLayers); // 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_
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
0 Kudos
3 Replies
RhettZufelt
MVP Notable Contributor
Bump...

No ideas?

Still no way to define the popup config file for layers added programtically?  Maybe and enhancement in 3.2?

Still hoping,

R_
0 Kudos
AnthonyGiles
Honored Contributor
Rhett,

Does this thread give you any pointers?

http://forums.arcgis.com/threads/79733-Enable-default-popups-for-user-added-layer

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
Thanks Anthony,

That was good timing, had not seen that new post yet.

This should help get me on the way.

R_
0 Kudos