CityOfSurrey

Invalid geometry type 'undefined' error when setting active tool back to pan...

Discussion created by CityOfSurrey on Jan 17, 2011
Latest reply on Jan 17, 2011 by CityOfSurrey
Hi there,

I am getting this error when setting the active tool back to pan:

Invalid geometry type 'undefined'.
constructor(_954=undefined, _955=undefined)arcgis?v=2.0 (line 52)
addGraphic(geometry=Object { type="extent", xmin=512227.28812124295, more...})Dynami...ap.html (line 146)
toString()

Here is my code:

function addGraphic(geometry) {
var outline = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0, 2]), 1);
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255,0,0]), 3), new dojo.Color([255,215,0,0.5]));
map.graphics.add(new esri.Graphic(geometry, symbol));
toolbar.activate(esri.toolbars.Draw.PAN);
}


Any idea why?

Thanks in advance,

ML

Outcomes