diff --git a/src/mapbox.js b/src/mapbox.js index 54af003..1142caa 100644 --- a/src/mapbox.js +++ b/src/mapbox.js @@ -44,8 +44,8 @@ const Mapbox = ({ pitchWithRotate: false, touchZoomRotate: true, }) - if (center) map.current.setCenter(center) if (zoom) map.current.setZoom(zoom) + if (center) map.current.setCenter(center) map.current.touchZoomRotate.disableRotation() map.current.touchPitch.disable() map.current.on('styledata', () => {