Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Temporarily add explicit shape initializers in Swift
Browse files Browse the repository at this point in the history
  • Loading branch information
friedbunny committed Oct 19, 2016
1 parent 87bf093 commit fab820c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Examples/Swift/CustomAnnotationModelExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CustomAnnotationModelExample_Swift: UIViewController, MGLMapViewDelegate {
CLLocationCoordinate2DMake(-45, 40),
]

let polyline = CustomPolyline(coordinates: &coordinates, count: UInt(coordinates.count))
let polyline = CustomPolyline.polyline(coordinates: &coordinates, count: UInt(coordinates.count))
// Set the custom `color` property, later used in the `mapView:strokeColorForShapeAnnotation:` delegate method.
polyline.color = .darkGrayColor()

Expand Down
2 changes: 1 addition & 1 deletion Examples/Swift/DrawingAGeoJSONLineExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class DrawingAGeoJSONLineExample_Swift: UIViewController, MGLMapViewDelegate {
}
}

let line = MGLPolyline(coordinates: &coordinates, count: UInt(coordinates.count))
let line = MGLPolyline.polyline(coordinates: &coordinates, count: UInt(coordinates.count))

// Optionally set the title of the polyline, which can be used for:
// - Callout view
Expand Down
2 changes: 1 addition & 1 deletion Examples/Swift/DrawingAPolygonExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DrawingAPolygonExample_Swift: UIViewController, MGLMapViewDelegate {
CLLocationCoordinate2D(latitude: 45.522585, longitude: -122.685699),
]

let shape = MGLPolygon(coordinates: &coordinates, count: UInt(coordinates.count))
let shape = MGLPolygon.polygon(coordinates: &coordinates, count: UInt(coordinates.count))

mapView.addAnnotation(shape)
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/Swift/PointConversionExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PointConversionExample: UIViewController, MGLMapViewDelegate {
if (mapView.annotations?.count != nil) {
mapView.removeAnnotations(mapView.annotations!)
}
let polyline = MGLPolyline(coordinates: &coordinates, count: UInt(coordinates.count))
let polyline = MGLPolyline.polyline(coordinates: &coordinates, count: UInt(coordinates.count))
mapView.addAnnotation(polyline)
}
}

0 comments on commit fab820c

Please sign in to comment.