deck.gl
deck.gl copied to clipboard
"invalid pixel coordinate" is thrown while pinching
Description
A math.gl exception is thrown during a pinch out (zoom in) gesture, if pitch is 90, and no minZoom is set.
Expected Behavior
No exception should be thrown.
Repro Steps
- Open https://deck.gl/playground
- Change the selected style's
initialViewStateto the following:
"initialViewState": {
"longitude": -1.4157267858730052,
"latitude": 52.232395363869415,
"zoom": 6.6,
"maxZoom": 15,
"pitch": 90,
"maxPitch": 90,
"bearing": -27.396674584323023
}
- Try to pinch outwards (zoom in)
- Observe math.gl exception being thrown
Environment
- Framework Version: deck.gl 8.4.20
- Browser Version: Chrome 91.0.4472.114
- OS: macOS 12.0 beta
Logs
Error: invalid pixel coordinate
at assert (assert.js:3)
at pixelsToWorld (web-mercator-utils.js:188)
at WebMercatorViewport.getMapCenterByLngLatPosition (web-mercator-viewport.js:127)
at LinearInterpolator.interpolateProps (linear-interpolator.js:97)
at TransitionManager._onTransitionUpdate (transition-manager.js:167)
at Transition.update (transition.js:71)
at TransitionManager.updateTransition (transition-manager.js:77)
at TransitionManager._triggerTransition (transition-manager.js:136)
at TransitionManager.processViewStateChange (transition-manager.js:65)
at MapController.setProps (controller.js:198)