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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 18, 2015 at 4:05
3
  • 1
    Hi Howe, can you create an example (using a site like jsfiddle or jsbin) to show us the problem happening? Commented Oct 18, 2015 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 Commented Oct 19, 2015 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 Commented Oct 19, 2015 at 21:17

1 Answer 1

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/

answered Oct 20, 2015 at 18:16
1
  • 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/… Commented Nov 4, 2015 at 17:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.