Skip to content

Instantly share code, notes, and snippets.

@rockarts
Last active September 3, 2018 01:41
Show Gist options
  • Select an option

  • Save rockarts/9f5baca9f0a813aaa07461e0a167e6f3 to your computer and use it in GitHub Desktop.

Select an option

Save rockarts/9f5baca9f0a813aaa07461e0a167e6f3 to your computer and use it in GitHub Desktop.
import UIKit
import Mapbox
import MapboxNavigation
import MapboxCoreNavigation
import MapboxDirections
class ViewController: UIViewController {
var mapView: MGLMapView!
override func viewDidLoad() {
super.viewDidLoad()
mapView = MGLMapView(frame: view.bounds)
mapView.showsUserLocation = true
mapView.setUserTrackingMode(.follow, animated: true)
//PASTE YOUR STYLE URL IN THE STRING!
mapView.styleURL = URL(string:"")
view.addSubview(mapView)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment