Documentation Archive Developer
Search

MapKit Changes for Swift

MapKit

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified MKCircle
Protocols
FromAnyObject, MKAnnotation, MKOverlay, NSObjectProtocol
ToMKOverlay

Protocols
FromAnyObject
To--

Modified MKCircleView
Protocols
FromAnyObject
To--

Modified MKDirections
Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified MKETAResponse
Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MKLocalSearch
Protocols
FromAnyObject
To--

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromAnyObject
To--

Modified MKMapCamera
DeclarationProtocols
From
class MKMapCamera : NSObject, NSSecureCoding, NSCoding, NSCopying {
    var centerCoordinate: CLLocationCoordinate2D
    var heading: CLLocationDirection
    var pitch: CGFloat
    var altitude: CLLocationDistance
    convenience init()
    class func camera() -> Self
    convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance)
    class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance) -> Self
    convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection)
    class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection) -> Self
}
AnyObject, NSCoding, NSCopying, NSSecureCoding
To
class MKMapCamera : NSObject, NSSecureCoding, NSCopying {
    var centerCoordinate: CLLocationCoordinate2D
    var heading: CLLocationDirection
    var pitch: CGFloat
    var altitude: CLLocationDistance
    convenience init()
    class func camera() -> Self
    convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance)
    class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromEyeCoordinate eyeCoordinate: CLLocationCoordinate2D, eyeAltitude eyeAltitude: CLLocationDistance) -> Self
    convenience init(lookingAtCenterCoordinate centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection)
    class func cameraLookingAtCenterCoordinate(_ centerCoordinate: CLLocationCoordinate2D, fromDistance distance: CLLocationDistance, pitch pitch: CGFloat, heading heading: CLLocationDirection) -> Self
}
NSCopying, NSSecureCoding

Modified MKMapItem
Protocols
FromAnyObject
To--

Modified MKMapSnapshot
Protocols
FromAnyObject
To--

Protocols
FromAnyObject, NSCopying
ToNSCopying

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Modified MKMapView
DeclarationProtocols
From
class MKMapView : UIView {
    weak var delegate: MKMapViewDelegate?
    var mapType: MKMapType
    var region: MKCoordinateRegion
    func setRegion(_ region: MKCoordinateRegion, animated animated: Bool)
    var centerCoordinate: CLLocationCoordinate2D
    func setCenterCoordinate(_ coordinate: CLLocationCoordinate2D, animated animated: Bool)
    func regionThatFits(_ region: MKCoordinateRegion) -> MKCoordinateRegion
    var visibleMapRect: MKMapRect
    func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)
    func mapRectThatFits(_ mapRect: MKMapRect) -> MKMapRect
    func _handleSelectionAtPoint(_ locationInView: CGPoint)
    func setVisibleMapRect(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets, animated animate: Bool)
    func mapRectThatFits(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets) -> MKMapRect
    @NSCopying var camera: MKMapCamera
    func setCamera(_ camera: MKMapCamera, animated animated: Bool)
    func convertCoordinate(_ coordinate: CLLocationCoordinate2D, toPointToView view: UIView?) -> CGPoint
    func convertPoint(_ point: CGPoint, toCoordinateFromView view: UIView?) -> CLLocationCoordinate2D
    func convertRegion(_ region: MKCoordinateRegion, toRectToView view: UIView?) -> CGRect
    func convertRect(_ rect: CGRect, toRegionFromView view: UIView?) -> MKCoordinateRegion
    var zoomEnabled: Bool
    var scrollEnabled: Bool
    var rotateEnabled: Bool
    var pitchEnabled: Bool
    var showsCompass: Bool
    var showsScale: Bool
    var showsPointsOfInterest: Bool
    var showsBuildings: Bool
    var showsTraffic: Bool
    var showsUserLocation: Bool
    var userLocation: MKUserLocation { get }
    var userTrackingMode: MKUserTrackingMode
    func setUserTrackingMode(_ mode: MKUserTrackingMode, animated animated: Bool)
    var userLocationVisible: Bool { get }
    func addAnnotation(_ annotation: MKAnnotation)
    func addAnnotations(_ annotations: [MKAnnotation])
    func removeAnnotation(_ annotation: MKAnnotation)
    func removeAnnotations(_ annotations: [MKAnnotation])
    var annotations: [MKAnnotation] { get }
    func annotationsInMapRect(_ mapRect: MKMapRect) -> Set<NSObject>
    func viewForAnnotation(_ annotation: MKAnnotation) -> MKAnnotationView?
    func dequeueReusableAnnotationViewWithIdentifier(_ identifier: String) -> MKAnnotationView?
    func selectAnnotation(_ annotation: MKAnnotation, animated animated: Bool)
    func deselectAnnotation(_ annotation: MKAnnotation?, animated animated: Bool)
    var selectedAnnotations: [MKAnnotation]
    var annotationVisibleRect: CGRect { get }
    func showAnnotations(_ annotations: [MKAnnotation], animated animated: Bool)
}
extension MKMapView {
    func addOverlay(_ overlay: MKOverlay, level level: MKOverlayLevel)
    func addOverlays(_ overlays: [MKOverlay], level level: MKOverlayLevel)
    func removeOverlay(_ overlay: MKOverlay)
    func removeOverlays(_ overlays: [MKOverlay])
    func insertOverlay(_ overlay: MKOverlay, atIndex index: Int, level level: MKOverlayLevel)
    func insertOverlay(_ overlay: MKOverlay, aboveOverlay sibling: MKOverlay)
    func insertOverlay(_ overlay: MKOverlay, belowOverlay sibling: MKOverlay)
    func exchangeOverlay(_ overlay1: MKOverlay, withOverlay overlay2: MKOverlay)
    var overlays: [MKOverlay] { get }
    func overlaysInLevel(_ level: MKOverlayLevel) -> [MKOverlay]
    func rendererForOverlay(_ overlay: MKOverlay) -> MKOverlayRenderer?
    func viewForOverlay(_ overlay: MKOverlay) -> MKOverlayView
    func addOverlay(_ overlay: MKOverlay)
    func addOverlays(_ overlays: [MKOverlay])
    func insertOverlay(_ overlay: MKOverlay, atIndex index: Int)
    func exchangeOverlayAtIndex(_ index1: Int, withOverlayAtIndex index2: Int)
}
AnyObject, NSCoding
To
class MKMapView : UIView, NSCoding {
    weak var delegate: MKMapViewDelegate?
    var mapType: MKMapType
    var region: MKCoordinateRegion
    func setRegion(_ region: MKCoordinateRegion, animated animated: Bool)
    var centerCoordinate: CLLocationCoordinate2D
    func setCenterCoordinate(_ coordinate: CLLocationCoordinate2D, animated animated: Bool)
    func regionThatFits(_ region: MKCoordinateRegion) -> MKCoordinateRegion
    var visibleMapRect: MKMapRect
    func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)
    func mapRectThatFits(_ mapRect: MKMapRect) -> MKMapRect
    func _handleSelectionAtPoint(_ locationInView: CGPoint)
    func setVisibleMapRect(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets, animated animate: Bool)
    func mapRectThatFits(_ mapRect: MKMapRect, edgePadding insets: UIEdgeInsets) -> MKMapRect
    @NSCopying var camera: MKMapCamera
    func setCamera(_ camera: MKMapCamera, animated animated: Bool)
    func convertCoordinate(_ coordinate: CLLocationCoordinate2D, toPointToView view: UIView?) -> CGPoint
    func convertPoint(_ point: CGPoint, toCoordinateFromView view: UIView?) -> CLLocationCoordinate2D
    func convertRegion(_ region: MKCoordinateRegion, toRectToView view: UIView?) -> CGRect
    func convertRect(_ rect: CGRect, toRegionFromView view: UIView?) -> MKCoordinateRegion
    var zoomEnabled: Bool
    var scrollEnabled: Bool
    var rotateEnabled: Bool
    var pitchEnabled: Bool
    var showsCompass: Bool
    var showsScale: Bool
    var showsPointsOfInterest: Bool
    var showsBuildings: Bool
    var showsTraffic: Bool
    var showsUserLocation: Bool
    var userLocation: MKUserLocation { get }
    var userTrackingMode: MKUserTrackingMode
    func setUserTrackingMode(_ mode: MKUserTrackingMode, animated animated: Bool)
    var userLocationVisible: Bool { get }
    func addAnnotation(_ annotation: MKAnnotation)
    func addAnnotations(_ annotations: [MKAnnotation])
    func removeAnnotation(_ annotation: MKAnnotation)
    func removeAnnotations(_ annotations: [MKAnnotation])
    var annotations: [MKAnnotation] { get }
    func annotationsInMapRect(_ mapRect: MKMapRect) -> Set<NSObject>
    func viewForAnnotation(_ annotation: MKAnnotation) -> MKAnnotationView?
    func dequeueReusableAnnotationViewWithIdentifier(_ identifier: String) -> MKAnnotationView?
    func selectAnnotation(_ annotation: MKAnnotation, animated animated: Bool)
    func deselectAnnotation(_ annotation: MKAnnotation?, animated animated: Bool)
    var selectedAnnotations: [MKAnnotation]
    var annotationVisibleRect: CGRect { get }
    func showAnnotations(_ annotations: [MKAnnotation], animated animated: Bool)
}
extension MKMapView {
    func addOverlay(_ overlay: MKOverlay, level level: MKOverlayLevel)
    func addOverlays(_ overlays: [MKOverlay], level level: MKOverlayLevel)
    func removeOverlay(_ overlay: MKOverlay)
    func removeOverlays(_ overlays: [MKOverlay])
    func insertOverlay(_ overlay: MKOverlay, atIndex index: Int, level level: MKOverlayLevel)
    func insertOverlay(_ overlay: MKOverlay, aboveOverlay sibling: MKOverlay)
    func insertOverlay(_ overlay: MKOverlay, belowOverlay sibling: MKOverlay)
    func exchangeOverlay(_ overlay1: MKOverlay, withOverlay overlay2: MKOverlay)
    var overlays: [MKOverlay] { get }
    func overlaysInLevel(_ level: MKOverlayLevel) -> [MKOverlay]
    func rendererForOverlay(_ overlay: MKOverlay) -> MKOverlayRenderer?
    func viewForOverlay(_ overlay: MKOverlay) -> MKOverlayView
    func addOverlay(_ overlay: MKOverlay)
    func addOverlays(_ overlays: [MKOverlay])
    func insertOverlay(_ overlay: MKOverlay, atIndex index: Int)
    func exchangeOverlayAtIndex(_ index1: Int, withOverlayAtIndex index2: Int)
}
NSCoding

