Simple map view

Other Mapbox template styles can be displayed by referencing any of the defined convenience methods on MGLStyle. Alternatively, view the Apply a style designed in Mapbox Studio example to learn how to display custom map style created in Mapbox Studio.

import Mapbox
class ViewController: UIViewController {
override func 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)