developers

iOS SDK

Open source alternative to MapKit

A simple map view

Show a map in a view controller.
#import "MapBox.h"

@implementation MyViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    RMMapBoxSource *tileSource = [[RMMapBoxSource alloc] initWithMapID:@"examples.map-z2effxa8"];

    RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource];

    [self.view addSubview:mapView];
}

@end