Authored by Justin R. Miller

rename some properties to be more intuitive to use

@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 fillColor = kDefaultFillColor; 65 fillColor = kDefaultFillColor;
66 66
67 scaleLineWidth = NO; 67 scaleLineWidth = NO;
68 - enableDragging = YES; 68 + draggingEnabled = YES;
69 69
70 circlePath = NULL; 70 circlePath = NULL;
71 [self updateCirclePathAnimated:NO]; 71 [self updateCirclePathAnimated:NO];
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 // expressed in projected meters. The anchorPoint of the image/path/etc. is plotted here. 40 // expressed in projected meters. The anchorPoint of the image/path/etc. is plotted here.
41 RMProjectedPoint projectedLocation; 41 RMProjectedPoint projectedLocation;
42 42
43 - BOOL enableDragging; 43 + BOOL draggingEnabled;
44 44
45 // provided for storage of arbitrary user data 45 // provided for storage of arbitrary user data
46 id userInfo; 46 id userInfo;
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 @property (nonatomic, assign) RMProjectedPoint projectedLocation; 55 @property (nonatomic, assign) RMProjectedPoint projectedLocation;
56 56
57 /** When set to YES, the layer can be dragged by the user. */ 57 /** When set to YES, the layer can be dragged by the user. */
58 -@property (nonatomic, assign) BOOL enableDragging; 58 +@property (nonatomic, assign) BOOL draggingEnabled;
59 59
60 /** Storage for arbitrary data. */ 60 /** Storage for arbitrary data. */
61 @property (nonatomic, retain) id userInfo; 61 @property (nonatomic, retain) id userInfo;
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 @synthesize annotation; 33 @synthesize annotation;
34 @synthesize projectedLocation; 34 @synthesize projectedLocation;
35 -@synthesize enableDragging; 35 +@synthesize draggingEnabled;
36 @synthesize userInfo; 36 @synthesize userInfo;
37 @synthesize canShowCallout; 37 @synthesize canShowCallout;
38 @synthesize calloutOffset; 38 @synthesize calloutOffset;
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 return nil; 45 return nil;
46 46
47 self.annotation = nil; 47 self.annotation = nil;
48 - self.enableDragging = NO; 48 + self.draggingEnabled = NO;
49 self.calloutOffset = CGPointZero; 49 self.calloutOffset = CGPointZero;
50 50
51 return self; 51 return self;
@@ -86,14 +86,14 @@ typedef enum : NSUInteger { @@ -86,14 +86,14 @@ typedef enum : NSUInteger {
86 * This property controls only user interactions with the map. If you set the value of this property to `NO`, you may still change the map location programmatically. 86 * This property controls only user interactions with the map. If you set the value of this property to `NO`, you may still change the map location programmatically.
87 * 87 *
88 * The default value of this property is `YES`. */ 88 * The default value of this property is `YES`. */
89 -@property (nonatomic, assign) BOOL enableDragging; 89 +@property (nonatomic, assign) BOOL draggingEnabled;
90 90
91 /** A Boolean value that determines whether the map view bounces past the edge of content and back again and whether it animates the content scaling when the scaling exceeds the maximum or minimum limits. 91 /** A Boolean value that determines whether the map view bounces past the edge of content and back again and whether it animates the content scaling when the scaling exceeds the maximum or minimum limits.
92 * 92 *
93 * If the value of this property is `YES`, the map view bounces when it encounters a boundary of the content or when zooming exceeds either the maximum or minimum limits for scaling. Bouncing visually indicates that scrolling or zooming has reached an edge of the content. If the value is `NO`, scrolling and zooming stop immediately at the content boundary without bouncing. 93 * If the value of this property is `YES`, the map view bounces when it encounters a boundary of the content or when zooming exceeds either the maximum or minimum limits for scaling. Bouncing visually indicates that scrolling or zooming has reached an edge of the content. If the value is `NO`, scrolling and zooming stop immediately at the content boundary without bouncing.
94 * 94 *
95 * The default value is `NO`. */ 95 * The default value is `NO`. */
96 -@property (nonatomic, assign) BOOL enableBouncing; 96 +@property (nonatomic, assign) BOOL bouncingEnabled;
97 97
98 /** A Boolean value that determines whether double-tap zooms of the map always zoom on the center of the map, or whether they zoom on the center of the double-tap gesture. The default value is `NO`, which zooms on the gesture. */ 98 /** A Boolean value that determines whether double-tap zooms of the map always zoom on the center of the map, or whether they zoom on the center of the double-tap gesture. The default value is `NO`, which zooms on the gesture. */
99 @property (nonatomic, assign) BOOL zoomingInPivotsAroundCenter; 99 @property (nonatomic, assign) BOOL zoomingInPivotsAroundCenter;
@@ -352,7 +352,7 @@ typedef enum : NSUInteger { @@ -352,7 +352,7 @@ typedef enum : NSUInteger {
352 /** @name Configuring Annotation Clustering */ 352 /** @name Configuring Annotation Clustering */
353 353
354 /** Whether to enable clustering of map point annotations. Defaults to `NO`. */ 354 /** Whether to enable clustering of map point annotations. Defaults to `NO`. */
355 -@property (nonatomic, assign) BOOL enableClustering; 355 +@property (nonatomic, assign) BOOL clusteringEnabled;
356 356
357 /** Whether to position cluster markers at the weighted center of the points they represent. If `YES`, position clusters in weighted fashion. If `NO`, position them on a rectangular grid. Defaults to `NO`. */ 357 /** Whether to position cluster markers at the weighted center of the points they represent. If `YES`, position clusters in weighted fashion. If `NO`, position them on a rectangular grid. Defaults to `NO`. */
358 @property (nonatomic, assign) BOOL positionClusterMarkersAtTheGravityCenter; 358 @property (nonatomic, assign) BOOL positionClusterMarkersAtTheGravityCenter;
@@ -163,7 +163,7 @@ @@ -163,7 +163,7 @@
163 CGSize _lastContentSize; 163 CGSize _lastContentSize;
164 BOOL _mapScrollViewIsZooming; 164 BOOL _mapScrollViewIsZooming;
165 165
166 - BOOL _enableDragging, _enableBouncing; 166 + BOOL _draggingEnabled, _bouncingEnabled;
167 167
168 CGPoint _lastDraggingTranslation; 168 CGPoint _lastDraggingTranslation;
169 RMAnnotation *_draggedAnnotation; 169 RMAnnotation *_draggedAnnotation;
@@ -200,7 +200,7 @@ @@ -200,7 +200,7 @@
200 @synthesize screenScale = _screenScale; 200 @synthesize screenScale = _screenScale;
201 @synthesize tileCache = _tileCache; 201 @synthesize tileCache = _tileCache;
202 @synthesize quadTree = _quadTree; 202 @synthesize quadTree = _quadTree;
203 -@synthesize enableClustering = _enableClustering; 203 +@synthesize clusteringEnabled = _clusteringEnabled;
204 @synthesize positionClusterMarkersAtTheGravityCenter = _positionClusterMarkersAtTheGravityCenter; 204 @synthesize positionClusterMarkersAtTheGravityCenter = _positionClusterMarkersAtTheGravityCenter;
205 @synthesize orderClusterMarkersAboveOthers = _orderClusterMarkersAboveOthers; 205 @synthesize orderClusterMarkersAboveOthers = _orderClusterMarkersAboveOthers;
206 @synthesize clusterMarkerSize = _clusterMarkerSize, clusterAreaSize = _clusterAreaSize; 206 @synthesize clusterMarkerSize = _clusterMarkerSize, clusterAreaSize = _clusterAreaSize;
@@ -224,8 +224,8 @@ @@ -224,8 +224,8 @@
224 minZoomLevel:(float)initialTileSourceMinZoomLevel 224 minZoomLevel:(float)initialTileSourceMinZoomLevel
225 backgroundImage:(UIImage *)backgroundImage 225 backgroundImage:(UIImage *)backgroundImage
226 { 226 {
227 - _constrainMovement = _enableBouncing = _zoomingInPivotsAroundCenter = NO;  
228 - _enableDragging = YES; 227 + _constrainMovement = _bouncingEnabled = _zoomingInPivotsAroundCenter = NO;
  228 + _draggingEnabled = YES;
229 229
230 _lastDraggingTranslation = CGPointZero; 230 _lastDraggingTranslation = CGPointZero;
231 _draggedAnnotation = nil; 231 _draggedAnnotation = nil;
@@ -252,7 +252,7 @@ @@ -252,7 +252,7 @@
252 _annotations = [NSMutableSet new]; 252 _annotations = [NSMutableSet new];
253 _visibleAnnotations = [NSMutableSet new]; 253 _visibleAnnotations = [NSMutableSet new];
254 [self setQuadTree:[[[RMQuadTree alloc] initWithMapView:self] autorelease]]; 254 [self setQuadTree:[[[RMQuadTree alloc] initWithMapView:self] autorelease]];
255 - _enableClustering = _positionClusterMarkersAtTheGravityCenter = NO; 255 + _clusteringEnabled = _positionClusterMarkersAtTheGravityCenter = NO;
256 _clusterMarkerSize = CGSizeMake(100.0, 100.0); 256 _clusterMarkerSize = CGSizeMake(100.0, 100.0);
257 _clusterAreaSize = CGSizeMake(150.0, 150.0); 257 _clusterAreaSize = CGSizeMake(150.0, 150.0);
258 258
@@ -1178,9 +1178,9 @@ @@ -1178,9 +1178,9 @@
1178 _mapScrollView.showsVerticalScrollIndicator = NO; 1178 _mapScrollView.showsVerticalScrollIndicator = NO;
1179 _mapScrollView.showsHorizontalScrollIndicator = NO; 1179 _mapScrollView.showsHorizontalScrollIndicator = NO;
1180 _mapScrollView.scrollsToTop = NO; 1180 _mapScrollView.scrollsToTop = NO;
1181 - _mapScrollView.scrollEnabled = _enableDragging;  
1182 - _mapScrollView.bounces = _enableBouncing;  
1183 - _mapScrollView.bouncesZoom = _enableBouncing; 1181 + _mapScrollView.scrollEnabled = _draggingEnabled;
  1182 + _mapScrollView.bounces = _bouncingEnabled;
  1183 + _mapScrollView.bouncesZoom = _bouncingEnabled;
1184 _mapScrollView.contentSize = contentSize; 1184 _mapScrollView.contentSize = contentSize;
1185 _mapScrollView.minimumZoomScale = exp2f([self minZoom]); 1185 _mapScrollView.minimumZoomScale = exp2f([self minZoom]);
1186 _mapScrollView.maximumZoomScale = exp2f([self maxZoom]); 1186 _mapScrollView.maximumZoomScale = exp2f([self maxZoom]);
@@ -1662,7 +1662,7 @@ @@ -1662,7 +1662,7 @@
1662 if ([hit isEqual:_overlayView.layer]) 1662 if ([hit isEqual:_overlayView.layer])
1663 return NO; 1663 return NO;
1664 1664
1665 - if (!hit || ([hit respondsToSelector:@selector(enableDragging)] && ![(RMMarker *)hit enableDragging])) 1665 + if (!hit || ([hit respondsToSelector:@selector(draggingEnabled)] && ![(RMMarker *)hit draggingEnabled]))
1666 return NO; 1666 return NO;
1667 1667
1668 if ( ! [self shouldDragAnnotation:[self findAnnotationInLayer:hit]]) 1668 if ( ! [self shouldDragAnnotation:[self findAnnotationInLayer:hit]])
@@ -1689,7 +1689,7 @@ @@ -1689,7 +1689,7 @@
1689 if ( ! hit) 1689 if ( ! hit)
1690 return; 1690 return;
1691 1691
1692 - if ([hit respondsToSelector:@selector(enableDragging)] && ![(RMMarker *)hit enableDragging]) 1692 + if ([hit respondsToSelector:@selector(draggingEnabled)] && ![(RMMarker *)hit draggingEnabled])
1693 return; 1693 return;
1694 1694
1695 _lastDraggingTranslation = CGPointZero; 1695 _lastDraggingTranslation = CGPointZero;
@@ -2352,9 +2352,9 @@ @@ -2352,9 +2352,9 @@
2352 [self setZoom:tileSourcesZoom]; 2352 [self setZoom:tileSourcesZoom];
2353 } 2353 }
2354 2354
2355 -- (void)setEnableClustering:(BOOL)doEnableClustering 2355 +- (void)setClusteringEnabled:(BOOL)doEnableClustering
2356 { 2356 {
2357 - _enableClustering = doEnableClustering; 2357 + _clusteringEnabled = doEnableClustering;
2358 2358
2359 [self correctPositionOfAllAnnotations]; 2359 [self correctPositionOfAllAnnotations];
2360 } 2360 }
@@ -2373,25 +2373,25 @@ @@ -2373,25 +2373,25 @@
2373 [_mapScrollView setDecelerationRate:decelerationRate]; 2373 [_mapScrollView setDecelerationRate:decelerationRate];
2374 } 2374 }
2375 2375
2376 -- (BOOL)enableDragging 2376 +- (BOOL)draggingEnabled
2377 { 2377 {
2378 - return _enableDragging; 2378 + return _draggingEnabled;
2379 } 2379 }
2380 2380
2381 -- (void)setEnableDragging:(BOOL)enableDragging 2381 +- (void)setDraggingEnabled:(BOOL)enableDragging
2382 { 2382 {
2383 - _enableDragging = enableDragging; 2383 + _draggingEnabled = enableDragging;
2384 _mapScrollView.scrollEnabled = enableDragging; 2384 _mapScrollView.scrollEnabled = enableDragging;
2385 } 2385 }
2386 2386
2387 -- (BOOL)enableBouncing 2387 +- (BOOL)bouncingEnabled
2388 { 2388 {
2389 - return _enableBouncing; 2389 + return _bouncingEnabled;
2390 } 2390 }
2391 2391
2392 -- (void)setEnableBouncing:(BOOL)enableBouncing 2392 +- (void)setBouncingEnabled:(BOOL)enableBouncing
2393 { 2393 {
2394 - _enableBouncing = enableBouncing; 2394 + _bouncingEnabled = enableBouncing;
2395 _mapScrollView.bounces = enableBouncing; 2395 _mapScrollView.bounces = enableBouncing;
2396 _mapScrollView.bouncesZoom = enableBouncing; 2396 _mapScrollView.bouncesZoom = enableBouncing;
2397 } 2397 }
@@ -2701,7 +2701,7 @@ @@ -2701,7 +2701,7 @@
2701 boundingBox.size.height += (2.0 * boundingBoxBuffer); 2701 boundingBox.size.height += (2.0 * boundingBoxBuffer);
2702 2702
2703 NSArray *annotationsToCorrect = [self.quadTree annotationsInProjectedRect:boundingBox 2703 NSArray *annotationsToCorrect = [self.quadTree annotationsInProjectedRect:boundingBox
2704 - createClusterAnnotations:self.enableClustering 2704 + createClusterAnnotations:self.clusteringEnabled
2705 withProjectedClusterSize:RMProjectedSizeMake(self.clusterAreaSize.width * _metersPerPixel, self.clusterAreaSize.height * _metersPerPixel) 2705 withProjectedClusterSize:RMProjectedSizeMake(self.clusterAreaSize.width * _metersPerPixel, self.clusterAreaSize.height * _metersPerPixel)
2706 andProjectedClusterMarkerSize:RMProjectedSizeMake(self.clusterMarkerSize.width * _metersPerPixel, self.clusterMarkerSize.height * _metersPerPixel) 2706 andProjectedClusterMarkerSize:RMProjectedSizeMake(self.clusterMarkerSize.width * _metersPerPixel, self.clusterMarkerSize.height * _metersPerPixel)
2707 findGravityCenter:self.positionClusterMarkersAtTheGravityCenter]; 2707 findGravityCenter:self.positionClusterMarkersAtTheGravityCenter];
@@ -2895,7 +2895,7 @@ @@ -2895,7 +2895,7 @@
2895 [self.quadTree addAnnotation:annotation]; 2895 [self.quadTree addAnnotation:annotation];
2896 } 2896 }
2897 2897
2898 - if (_enableClustering) 2898 + if (_clusteringEnabled)
2899 { 2899 {
2900 [self correctPositionOfAllAnnotations]; 2900 [self correctPositionOfAllAnnotations];
2901 } 2901 }