TypeError: a.getDojoShape is not a function

3596
6
Jump to solution
12-02-2014 10:47 AM
MatthewBaker2
Occasional Contributor II

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!!!

-m

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

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JohnGravois
Frequent Contributor

'seeing' the code is helpful, it'd be substantially easier to troubleshoot if you wrote a complete, ready to run repro case to distill the problem.

View solution in original post

0 Kudos
6 Replies
TimWitt2
MVP Alum

Matthew,

If you could post your code, that might be helpful. Always tough to see what could be wrong without code.

Tim

0 Kudos
MatthewBaker2
Occasional Contributor II

Tim, added the code... hope it's not too much to sort though...

0 Kudos
JohnGravois
Frequent Contributor

'seeing' the code is helpful, it'd be substantially easier to troubleshoot if you wrote a complete, ready to run repro case to distill the problem.

0 Kudos
MatthewBaker2
Occasional Contributor II

Let me see what I can do...

0 Kudos
MatthewBaker2
Occasional Contributor II

The correct answer was to create a repro and force myself to look at the code a little harder... Thanks, John!

0 Kudos
JohnGravois
Frequent Contributor

it can be a pain to shift gears from your actual production project, but after 5 years in tech support i found its the right answer about 90% of the time

0 Kudos