# How can get Map zoom level?

I couldn’t find from docs.

1. How can I get current map zoom level?
2. How can I set initial map zoom level?

## 5 thoughts on “How can get Map zoom level?”

1. Anonymous says:

Sorry. I solved.

2. Anonymous says:

Would you mind going a little more in depth on how you were able to get the zoom level. I understand the delta values are just the difference from the coordinates and full view of the map. But I’m stumped when moving forward.

3. Anonymous says:

We faced the same problem and we ended up using geo-viewport. It’s simple and very useful.

4. Anonymous says:

log2(360 * ((screenWidth/256) / region.longitudeDelta)) + 1

5. Anonymous says:

@ararog we get the bounds using the center coordinate and the delta and the viewport from `Dimensions`.

Considering you get the latitude, longitude and deltas from somewhere this snippet should work

```import geoViewport from 'geo-viewport'
import { Dimensions } from 'react-native'

const { height, width } = Dimensions.get('window')

const bounds = [
longitude - longitudeDelta,
latitude - latitudeDelta,
longitude + longitudeDelta,
latitude + latitudeDelta,
]

geoViewport.viewport(bounds, [height, width])```

# How can get Map zoom level?

I couldn’t find from docs.

1. How can I get current map zoom level?
2. How can I set initial map zoom level?

## 4 thoughts on “How can get Map zoom level?”

1. Anonymous says:

Sorry. I solved.

2. Anonymous says:

Would you mind going a little more in depth on how you were able to get the zoom level. I understand the delta values are just the difference from the coordinates and full view of the map. But I’m stumped when moving forward.

3. Anonymous says:

log2(360 * ((screenWidth/256) / region.longitudeDelta)) + 1