Modified MKMultiPoint
Protocols
FromAnyObject
To--

Modified MKOverlay
DeclarationProtocols
From
protocol MKOverlay : MKAnnotation, NSObjectProtocol {
    var coordinate: CLLocationCoordinate2D { get }
    var boundingMapRect: MKMapRect { get }
    optional func intersectsMapRect(_ mapRect: MKMapRect) -> Bool
    optional func canReplaceMapContent() -> Bool
}
MKAnnotation, NSObjectProtocol
To
protocol MKOverlay : MKAnnotation {
    var coordinate: CLLocationCoordinate2D { get }
    var boundingMapRect: MKMapRect { get }
    optional func intersectsMapRect(_ mapRect: MKMapRect) -> Bool
    optional func canReplaceMapContent() -> Bool
}
MKAnnotation

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MKOverlayView
Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--

Protocols
FromAnyObject
To--

Modified MKPlacemark
Protocols
FromAnyObject, MKAnnotation, NSObjectProtocol
ToMKAnnotation

Protocols
FromAnyObject
To--

Modified MKPolygon
Protocols
FromAnyObject, MKAnnotation, MKOverlay, NSObjectProtocol
ToMKOverlay

Protocols
FromAnyObject
To--

Modified MKPolygonView
Protocols
FromAnyObject
To--

Modified MKPolyline
Protocols
FromAnyObject, MKAnnotation, MKOverlay, NSObjectProtocol
ToMKOverlay

Protocols
FromAnyObject
To--

Protocols
FromAnyObject
To--

Modified MKRoute
Protocols
FromAnyObject
To--

Modified MKRouteStep
Protocols
FromAnyObject
To--

Modified MKShape
Protocols
FromAnyObject, MKAnnotation, NSObjectProtocol
ToMKAnnotation

Modified MKTileOverlay
DeclarationProtocols
From
class MKTileOverlay : NSObject, MKOverlay, MKAnnotation {
    init(URLTemplate URLTemplate: String?)
    var tileSize: CGSize
    var geometryFlipped: Bool
    var minimumZ: Int
    var maximumZ: Int
    var URLTemplate: String? { get }
    var canReplaceMapContent: Bool
}
extension MKTileOverlay {
    func URLForTilePath(_ path: MKTileOverlayPath) -> NSURL
    func loadTileAtPath(_ path: MKTileOverlayPath, result result: (NSData?, NSError?) -> Void)
}
AnyObject, MKAnnotation, MKOverlay, NSObjectProtocol
To
class MKTileOverlay : NSObject, MKOverlay {
    init(URLTemplate URLTemplate: String?)
    var tileSize: CGSize
    var geometryFlipped: Bool
    var minimumZ: Int
    var maximumZ: Int
    var URLTemplate: String? { get }
    var canReplaceMapContent: Bool
}
extension MKTileOverlay {
    func URLForTilePath(_ path: MKTileOverlayPath) -> NSURL
    func loadTileAtPath(_ path: MKTileOverlayPath, result result: (NSData?, NSError?) -> Void)
}
MKOverlay

Protocols
FromAnyObject
To--

Protocols
FromAnyObject, MKAnnotation, NSObjectProtocol
ToMKAnnotation

Protocols
FromAnyObject
To--

Protocols
FromEquatable, Hashable, RawRepresentable
To--