Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Max & Min zoom level in React Native Maps

How to Set Min & Max Zoom level in React Native Maps

<MapView
    ref={(ref) => this.mapView = ref}
    clustering={true}
    clusterTextColor='#fff'
    style={styles.map}
    region={this.props.coordinate}
>
    //My map markers
</MapView>
like image 684
Mahdi Bashirpour Avatar asked Jan 03 '23 03:01

Mahdi Bashirpour


1 Answers

<MapView
    minZoomLevel={2}  // default => 0
    maxZoomLevel={15} // default => 20
>
    //My map markers
</MapView>

All Component API in This Link.

like image 143
Mahdi Bashirpour Avatar answered Jan 04 '23 16:01

Mahdi Bashirpour