map does not work all the time on IE8 - onAnimate error from init.js file

957
6
Jump to solution
02-06-2013 09:22 AM
SwethaK
New Contributor
Hi,

I have an application(ESRI JavaScript API 3.2 compact) that should work on IE8. On IE8, for the first time, the map loads fine. Then if I turn on/off some layers and go back to map again, then the map goes blank(the slider and logo are still present) and get this error in the console -exception in animation handler for: onAnimate . But if I perform a zoom to extent operation, the map shows up. And it is not guaranteed to work all the time for zoom to extent operations. In any case, I get onAnimate error in the console and the map goes blank. This error seems to come from esri javascript api init.js file. Looks like it is something related to the pan and zoom animations of the map.

The application works fine on IE9 without any issues.

Can anyone provide some insights on this?

Please let me know if you need more details.

Thank you,
Swetha.
0 Kudos
1 Solution

Accepted Solutions
Drew
by
Occasional Contributor III
I had this same issue in FireFox.
I was able to resolve it using a a setTimout on the infowindow.show(...)

I was loading an info window on load.

           setTimeout(function () {
                        map.infoWindow.show(mapPoint);
                    }, 1000);

Tested On:
ESRI JSAPI Versions 3.6 and 3.7
Fire Fox Version: 25.0.1

Drew

View solution in original post

6 Replies
AmayaMateos
New Contributor
Hello!

I have same problem ...

Could you resolve it?

Thanks a lot!!!!

Best regards....

Hi, 

I have an application(ESRI JavaScript API 3.2 compact) that should work on IE8. On IE8, for the first time, the map loads fine. Then if I turn on/off some layers and go back to map again, then the map goes blank(the slider and logo are still present) and get this error in the console -  exception in animation handler for: onAnimate . But if I perform a zoom to extent operation, the map shows up. And it is not guaranteed to work all the time for zoom to extent operations. In any case, I get onAnimate error in the console and the map goes blank. This error seems to come from esri javascript api init.js file. Looks like it is something related to the pan and zoom animations of the map.  

The application works fine on IE9 without any issues.  

Can anyone provide some insights on this?  

Please let me know if you need more details.  

Thank you, 
Swetha.
0 Kudos
MatthewLofgren
Occasional Contributor
This may be fixed in 3.7 but I haven't tried yet. Otherwise try wrapping your map initialization in a setTimeout

ready(function(){
 parser.parse();

 setTimeout(function () {
   map = new Map("mapPane", {
    basemap: "streets"
   }); 
 }, 10);
});
0 Kudos
JohnGravois
Frequent Contributor
i logged [NIM089588: Please update "Mobile gallery with map" sample so that it is also compatible with IE8.] when a customer encountered a similar error in the past. 

until the issue is resolved you might want to consider not using the compact build of the API if you are targeting IE8.
0 Kudos
MatthewLawton
Occasional Contributor
I am running JSAPI 3.7 and get this error in Chrome as well. It seems to occur when I perform a queryTask while the infoWindow is visible. What happens is the map will briefly zoom to the extent of the queried feature (after map.setExtent is called) but then it "snaps" back to the previous extent and throws the onAnimate error about a dozen times. The infoWindow is anchored in the new location of the queried feature, but the map is back at the old location. This is the full error shown in the console:

exception in animation handler for: onAnimate [VM] init.js (20729):44
e.extend._fire [VM] init.js (20729):44
e.extend._cycle [VM] init.js (20729):48
(anonymous function) [VM] init.js (20729):171
h.(anonymous function).g [VM] init.js (20729):236
(anonymous function) [VM] init.js (20729):171
TypeError {} [VM] init.js (20729):45
e.extend._fire [VM] init.js (20729):45
e.extend._cycle [VM] init.js (20729):48
(anonymous function) [VM] init.js (20729):171
h.(anonymous function).g [VM] init.js (20729):236
(anonymous function)


This may be different than what you guys are experiencing, but I thought I would throw it out there since I haven't seen many posts that reference this error.
0 Kudos
Drew
by
Occasional Contributor III
I had this same issue in FireFox.
I was able to resolve it using a a setTimout on the infowindow.show(...)

I was loading an info window on load.

           setTimeout(function () {
                        map.infoWindow.show(mapPoint);
                    }, 1000);

Tested On:
ESRI JSAPI Versions 3.6 and 3.7
Fire Fox Version: 25.0.1

Drew
JeffPace
MVP Alum
"IE" and "only happens once and awhile" almost always requires settimeout.  Basically things load out of order/before they are ready.

Usually the fun part is figuring out what to put the timeout on.
0 Kudos