Hello,
I am working on a widget that adds geocoded points from an RSS Feed to a GraphicsLayer and then adds that GraphicsLayer to the map using code similar to this:
hGraphics = new esri.layers.GraphicsLayer({ "id": "highlights","displayOnPan": true,"opacity": "1.0", "title":"RSS Feed" });
this.map.addLayer(hGraphics)...
(for each point)
...var symbol = new esri.symbol.PictureMarkerSymbol("widgets/RSSFeed/images/RSS-logo_25.png", 25, 25);
var x = node[0][1];
var y = node[0][0];
var graphic = new Graphic(new Point(x, y), symbol, attr, infoTemplate);
hGraphics.add(graphic);
The points get added to the map correctly, the only problem is that since the layer is a GraphicsLayer, the LayerList widget does not automatically add the newly GraphicsLayer to the list of layers which can be toggled.