Display map graphic in new window using getDojoShape

Discussion created by tligon on Jul 8, 2013
Latest reply on Jul 18, 2013 by tligon
I have an HTML page function receiving a graphic in JSON format. The page has a div to hold the graphic's shape, and another div to hold the graphic's infoTemplate content. Here's the code snippet:

function displayAttributeInfo(graphicJson){
  var theGraphic = new esri.Graphic(graphicJson);
  var theSurface = new dojox.gfx.createSurface("graphicSurface", 20, 20);
  var theShape = theGraphic.getDojoShape();

In Firebug I see the creation of the surface, but "getDojoShape" is causing an error in the "init.js" script: "TypeError: _a7 is null". I also see that when the graphic is created, its graphics layer and shape are null. Does the graphic need to be added to a graphics layer before the shape becomes valid? Or am I going about this the wrong way?