esri is not defined

673
8
01-16-2013 12:34 PM
EmilyLaMunyon
Occasional Contributor
Hello,

When I try to upgrade my JSAPI web map to version 3.3 it stops working. In Firebug I get the following error:
esri is not defined on line 23 of http://serverapi.arcgisonline.com/jsapi/arcgis/3.3.

Did I miss a coding change that needs to happen from 3.2 to 3.3?

Thanks for any help.:)
0 Kudos
8 Replies
PatrickTruitt
New Contributor
I'm getting the same thing. I can get it to work by clearing my cache and restarting the browser about a half a dozen times.
0 Kudos
EmilyLaMunyon
Occasional Contributor
Thanks Patrick.

This does not work for me, I am still getting the error. Is there something else it could be?
0 Kudos
KellyHutchins
Esri Frequent Contributor
Emily,

In the What's New at 3.3 help topic there is a small section that lists a few breaking changes.

http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#whats_new

If that info doesn't help can you post a url to your site if you have a public link? Or perhaps some code?

Kelly
0 Kudos
EmilyLaMunyon
Occasional Contributor
Thanks Kelly!
Here is the url to my public test site. It loads fine when using 3.2, but the link I posted is set to 3.3 and it will not load.

http://www.surveyor.slco.org/ags10/javamappdf/select_right.html
0 Kudos
KellyHutchins
Esri Frequent Contributor
Hi Emily,

I took a quick look and it looks like the url you provided is using 3.2. Can you re-post with the 3.3 version?

http://www.surveyor.slco.org/ags10/javamappdf/select_right.html
0 Kudos
EmilyLaMunyon
Occasional Contributor
Sorry about that, this should be set to 3.3.
http://www.surveyor.slco.org/ags10/javamappdf/select_right.html
Thanks!
0 Kudos
MattLane
Occasional Contributor II
I checked out the link and it bombed on the first reference to the esri object in the GoogleMapsLayer.js file (line 11). Didn't investigate further, but that script is being processed before the 3.3 api. Not sure what changed in the new api, but the script load order seems to be the problem.
0 Kudos
PatrickTruitt
New Contributor
If this helps, I had the same problem. I was using ClusterLayer.js via a dojo.require("extra.ClusterLayer"); Within this file, (ClusterLayer.js), there is a dojo.declare("extras.ClusterLayer", esri.layers.GraphicsLayer, { ....etc...}); What solved my issue was adding, to the top of this file, dojo.require("esri.layers.graphics"); reason being that this file was expanding GraphicsLayer without first added the the sub class first. Not sure why this worked on earlier versions though.
0 Kudos