# Simple map view

> **Note (legacy): A newer version of the Maps SDK is available**
> 
> This page uses v6.4.1 of the Mapbox Maps SDK. A newer version of the SDK is available. Learn about the latest version, v11.29.0, in the [Maps SDK documentation](https://docs.mapbox.com/ios/maps/examples/simple-map-view/).

![](https://docs.mapbox.com/ios/assets/ideal-img/maps-examples-simple-map-view.21557b4.480.png)

Other Mapbox template styles can be displayed by referencing any of the [defined convenience methods](https://docs.mapbox.com/ios/maps/api/6.4.1/Classes/MGLStyle.html#/Accessing%20Default%20Styles) on `MGLStyle`. Or view the [Apply a style designed in Mapbox Studio example](https://docs.mapbox.com/ios/legacy/maps/examples/custom-style/) to learn how to display custom map style created in Mapbox Studio.

**Swift**

Title: `ViewController`

[View on GitHub](https://github.com/mapbox/ios-sdk-examples/tree/298e050be7352eb28cee6f03e02945593140c1f3/Examples/Swift/SimpleMapViewExample.swift)

```swift
import Mapbox

@objc(SimpleMapViewExample_Swift)

class SimpleMapViewExample_Swift: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()

        let mapView = MGLMapView(frame: view.bounds)
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

        // Set the map’s center coordinate and zoom level.
        mapView.setCenter(CLLocationCoordinate2D(latitude: 59.31, longitude: 18.06), zoomLevel: 9, animated: false)
        view.addSubview(mapView)
    }
}
```

**Objective C**

Title: `ViewController`

[View on GitHub](https://github.com/mapbox/ios-sdk-examples/tree/298e050be7352eb28cee6f03e02945593140c1f3/Examples/ObjectiveC/SimpleMapViewExample.m)

```swift
#import "ViewController.h"
@import Mapbox;
@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds];

    mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    // Set the map’s center coordinate and zoom level.
    [mapView setCenterCoordinate:CLLocationCoordinate2DMake(59.31, 18.06)
                       zoomLevel:9
                        animated:NO];

    [self.view addSubview:mapView];
}

@end
```