diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2017-06-13 15:21:50 -0700 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2017-06-13 15:21:50 -0700 |
commit | 04a0c64482c045bd622a8d1c4ad6ca1baace2c34 (patch) | |
tree | 9c978aa3e4850f71fa26fb033f2cb3c81c58b555 /platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift | |
parent | 17ccd0100ceff3ab7d4dd6eb58e3345745dff117 (diff) | |
download | qtlocation-mapboxgl-04a0c64482c045bd622a8d1c4ad6ca1baace2c34.tar.gz |
[ios] added demo projectupstream/jk-nb-pod-try
Diffstat (limited to 'platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift')
-rw-r--r-- | platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift b/platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift new file mode 100644 index 0000000000..2940f6fd0d --- /dev/null +++ b/platform/ios/demo/Examples/Swift/CustomRasterStyleExample.swift @@ -0,0 +1,17 @@ +import Mapbox + +@objc(CustomRasterStyleExample_Swift) + +class CustomRasterStyleExample_Swift: UIViewController { + override func viewDidLoad() { + super.viewDidLoad() + + let styleURL = URL(string: "https://www.mapbox.com/ios-sdk/files/mapbox-raster-v8.json") + // Local paths are also acceptable. + + let mapView = MGLMapView(frame: view.bounds, styleURL: styleURL) + mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight] + + view.addSubview(mapView) + } +} |