4

I'm using ESRI arcgis 3.13

I have map with minZoom set to 3.

When user tries to zoom in to level 19, the program just hangs and after a while, comes back with a generic browser error not from the application that says "more memory is needed" etc. So the application is killed during zoom. Shown here:

Error from browser after application hangs

I tried to debug this, and pinpointed to this line, this is the line where the program would stop and hang, and it is calling an ESRI map method:

_map.centerAndZoom([-79, 43], 19);

I have this for my map intialization:

_map = new Map("myMap", {
    center: [-100, 48],
    zoom: 3,
    basemap: "streets",
    minZoom: 3,
    logo: false
});

However, this was all working before, and just stopped work this week.

Also, if I set initial map zoom to be 7, the app hanging problem goes away. So I am thinking if it because the zoom is changing too much. But like I said, the program was working before even with that much of zoom, and it worked before even from zoom level 1 to zoom level 19.

Any ideas how to fix this? Or where to look for potential problems?

  • 1
    Hi Howe, can you create an example (using a site like jsfiddle or jsbin) to show us the problem happening? – GavinR Oct 18 '15 at 16:41
  • 1
    It could be helpful so see the output in your browser console (press f12 on most modern browsers) - if there is anything there? arcgis api commonly outputs quite useful dojo errors there, which could help with debugging – weaverk Oct 19 '15 at 12:19
  • This issue has also been brought up (and currently unanswered) on the ESRI forums. The user who posted the issue there also provided a fiddle. geonet.esri.com/thread/167149 jsfiddle.net/dgarcrom/1dbvjqyx – Totty Oct 19 '15 at 21:17
1

This is a workaround, not a fix, but the issue is a bug introduced by Chrome 46.

I traced the issue down to the dojo module that ESRI uses to handle the map zoom animation, dojo/_base/fx, contained in the ESRI init.js file.

By updating the config to effectively skip the animation, the issue does not occur.

Include the following code in your page initialization:

esri.config.defaults.map.zoomDuration = 0; 
esri.config.defaults.map.zoomRate = 0; 

See the updated fiddle: https://jsfiddle.net/1dbvjqyx/16/

  • Thanks for the answer Totty. Is the dojoConfig = {async: true}; necessary? Is it used for esri loading, and so the rest of the application do not get blocked? Also, I found that when these zoomDuration/zoomRate is set, the zoom out button is grayed out, and does not come back, even though the button works, see this new problem here: gis.stackexchange.com/questions/169032/… – Howe Nov 4 '15 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.