AnsweredAssumed Answered

TypeError: a.getDojoShape is not a function

Question asked by mbakerDPS on Dec 2, 2014
Latest reply on Dec 2, 2014 by JGravois-esristaff

All, this was an easy fix and thanks to John G. for giving me a kick in the butt to look for the error in the code.


Basically there was a line to add the graphic that I was creating, but instead I still had the reference to the graphicsLayer. Easy. Thanks for all your help!


So I'm trying to put all my graphics into the main map graphics layer (rather than create a new graphics layer).


It works - but only 1/2 the time.


Basically, a user clicks the button to do a geocode > queryies > display the results, and it seems to work ok the first time.


However, if you click it again, the error TypeError: a.getDojoShape is not a function shows up.


But... if you click it again, it works just fine (ie. first graphics layer clears, new graphics appear as I would expect).


So I'm wondering If I have something out of order, or, as some (ancient) forum posts suggest, there is another Dojo require I need to add?


Thank you!!!




(code removed until I can create a reproducible case...)