You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set the map center on moveend with map.setCenter(map.getCenter().wrap());
Expected Behavior
map sets the new center and doesn't crash
Actual Behavior
exception indicating stack overflow is thrown
I am trying to follow this suggestion: #2071 (comment)
By using this code: map.on('moveend', function() { map.setCenter(map.getCenter().wrap()); });
But, when doing that, an exception is thrown once I pan the map: Uncaught RangeError: Maximum call stack size exceeded at e.Evented.fire (evented.js:81) at e.i.jumpTo (camera.js:445) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858) at e.Evented.fire (evented.js:87) at e.i.jumpTo (camera.js:461) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858) at e.Evented.fire (evented.js:87) at e.i.jumpTo (camera.js:461) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858)
The text was updated successfully, but these errors were encountered:
mapbox-gl-js version:
Steps to Trigger Behavior
Expected Behavior
map sets the new center and doesn't crash
Actual Behavior
exception indicating stack overflow is thrown
I am trying to follow this suggestion: #2071 (comment)
By using this code:
map.on('moveend', function() { map.setCenter(map.getCenter().wrap()); });
But, when doing that, an exception is thrown once I pan the map:
Uncaught RangeError: Maximum call stack size exceeded at e.Evented.fire (evented.js:81) at e.i.jumpTo (camera.js:445) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858) at e.Evented.fire (evented.js:87) at e.i.jumpTo (camera.js:461) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858) at e.Evented.fire (evented.js:87) at e.i.jumpTo (camera.js:461) at e.i.setCenter (camera.js:80) at e.<anonymous> (mainMap.js:858)
The text was updated successfully, but these errors were encountered: