AnsweredAssumed Answered

Graphics without a base map

Question asked by vvoovv on Aug 24, 2012
Latest reply on Aug 24, 2012 by jeff.pace
I am unable to use graphics without a base map.

It's written in the doc for Map.onLoad:
Fires when the first or base layer has been successfully added to the map.

So I do the following:

dojo.connect(map,"onLoad", init);
var graphics = new esri.layers.GraphicsLayer();

But I'm getting an error after map.addLayer(graphics):
Uncaught TypeError: Cannot read property '_surface' of null

How can I use graphics without a base map?