3.1 API - module id

2968
2
08-09-2012 05:27 PM
FeichiShih
New Contributor II
We run into an issue with the BasemapGallery.js, FeatureLayer.js and a few other modules throwing the ieDefineFailed error when dojoLoader attempts to load the module in FireFox, Chrome, and Safari (IE works fine).  This happens when we try to embed a map inside a div tag that is dynamically generated at run time by the Microsoft PerformancePoint AJAX framework. The modules load fine otherwise in a regular Html page.

After looking into it further, we notice that ArcGIS Server 3.1 Javascript API uses dojo 1.7, and the AMD define method in these modules are missing the optional id argument.  Adding the id actually fix the error for us. 

define("featureLayer",["dijit", "dojo", "dojox", "dojo/require!esri/layers/graphics,esri/tasks/query,dojo/io/iframe,esri/layers/agscommon,dojo/date/locale"], function(_1, _2, _3) {

We did this by overwriting the scripts with custom copies hosted locally, but it would be nice if the server API would work too, would it be possible to have the 3.1 API be updated to include the id argument on all modules?

Thanks,
Feichi
0 Kudos
2 Replies
JacksonGilman1
New Contributor III
Nice workaround!  I am just now getting back into the swing of things with the new Dojo (soon to be) 2.x stuff.  This is very helpful.
0 Kudos
ArindaSarkar
New Contributor

Hey,

I am facing same issue IEdefineFailed in IE 10. Can you please share the file where exactly u have updated.

Sharing the file or complete code of that file will be really helpful.

0 Kudos