MapView.SetCoordinate
---------------------

Sets center coordinate of the map.

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

MBS( "MapView.SetCoordinate"; MapView; Latitude; Longitude { ; ZoomLevel; Animated } ) 

**MBS**( **"MapView.SetCoordinate";** /\* Sets center coordinate of the map. \*/  
**$MapView**; /\* The map view reference number.e.g. $$MapView \*/   
**$Latitude**; /\* The latitude of the coordinate. \*/   
**$Longitude**; /\* The longitude of the coordinate. \*/   
**$ZoomLevel**; /\* Optional; Optional zoom level in range from 0 to 20. \*/   
**$Animated**) /\* Optional; Whether to animate the change.  
Default is 1 to animate.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| MapView | The map view reference number. | $$MapView |  |
| Latitude | The latitude of the coordinate. |  |  |
| Longitude | The longitude of the coordinate. |  |  |
| ZoomLevel | Optional zoom level in range from 0 to 20. |  | Optional |
| Animated | Whether to animate the change.   Default is 1 to animate. | 1 | Optional |

### Result

Returns OK or error.

### Description

Sets center coordinate of the map.  
### See also

- [MapView.MouseCoordinate](MapViewMouseCoordinate.md)

### Example Databases

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

This function is free to use.

Created 14th January 2019 , last changed 28th November 2019

  
[MapView.SetColor](MapViewSetColor.md) - [MapView.SetFrame](MapViewSetFrame.md)

[HTML Version](MapViewSetCoordinate.shtml)