MapView.Screenshot
------------------

Renders screenshot of the map view.

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

MBS( "MapView.Screenshot"; MapView { ; ImageType; FileName } ) 

**MBS**( **"MapView.Screenshot";** /\* Renders screenshot of the map view. \*/  
**$MapView**; /\* The map view reference number.e.g. $$MapView \*/   
**$ImageType**; /\* Optional; The type of image to return.   
Either JPEG, PNG, GIF or BMP. Default is JPEG.e.g. "JPEG" \*/   
**$FileName**) /\* Optional; The filename to use for the picture.  
Default is "image" with the extension matching the image type.e.g. "test.jpg" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MapView | The map view reference number. | $$MapView |  |
| ImageType | The type of image to return.    Either JPEG, PNG, GIF or BMP. Default is JPEG. | "JPEG" | Optional |
| FileName | The filename to use for the picture.   Default is "image" with the extension matching the image type. | "test.jpg" | Optional |

### Result

Returns container or error.

### Description

Renders screenshot of the map view.  
This includes annotations and overlays as they are visible.  
### Examples

Save screenshot to desktop:

 If \[ Length ( $$MapView ) &gt; 0 \]   
 Set Variable \[ $screenshot ; Value: MBS ("MapView.Screenshot"; $$MapView ; "PNG") \]   
 Set Variable \[ $file ; Value: MBS ( "[Path.AddPathComponent](PathAddPathComponent.md)"; MBS ( "[Folders.UserDesktop](FoldersUserDesktop.md)" ); "mapview.png" ) \]   
 Set Variable \[ $r ; Value: MBS ( "[Container.WriteFile](ContainerWriteFile.md)"; $screenshot ; $file ) \]   
End If  
### See also

- [Container.WriteFile](ContainerWriteFile.md)
- [Folders.UserDesktop](FoldersUserDesktop.md)
- [Path.AddPathComponent](PathAddPathComponent.md)
- [WebView.Screenshot](WebViewScreenshot.md)

### Release notes

- **Version 9.3**
    - Added [MapView.Screenshot](http://www.mbsplugins.eu/MapViewScreenshot.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#31ScriptAnchor_)
- [Mac and iOS/MapKit/MapView](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/MapView.shtml#8ScriptAnchor_)

### Blog Entries

- [Neues vom MBS Plugin 9.3](https://www.mbsplugins.de/archive/2019-09-13/Neues_vom_MBS_Plugin_93/monkeybreadsoftware_blog_filemaker)
- [Whats new in MBS FileMaker Plugin version 9.3](https://www.mbsplugins.de/archive/2019-08-17/Whats_new_in_MBS_FileMaker_Plu/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 9.3 - Über 5900 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2019-07-24/Neues_MBS_FileMaker_Plugin_93_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 9.3 - More than 5900 Functions In One Plugin](https://www.mbsplugins.de/archive/2019-07-24/MBS_FileMaker_Plugin_93_-_More/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.3pr1](https://www.mbsplugins.de/archive/2019-06-03/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2022, Seite 28](https://filemaker-magazin.de/neuigkeit/4172-Appetithappen-FMM_202201)

This function checks for a license.

Created 1st June 2019 , last changed 17th December 2022

  
[MapView.RemoveOverlays](MapViewRemoveOverlays.md) - [MapView.SelectedAnnotations](MapViewSelectedAnnotations.md)

[HTML Version](MapViewScreenshot.shtml)