MRMapViewController Class Reference
| Inherits from | UIViewController |
|---|---|
| Conforms to | MRDSheetSearchDelegate MRMapViewDelegate |
| Declared in | MRMapViewController.h |
Overview
A view controller implementing MRMapViewDelegate that handles all essential MRMapView tasks and events.
mapView
The map view this controller is responsible for.
@property (nonatomic, strong) MRMapView *mapViewDeclared In
MRMapViewController.h
pendingDestination
If set, this controller will initiate directions to the specified destination as soon as the map view is displayed.
@property (nullable, nonatomic, strong) MRPlacemark *pendingDestinationDeclared In
MRMapViewController.h
sheetDelegate
Provides the data and actions related to the placemark annotation sheet.
@property (nullable, nonatomic, strong) id<MRDMapViewControllerDelegate> sheetDelegateDeclared In
MRMapViewController.h
silenceNoRouteFoundAlerts
Allow for silencing no route found alerts.
Default value is NO
@property (nonatomic, assign) BOOL silenceNoRouteFoundAlertsDeclared In
MRMapViewController.h
shouldIndexAnnotations
Automatically index all placemarks after they’ve been loaded
Default value is YES if disableCoreSpotlightIndexing is NO on
your MRConfig
@property (nonatomic, assign) BOOL shouldIndexAnnotationsDeclared In
MRMapViewController.h
displaysSearchSheet
Always show a search card in the map view controller. Defaults to NO.
@property (nonatomic, assign) BOOL displaysSearchSheetDeclared In
MRMapViewController.h
useAccessiblePathsDefault
Set the initial default route to be Accessible. Defaults to NO.
@property (nonatomic, assign) BOOL useAccessiblePathsDefaultDeclared In
MRMapViewController.h
– initWithEditorKey:
A convenient initializer to add an associated editor key along with instantiation.
- (_Nullable instancetype)initWithEditorKey:(MREditorKey *)keyParameters
key |
An instance of MREditorKey |
|---|
Return Value
An instance of a MRMapViewController
Declared In
MRMapViewController.h
– initWithEditorKey:isChildViewController:
A convenient initializer to add an associated editor key along with instantiation.
- (_Nullable instancetype)initWithEditorKey:(MREditorKey *)key isChildViewController:(BOOL)isChildParameters
key |
An instance of MREditorKey |
|---|---|
isChild |
tells the view controller it should be treated as being inside a subview as a child view controller. This will manipulate the style of the sheet so it does not slide up from the bottom but appears over the subview itself. |
Return Value
An instance of a MRMapViewController
Declared In
MRMapViewController.h
– startDirectionsToPlacemark:
Begins directions to the given Placemark from the user’s current location.
- (void)startDirectionsToPlacemark:(MRPlacemark *)placemarkParameters
placemark |
The destination for the route. |
|---|
Declared In
MRMapViewController.h
– startDirectionsToFriend:
Begins directions to the given friend from the user’s current location.
- (void)startDirectionsToFriend:(MRFriend *)friend_Parameters
friend_ |
The destination for the route. |
|---|
Declared In
MRMapViewController.h
– startDirectionsToPlacemark:fromPlacemark:
Begins directions from one given Placemark to another.
- (void)startDirectionsToPlacemark:(MRPlacemark *)placemark fromPlacemark:(MRPlacemark *_Nullable)fromPlacemarkParameters
placemark |
The destination for the route. |
|---|---|
fromPlacemark |
The starting point for the route. |
Declared In
MRMapViewController.h
– addSheetWithDetailController:expandable:canBeFloatingSheet:
Adds a bottom sheet with the provided child as a child view controller. will remove any existing floating sheet. Any bottom sheet MUST be added using this API, or else MapViewController won’t be able to account for existing bottom sheet state.
- (void)addSheetWithDetailController:(MRDBottomSheetAbstractController *)sheetController expandable:(BOOL)expandable canBeFloatingSheet:(BOOL)floatableParameters
sheetController |
When added to MapViewController a child, the BottomSheetViewController will use this sheet as a child. |
|---|---|
expandable |
should the child sheet be expandable by the user via a drag handle. |
floatable |
can this be a floating sheet |
Declared In
MRMapViewController.h
– zoomToAnnotation:
Zooms the map view to the selected annotation.
- (void)zoomToAnnotation:(id<MRAnnotation>)annotationParameters
annotation |
An annotation target. |
|---|
Declared In
MRMapViewController.h
– showAnnotationsInBottomSheet:
In an MRDBottomSheetViewController, shows the provided annotations in a list.
- (void)showAnnotationsInBottomSheet:(NSArray<MRAnnotation> *)annotationsParameters
annotations |
Annotations to show in the bottom sheet. |
|---|
Declared In
MRMapViewController.h