RealmMapView
class RealmMapView : MKMapView
extension RealmMapView: MKMapViewDelegate
Creates an interface object that inherits MKMapView and manages fetching and displaying annotations for a Realm Swift object class that contains coordinate data.
-
The configuration for the Realm in which the entity resides Default is [RLMRealmConfiguration defaultConfiguration]
Declaration
Swift
var realmConfiguration: Realm.Configuration { get set }
-
The Realm in which the given entity resides in
Declaration
Swift
var realm: Realm { get }
-
The Realm object’s name being fetched for the map view
Declaration
Swift
@IBInspectable var entityName: String?
-
The key path on fetched Realm objects for the latitude value
Declaration
Swift
@IBInspectable var latitudeKeyPath: String?
-
The key path on fetched Realm objects for the longitude value
Declaration
Swift
@IBInspectable var longitudeKeyPath: String?
-
The key path on fetched Realm objects for the title of the annotation view If nil, then no title will be shown
Declaration
Swift
@IBInspectable var titleKeyPath: String?
-
The key path on fetched Realm objects for the subtitle of the annotation view If nil, then no subtitle
Declaration
Swift
@IBInspectable var subtitleKeyPath: String?
-
Designates if the map view will cluster the annotations
Declaration
Swift
@IBInspectable var clusterAnnotations: Bool
-
Designates if the map view automatically refreshes when the map moves
Declaration
Swift
@IBInspectable var autoRefresh: Bool
-
Designates if the map view will zoom to a region that contains all points on the first refresh of the map annotations (presumably on viewWillAppear)
Declaration
Swift
@IBInspectable var zoomOnFirstRefresh: Bool
-
If enabled, annotation views will be animated when added to the map. Default is YES
Declaration
Swift
@IBInspectable var animateAnnotations: Bool
-
If YES, a standard callout bubble will be shown when the annotation is selected. The annotation must have a title for the callout to be shown.
Declaration
Swift
@IBInspectable var canShowCallout: Bool
-
Use this property to filter items found by the map. This predicate will be included, via AND, along with the generated predicate for the location bounding box.
Declaration
Swift
var basePredicate: NSPredicate?
-
Provide annotation updating status
Declaration
Swift
var isUpdatingAnnotations: Bool { get set }
-
override entry point
Declaration
Swift
func willUpdateAnnotations()
-
override entry point
Declaration
Swift
func didUpdateAnnotations()
-
Expose serial work queue for scheduling
Declaration
Swift
var serialWorkQueue: OperationQueue { get }
-
Shim for client delegate
Declaration
Swift
override weak var delegate: MKMapViewDelegate? { get set }
-
Performs a fresh fetch for Realm objects based on the current visible map rect
Declaration
Swift
func refreshMapView(refreshRegion: MKCoordinateRegion? = nil, // swiftlint:disable:previous function_body_length refreshMapRect: MKMapRect? = nil)
-
Produce annotation view
Declaration
Swift
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView?
Parameters
mapView
Map view
annotation
Annotation
Return Value
Mappable[s]AnnotationView
-
Handle annoation selection
Declaration
Swift
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
Parameters
mapView
Map view
view
Annotation view
-
Update user location
Declaration
Swift
func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation)
Parameters
mapView
Map view
userLocation
Location
-
Provide overlay renderer
Declaration
Swift
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
Parameters
mapView
Map view
overlay
Overlay
Return Value
Renderer