MapView.ShowAllAnnotations
--------------------------

Zooms map to show all annotations.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MapView](component_MapView.md) | [9.1](newinversion91.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "MapView.ShowAllAnnotations"; MapView { ; Overlays } ) 

**MBS**( **"MapView.ShowAllAnnotations"** /\* Zooms map to show all annotations. \*/  
**$MapView**; /\* The map view reference number. e.g. $$MapView \*/   
**$Overlays**) /\* Optional; Pass 1 to also check overlays.  
Default is zero to only check annotations. e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MapView | The map view reference number. | $$MapView |  |
| Overlays | Pass 1 to also check overlays.   Default is zero to only check annotations. | 0 | Optional |

### Result

Returns OK or error.

### Description

Zooms map to show all annotations.  
The plugin loops over the annotations to calculate a bounding rectangle for all annotations and zoom the map to make them all visible with some border space around.  
### Examples

Show all annotations and overlays:

 Set Variable \[ $r ; Value: MBS ("MapView.ShowAllAnnotations"; $$MapView ; 1) \]  
### See also

- [MapView.RemoveAnnotations](MapViewRemoveAnnotations.md)
- [MapView.SelectedAnnotations](MapViewSelectedAnnotations.md)

### Release notes

- **Version 12.4**
    - Added Overlays parameter to [MapView.ShowAllAnnotations](https://www.mbsplugins.eu/MapViewShowAllAnnotations.shtml) function.
- **Version 9.1**
    - Added [MapView.ShowAllAnnotations](http://www.mbsplugins.eu/MapViewShowAllAnnotations.shtml) function.

### Example Databases

- [Mac and iOS/MapKit/MapView BeeExample](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/MapView%20BeeExample.shtml#8ScriptAnchor_)
- [Mac and iOS/MapKit/MapView](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/MapView.shtml#13ScriptAnchor_)

### Blog Entries

- [Neues MBS Plugin 12.4 für Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/Neues_MBS_Plugin_124_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 12.4 for Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/MBS_Plugin_124_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr5](https://www.mbsplugins.de/archive/2022-09-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.1pr2](https://www.mbsplugins.de/archive/2019-02-11/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 11st February 2019 , last changed 31st August 2022

  
[MapView.ShowAddress](MapViewShowAddress.md) - [MapView.Snapshot](MapViewSnapshot.md)

[HTML Version](MapViewShowAllAnnotations.shtml)