Answer the question
In order to leave comments, you need to log in
MapBox iOS SDK framework
I'm trying to use the MapBox SDK in my project, but I get an error when compiling on the device:
I follow these steps :
1. Obtain the map ID for your hosted map by clicking Publish and copying the Map ID;
2. Download the latest SDK binary release from the downloads and drag MapBox.framework into your project's Frameworks section, making sure to link it in your target;
3. Add -ObjC to your app target's Other Linker Flags build setting in order to ensure that the SDK's static library has all symbols loaded, even for categories;
4. Add the following libraries to your app target's Link Binary With Libraries build phase:
- CoreLocation.framework (required for location services);
- QuartzCore.framework (required because of advanced layer manipulation);
- libsqlite3.dylib (required for MBTiles and caching support);
- libz.dylib (required for UTFGrid interactivity).
And I use the following code to test:
#import <MapBox/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];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question