diff --git a/example/heatmap-halogen/src/MapComponent.purs b/example/heatmap-halogen/src/MapComponent.purs index 70184d2..d957e2c 100644 --- a/example/heatmap-halogen/src/MapComponent.purs +++ b/example/heatmap-halogen/src/MapComponent.purs @@ -234,6 +234,8 @@ mapClass = R.component "Map" \this -> do , mapStyle , mapboxApiAccessToken , ref: mkEffectFn1 $ mapRefHandler mapRef + , dragRotate: true + , touchZoomRotate: true }) [] diff --git a/example/map-halogen/src/MapComponent.purs b/example/map-halogen/src/MapComponent.purs index 731f0c0..a2ca49c 100644 --- a/example/map-halogen/src/MapComponent.purs +++ b/example/map-halogen/src/MapComponent.purs @@ -177,6 +177,8 @@ mapClass = R.component "Map" \this -> do , mapStyle: mapStyle , mapboxApiAccessToken: mapboxApiAccessToken , onLoad: pure unit + , dragRotate: true + , touchZoomRotate: true }) [] diff --git a/example/map/src/Main.purs b/example/map/src/Main.purs index 624b9a6..479bcc6 100644 --- a/example/map/src/Main.purs +++ b/example/map/src/Main.purs @@ -59,6 +59,8 @@ mapClass = R.component "Map" \this -> do , mapStyle: mapStyle , mapboxApiAccessToken: mapboxApiAccessToken , onLoad: pure unit + , dragRotate: true + , touchZoomRotate: true }) [] diff --git a/example/signal-halogen/src/MapComponent.purs b/example/signal-halogen/src/MapComponent.purs index b8d8b90..d77f8f2 100644 --- a/example/signal-halogen/src/MapComponent.purs +++ b/example/signal-halogen/src/MapComponent.purs @@ -226,6 +226,8 @@ mapClass = R.component "Map" \this -> do , mapStyle , mapboxApiAccessToken , ref: mkEffectFn1 $ mapRefHandler mapRef + , dragRotate: true + , touchZoomRotate: true }) [] diff --git a/src/MapGL.js b/src/MapGL.js index 0e41021..3d903de 100644 --- a/src/MapGL.js +++ b/src/MapGL.js @@ -1,6 +1,7 @@ const MapGL = require('react-map-gl'); exports.mapGL = MapGL.default; +exports.defaultProps = MapGL.default.defaultProps; exports.getMapImpl = function (mapRef) { return mapRef diff --git a/src/MapGL.purs b/src/MapGL.purs index 82c022c..c639a7b 100644 --- a/src/MapGL.purs +++ b/src/MapGL.purs @@ -9,6 +9,7 @@ module MapGL , MapPropsR , mkProps , mapGL + , defaultProps , getMap ) where @@ -65,6 +66,8 @@ type MapPropsR r = , mapStyle :: String , mapboxApiAccessToken :: String , children :: R.Children + , dragRotate :: Boolean + , touchZoomRotate :: Boolean | r ) @@ -74,6 +77,7 @@ mkProps :: Viewport -> Record (MapPropsR ()) -> MapProps mkProps (Viewport vp) rest = disjointUnion rest vp foreign import mapGL :: R.ReactClass MapProps +foreign import defaultProps :: MapProps -- Default map component by `ReactMapGL` to render `MapboxGL` -- https://github.com/uber/react-map-gl/blob/master/docs/components/interactive-map.md