This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@class MapDirectionsHelper; | |
@protocol MapDirectionsHelperDelegate | |
@optional | |
-(void)mapDirectionsHelper:(MapDirectionsHelper *)sender didGetRoute:(MKRoute *)route; | |
-(void)mapDirectionsHelper:(MapDirectionsHelper *)sender didFailToGetRoute:(NSError *)error; | |
-(void)mapDirectionsHelper:(MapDirectionsHelper *)sender didGetRouteETA:(NSTimeInterval)eta; | |
-(void)mapDirectionsHelper:(MapDirectionsHelper *)sender didFailToGetRouteETA:(NSError *)error; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MyViewController.h" | |
#import <MapKit/MapKit.h> | |
@interface MyViewController () | |
@property (weak, nonatomic) IBOutlet UIImageView *mapImageView; | |
@end | |
//helper method to get the rect in the map for an array of points | |
MKMapRect MapRectBoundingMapPoints(MKMapPoint points[], NSUInteger pointCount){ | |
double minX = INFINITY, maxX = -INFINITY, minY = INFINITY, maxY = -INFINITY; |