Select to view content in your preferred language

Add a custom layer to map when ESRI Flex Viewer map loads

427
1
02-02-2011 12:46 PM
DavidMarley
Occasional Contributor II
I am working on a custom (graphics) layer - something similar to the "Reading GeoRSS feeds" sample.  But I want to be able to populate this layer and add it to the map when my application loads (as opposed to when a particular widget loads).  My application is based on the ESRI Flex Viewer template. 

So the question is where/when in the ESRI Flex Viewer startup sequence can I add the layer?  Do I have to do some customization under "src/com/esri/viewer"?

The samples are quite good that are provided with the Flex API, but the problem is it is hard to relate them to the more complex structure of the ESRI Flex viewer - because the samples are generally a single file with ActionScript and MXML combined, with lots of things defined in markup.  But in the Flex Viewer it is nowhere near this straightforward - so the utility of the samples really drops when you're working with the Viewer.

Anyway, if anyone has any tips/suggestions, I would greatly appreciate it.  Thanks in advance.
Tags (2)
0 Kudos
1 Reply
DasaPaddock
Esri Regular Contributor
You could update the config() function in com.esri.viewer.managers.MapManager.
0 Kudos