MapView.SetRegion
-----------------

Sets the current region.

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

MBS( "MapView.SetRegion"; MapView; Value ) 

**MBS**( **"MapView.SetRegion";** /\* Sets the current region. \*/  
**$MapView**; /\* The map view reference number.e.g. $$MapView \*/   
**$Value**) /\* An JSON with region details.   
Can be degree or meter based for span. latitude and longitude to define center coordinate. Add latitudeMeters/longitudeMeters or latitudeDelta/longitudeDelta to define span.   
If there is an address key, we query coordiantes of the given address string instead of using coordinates. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MapView | The map view reference number. | $$MapView |
| Value | An JSON with region details.    Can be degree or meter based for span. latitude and longitude to define center coordinate. Add latitudeMeters/longitudeMeters or latitudeDelta/longitudeDelta to define span.    If there is an address key, we query coordiantes of the given address string instead of using coordinates. |  |

### Result

Returns OK or error.

### Description

Sets the current region.  
### Examples

Sets region:

 MBS ( "MapView.SetRegion"; $$MapView ; "{ \\"longitude\\" : 9.3726796999999955 , \\"longitudeDelta\\" : 2.0140728459134323 , \\"latitude\\" : 53.679886299999907 , \\"latitudeDelta\\" : 0.63485953767546732 }")  
### See also

- [MapView.GetHeight](MapViewGetHeight.md)
- [MapView.GetRegion](MapViewGetRegion.md)
- [MapView.SetScript](MapViewSetScript.md)

This function is free to use.

Created 14th January 2019 , last changed 15th January 2019

  
[MapView.SetPitchEnabled](MapViewSetPitchEnabled.md) - [MapView.SetRotateEnabled](MapViewSetRotateEnabled.md)

[HTML Version](MapViewSetRegion.shtml)