MapView.SetFrameWithControl
---------------------------

Repositions map view to given control.

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

MBS( "MapView.SetFrameWithControl"; MapView; ControlName { ; DX; DY } ) 

**MBS**( **"MapView.SetFrameWithControl";** /\* Repositions map view to given control. \*/  
**$MapView**; /\* The map view reference number.e.g. $$MapView \*/   
**$ControlName**; /\* The name of the control on your FileMaker form.   
e.g. you can place a rectangle there to define the position.e.g. "mymedia" \*/   
**$DX**; /\* Optional; A delta to move drop area more to left or right.e.g. 0 \*/   
**$DY**) /\* Optional; A delta to move drop area more to top or bottom.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MapView | The map view reference number. | $$MapView |  |
| ControlName | The name of the control on your FileMaker form.    e.g. you can place a rectangle there to define the position. | "mymedia" |  |
| DX | A delta to move drop area more to left or right. | 0 | Optional |
| DY | A delta to move drop area more to top or bottom. | 0 | Optional |

### Result

Returns OK or error.

### Description

Repositions map view to given control.  
If you moved control in layout mode, this can move the drop area back to the new position.  
Also useful to switch between different locations on the layout.  
### See also

- [AVPlayer.SetFrameWithControl](AVPlayerSetFrameWithControl.md)
- [DragDrop.SetFrameWithControl](DragDropSetFrameWithControl.md)
- [ImageView.SetFrameWithControl](ImageViewSetFrameWithControl.md)
- [MapView.CreateWithControl](MapViewCreateWithControl.md)
- [Overlay.SetFrameWithControl](OverlaySetFrameWithControl.md)
- [Preview.SetFrameWithControl](PreviewSetFrameWithControl.md)
- [TextView.SetFrameWithControl](TextViewSetFrameWithControl.md)
- [WebView.SetFrameWithControl](WebViewSetFrameWithControl.md)

### Release notes

- **Version 10.3**
    - Rewrote control placement for MacOS and iOS controls for [AVPlayer.SetFrameWithControl](https://www.mbsplugins.eu/AVPlayerSetFrameWithControl.shtml), [DragDrop.SetFrameWithControl](https://www.mbsplugins.eu/DragDropSetFrameWithControl.shtml), [ImageView.SetFrameWithControl](https://www.mbsplugins.eu/ImageViewSetFrameWithControl.shtml), [MapView.SetFrameWithControl](https://www.mbsplugins.eu/MapViewSetFrameWithControl.shtml) [TextView.SetFrameWithControl](https://www.mbsplugins.eu/TextViewSetFrameWithControl.shtml), [WebView.SetFrameWithControl](https://www.mbsplugins.eu/WebViewSetFrameWithControl.shtml).
- **Version 9.0**
    - Added [ImageView.SetFrameWithControl](http://www.mbsplugins.eu/ImageViewSetFrameWithControl.shtml) and [MapView.SetFrameWithControl](http://www.mbsplugins.eu/MapViewSetFrameWithControl.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.3pr3](https://www.mbsplugins.de/archive/2020-06-12/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.0pr9](https://www.mbsplugins.de/archive/2019-01-20/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 16th January 2019 , last changed 9th June 2020

  
[MapView.SetFrame](MapViewSetFrame.md) - [MapView.SetMapType](MapViewSetMapType.md)

[HTML Version](MapViewSetFrameWithControl.shtml)