# Help calculating zoom level to show multiple stores

**URL:** <https://community.mappedin.com/t/help-calculating-zoom-level-to-show-multiple-stores/50>\
**Category:** Mappedin SDK for iOS\
**Created:** [June 6, 2024, 3:31pm UTC](https://community.mappedin.com/t/help-calculating-zoom-level-to-show-multiple-stores/50 "2024-06-06T15:31:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TPowered](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/tpowered/32/71_2.png) [@TPowered](https://community.mappedin.com/u/TPowered)\
**Post date:** [June 6, 2024, 3:31pm UTC](https://community.mappedin.com/t/help-calculating-zoom-level-to-show-multiple-stores/50/1 "2024-06-06T15:31:29Z")

</div>

Our app displays maps from different venues. A feature I’m building lets users view sales and see the store’s location on the map. Some maps have stores in more than one location or a large store with the sale location in multiple locations. Zooming to one location isn’t hard, but how to determine the zoom level when I need to show multiple locations?

---

<div class="post-metadata">

**Author:** ![msohm](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/msohm/32/6_2.png) [@msohm](https://community.mappedin.com/u/msohm)\
**Post date:** [June 6, 2024, 5:22pm UTC](https://community.mappedin.com/t/help-calculating-zoom-level-to-show-multiple-stores/50/2 "2024-06-06T17:22:29Z")

</div>

The easiest way to do this is to allow the Mappedin SDK to perform the calculations for you. You can use the [MPICamera.focusOn()](https://docs.mappedin.com/ios-sdk-api/v5/latest/documentation/mappedin/mpicameramanager/focuson(targets:options:callback:)/) method, which accepts multiple nodes or polygons. When you pass in more than one location the camera pans and zooms so that all locations on the map are visible. Have a look at [Focus the Camera on Targets](https://developer.mappedin.com/ios-sdk/v5/camera-controls/#focus-the-camera-on-targets) in our Camera Guide.

---

<div class="post-metadata">

**Author:** ![TPowered](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/tpowered/32/71_2.png) [@TPowered](https://community.mappedin.com/u/TPowered)\
**Post date:** [June 7, 2024, 7:15pm UTC](https://community.mappedin.com/t/help-calculating-zoom-level-to-show-multiple-stores/50/3 "2024-06-07T19:15:54Z")

</div>

Always nice to let the SDK do the work. 😉 That’s what I needed.
