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
This appears to happen when the map is already at a zoom level greater than what is passed in. In our case, the map was at zoom level 22 from doing a fitbounds previously.
The lng / lat is for a postal carrier route 43130B002.
Uncaught Error: failed to invert matrix
at Transform._calcMatrices (transform.js:507)
at Transform.prototypeAccessors.zoom.set (transform.js:143)
at e. (camera.js:789)
at e. (camera.js:839)
at Object.exports.timed (browser.js:43)
at e._ease (camera.js:838)
at e.flyTo (camera.js:785)
at GeocoderAPI.js:133
at Object. (Utilities.js:23)
at fire (jquery-1.12.3.js:3232)
Additional Information Discovered:
When passing the featureCollection for the above carrier route 43130B002 to the following:
var _fitBounds = function (featureCollection) {
var map = nmap.map.getMap();
var bbox = turf.bbox(featureCollection);
map.fitBounds(bbox, { padding: 50 });
}
The map zooms to level 22 to this area on the map. If after this process, I do a flyto() the error above happens. If I zoom back out one tick, and do a flyto() the error does not happen. If I do the flyto() first, the error does not happen.
I set the max zoom level for the map to 21 and repeated the process and it throws the error. when ever a fitBounds is called that zooms to the max level of the map if a flyto() is done afterwards.
The text was updated successfully, but these errors were encountered:
mapboxgl.js v.0.37.0
turfjs v4.3.1
Google Chrome 58.0.3029.110 (64-bit)
Code Sample:
var options = {
center: [-82.6078, 39.6964],
zoom: 14
};
map.flyTo(options);
This appears to happen when the map is already at a zoom level greater than what is passed in. In our case, the map was at zoom level 22 from doing a fitbounds previously.
The lng / lat is for a postal carrier route 43130B002.
Uncaught Error: failed to invert matrix
at Transform._calcMatrices (transform.js:507)
at Transform.prototypeAccessors.zoom.set (transform.js:143)
at e. (camera.js:789)
at e. (camera.js:839)
at Object.exports.timed (browser.js:43)
at e._ease (camera.js:838)
at e.flyTo (camera.js:785)
at GeocoderAPI.js:133
at Object. (Utilities.js:23)
at fire (jquery-1.12.3.js:3232)
I saw that a similar error was reported in 2016 when using map.fitBounds() but was fixed and closed.
https://github.com/mapbox/mapbox-gl-js/issues/3474
Additional Information Discovered:
When passing the featureCollection for the above carrier route 43130B002 to the following:
The map zooms to level 22 to this area on the map. If after this process, I do a flyto() the error above happens. If I zoom back out one tick, and do a flyto() the error does not happen. If I do the flyto() first, the error does not happen.
I set the max zoom level for the map to 21 and repeated the process and it throws the error. when ever a fitBounds is called that zooms to the max level of the map if a flyto() is done afterwards.
The text was updated successfully, but these errors were encountered: