Last active
September 3, 2018 01:41
-
-
Save rockarts/9f5baca9f0a813aaa07461e0a167e6f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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