Latest 1.0
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking

Use MBMapSnapshotter to retrieve an image from the static image service with your custom style. After downloading the image the class will call a block with a MBSnapshot Object from witch you can retrieve the UIImage itself and also get the CGPoint in the image for a give CLLocationCoordinate2d (useful to draw custom markers or routes on it)


Make this repo a submodule of your git repository or just fork it. You’ll also need AFNetworking. I’m currently working on a CocoaPods Podspec


#import <CLLocation/CLLocation.h>
#import "AFNetworking.h"
#import "MBMapSnapshotter.h"

- (void)takeSnapshot {
  CLLocationCoordinate2D coordnate = CLLocationCoordnate2DMake(52.516667, 13.383333); //Berlin
  MBMapSnapshotter *mapSnapShotter = [[MBMapSnapshotter alloc]init];
  [mapSnapShotter setMapName:@""];
  [mapSnapShotter getSnapshotWithCenter:coordinate size:CGSizeMake(480, 320) zoomLevel:14 finishingBlock:^(MBSnapshot *snapshot, NSError *error) {
    if (error){
      NSLog(@"Error %@", error);
    } else {
      [_imageView setImage snapshot.image];

You can also use

- (CGPoint)pointForCoordinate:(CLLocationCoordinate2D)coordinate

to get a point in the image for a give coordinate.


  • The images are 1x only, if you need Retina images you will need to request the 2x size
  • The minimum size is 4×4 pixels, the maximum size is 640×640 (restriction by
  • The image property of MBSnapshot is not read-only right now so you should be aware that the coordinates will only be true for the initial map image

Latest podspec

    "name": "MBMapSnapshotter",
    "version": "1.0",
    "summary": "Make static images from MapBox without loosing the coordinates",
    "description": "                   * Download images from using AFNetworkingn                   * Does the calculations of points for coordinates for youn                   * Very small footprintn",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Philip Brechler": "[email protected]"
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "v1.0"
    "source_files": [
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "~> 2.0"

Pin It on Pinterest

Share This