Created
September 19, 2015 21:52
-
-
Save smellman/b4fb12a186ed13345b63 to your computer and use it in GitHub Desktop.
ViewController.swift for gsimap with mapbox-gl-native
This file contains 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
// | |
// ViewController.swift | |
// mapboxsdktest | |
// | |
// Created by 松澤 太郎 on 2015/09/20. | |
// Copyright © 2015年 Taro Matsuzawa. All rights reserved. | |
// | |
import UIKit | |
import Mapbox | |
class ViewController: UIViewController, MGLMapViewDelegate { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
let styleURL = NSURL(string: "https://gist.githubusercontent.com/smellman/494dbd3868ca6a8f3b41/raw/91a7ca5467315d0346e452de103302fa73cf9661/json") | |
let mapView = MGLMapView(frame: view.bounds, | |
styleURL: styleURL) | |
mapView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight] | |
view.addSubview(mapView) | |
} | |
override func didReceiveMemoryWarning() { | |
super.didReceiveMemoryWarning() | |
// Dispose of any resources that can be recreated. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment