mirror of
https://github.com/status-im/react-native-mapbox-gl.git
synced 2026-08-31 13:01:15 +00:00
Added support for min/max zoom level, scroll/pitch enabled disabled
This commit is contained in:
@@ -57,6 +57,26 @@ class MapView extends React.Component {
|
||||
*/
|
||||
zoomLevel: PropTypes.number,
|
||||
|
||||
/**
|
||||
* Min zoom level of map
|
||||
*/
|
||||
minZoomLevel: PropTypes.number,
|
||||
|
||||
/**
|
||||
* Max zoom level of map
|
||||
*/
|
||||
maxZoomLevel: PropTypes.number,
|
||||
|
||||
/**
|
||||
* Enable/Disable scroll on the map
|
||||
*/
|
||||
scrollEnabled: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Enable/Disable pitch on map
|
||||
*/
|
||||
pitchEnabled: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Map press listener, gets called when a user presses the map
|
||||
*/
|
||||
@@ -65,7 +85,7 @@ class MapView extends React.Component {
|
||||
/**
|
||||
* Map long press listener, gets called when a user long presses the map
|
||||
*/
|
||||
onLongPress: PropTypes.func,
|
||||
onLongPress: PropTypes.func,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@@ -100,6 +120,8 @@ class MapView extends React.Component {
|
||||
return (
|
||||
<RCTMGLMapView
|
||||
{...this.props}
|
||||
scrollEnabled={false}
|
||||
pitchEnabled={false}
|
||||
onPress={this.onPress}
|
||||
onLongPress={this.onLongPress} />
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user