MKMapView
public extension MKMapView
-
SwifterSwift: Dequeue reusable MKAnnotationView using class type
Declaration
Swift
func dequeueReusableAnnotationView<T>(withClass name: T.Type) -> T? where T : MKAnnotationView
Parameters
name
MKAnnotationView type.
Return Value
optional MKAnnotationView object.
-
SwifterSwift: Register MKAnnotationView using class type
Declaration
Swift
@available(iOS 11.0, tvOS 11.0, OSX 10.13, *) func register<T>(annotationViewWithClass name: T.Type) where T : MKAnnotationView
Parameters
name
MKAnnotationView type.
-
SwifterSwift: Dequeue reusable MKAnnotationView using class type
Declaration
Swift
@available(iOS 11.0, tvOS 11.0, OSX 10.13, *) func dequeueReusableAnnotationView<T>(withClass name: T.Type, for annotation: MKAnnotation) -> T? where T : MKAnnotationView
Parameters
name
MKAnnotationView type.
annotation
annotation of the mapView.
Return Value
optional MKAnnotationView object.
-
SwifterSwift: Zooms in on multiple mapView coordinates.
Declaration
Swift
func zoom(to coordinates: [CLLocationCoordinate2D], meter: Double, edgePadding: EdgeInsets, animated: Bool)
Parameters
coordinates
Gets the array of type CLLocationCoordinate2D.
meter
If arrays have a single item, they take the value of meters (Double). The map zooms in at the given meters.
edgePadding
The amount of additional space (measured in screen points) to make visible around the specified rectangle
animated
The animation control takes the Boolean value. Enter the true value for zooming with the animation.