Authored by Justin R. Miller

default to MapBox watermarked map instead of OSM

@@ -36,6 +36,9 @@ @@ -36,6 +36,9 @@
36 #import "RMMapView.h" 36 #import "RMMapView.h"
37 #import "RMPointAnnotation.h" 37 #import "RMPointAnnotation.h"
38 38
  39 +#define kMapBoxNormalMapID @"examples.map-z2effxa8"
  40 +#define kMapBoxRetinaMapID @"examples.map-zswgei2n"
  41 +
39 @interface RMMapBoxSource () 42 @interface RMMapBoxSource ()
40 43
41 @property (nonatomic, retain) NSDictionary *infoDictionary; 44 @property (nonatomic, retain) NSDictionary *infoDictionary;
@@ -49,6 +52,11 @@ @@ -49,6 +52,11 @@
49 52
50 @synthesize infoDictionary=_infoDictionary, tileJSON=_tileJSON, imageQuality=_imageQuality, dataQueue=_dataQueue; 53 @synthesize infoDictionary=_infoDictionary, tileJSON=_tileJSON, imageQuality=_imageQuality, dataQueue=_dataQueue;
51 54
  55 +- (id)init
  56 +{
  57 + return [self initWithMapID:([[UIScreen mainScreen] scale] > 1.0 ? kMapBoxRetinaMapID : kMapBoxNormalMapID)];
  58 +}
  59 +
52 - (id)initWithMapID:(NSString *)mapID 60 - (id)initWithMapID:(NSString *)mapID
53 { 61 {
54 return [self initWithMapID:mapID enablingDataOnMapView:nil]; 62 return [self initWithMapID:mapID enablingDataOnMapView:nil];
@@ -38,10 +38,10 @@ @@ -38,10 +38,10 @@
38 #import "RMQuadTree.h" 38 #import "RMQuadTree.h"
39 39
40 #import "RMFractalTileProjection.h" 40 #import "RMFractalTileProjection.h"
41 -#import "RMOpenStreetMapSource.h"  
42 41
43 #import "RMTileCache.h" 42 #import "RMTileCache.h"
44 #import "RMTileSource.h" 43 #import "RMTileSource.h"
  44 +#import "RMMapBoxSource.h"
45 45
46 #import "RMMapTiledLayerView.h" 46 #import "RMMapTiledLayerView.h"
47 #import "RMMapOverlayView.h" 47 #import "RMMapOverlayView.h"
@@ -321,7 +321,7 @@ @@ -321,7 +321,7 @@
321 coordinate.latitude = kDefaultInitialLatitude; 321 coordinate.latitude = kDefaultInitialLatitude;
322 coordinate.longitude = kDefaultInitialLongitude; 322 coordinate.longitude = kDefaultInitialLongitude;
323 323
324 - [self performInitializationWithTilesource:[[RMOpenStreetMapSource new] autorelease] 324 + [self performInitializationWithTilesource:[[RMMapBoxSource new] autorelease]
325 centerCoordinate:coordinate 325 centerCoordinate:coordinate
326 zoomLevel:kDefaultInitialZoomLevel 326 zoomLevel:kDefaultInitialZoomLevel
327 maxZoomLevel:kDefaultMaximumZoomLevel 327 maxZoomLevel:kDefaultMaximumZoomLevel
@@ -333,7 +333,7 @@ @@ -333,7 +333,7 @@
333 333
334 - (id)initWithFrame:(CGRect)frame 334 - (id)initWithFrame:(CGRect)frame
335 { 335 {
336 - return [self initWithFrame:frame andTilesource:[[RMOpenStreetMapSource new] autorelease]]; 336 + return [self initWithFrame:frame andTilesource:[[RMMapBoxSource new] autorelease]];
337 } 337 }
338 338
339 - (id)initWithFrame:(CGRect)frame andTilesource:(id <RMTileSource>)newTilesource 339 - (id)initWithFrame:(CGRect)frame andTilesource:(id <RMTileSource>)newTilesource