-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
@@ -802,7 +810,7 @@ | |||
0503373D1F7199DF007309B0 = { | |||
CreatedOnToolsVersion = 8.3.3; | |||
DevelopmentTeam = GJZR2MEM28; | |||
LastSwiftMigration = 0900; | |||
LastSwiftMigration = 0910; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s stick to using the latest stable version of Xcode.
Podfile
Outdated
installer.pods_project.targets.each do |target| | ||
if target.name == 'DocsCode' | ||
target.build_configurations.each do |config| | ||
config.build_settings['SWIFT_VERSION'] = '3.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DocsCode targets should use the same Swift version as the rest of the project → #123.
topRight: CLLocationCoordinate2D(latitude: 46.437, longitude: -71.516)) | ||
|
||
// Create a MGLImageSource that uses | ||
let source = MGLImageSource(identifier: "radar", coordinateQuad: coordinates, url: URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif")!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a remote URL is 👌, but let’s use our own copies of resources.
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds styleURL: [MGLStyle darkStyleURL]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: there’s an unnecessary space after styleURL:
.
} | ||
|
||
- (void)mapView:(MGLMapView *)mapView didFinishLoadingStyle:(MGLStyle *)style { | ||
MGLCoordinateQuad coordinates = MGLCoordinateQuadMake(CLLocationCoordinate2DMake(46.437, -80.425), CLLocationCoordinate2DMake(37.936, -80.425), CLLocationCoordinate2DMake(37.936, -71.516), CLLocationCoordinate2DMake(46.437, -71.516)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, does this wrap well? Might consider doing what you did in the Swift version and manually wrap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 with a few comments
[super viewDidLoad]; | ||
|
||
MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds styleURL:[MGLStyle darkStyleURL]]; | ||
mapView.delegate = self; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment above that matches our other examples?
CLLocationCoordinate2DMake(37.936, -71.516), | ||
CLLocationCoordinate2DMake(46.437, -71.516)); | ||
|
||
// Create a MGLImageSource, which can be used to add georeferenced raster images the style of a map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add georeferenced raster images the style of a map.
👇
add georeferenced raster images to a map.
super.viewDidLoad() | ||
|
||
let mapView = MGLMapView(frame: view.bounds, styleURL: MGLStyle.darkStyleURL()) | ||
mapView.delegate = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in the Objective-C example.
bottomRight: CLLocationCoordinate2D(latitude: 37.936, longitude: -71.516), | ||
topRight: CLLocationCoordinate2D(latitude: 46.437, longitude: -71.516)) | ||
|
||
// Create a MGLImageSource, which can be used to add georeferenced raster images the style of a map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add georeferenced raster images the style of a map.
👇
add georeferenced raster images to a map.
* bumped podfile * added objective-c * Added some comments * Improved comments * Moved example within list * Edited Podfile * addressed @captainbarbosa's feedback
* bumped podfile * added objective-c * Added some comments * Improved comments * Moved example within list * Edited Podfile * addressed @captainbarbosa's feedback
* bumped podfile * added objective-c * Added some comments * Improved comments * Moved example within list * Edited Podfile * addressed @captainbarbosa's feedback Fix rebase/merge mistakes. Added resizing for map view
Addresses #93 and adds example for
MGLImageSource
.