Authored by Davigoli

Issue 26: exposing decelerationFactor

... ... @@ -36,6 +36,7 @@ typedef struct {
BOOL enableDragging;
BOOL enableZoom;
RMGestureDetails lastGesture;
float decelerationFactor;
}
// Any other functions you need to manipulate the mapyou can access through this
... ... @@ -47,6 +48,7 @@ typedef struct {
// do not retain the delegate so you can let the corresponding controller implement the
// delegate without circular references
@property (assign) id<RMMapViewDelegate> delegate;
@property (readwrite) float decelerationFactor;
- (id)initWithFrame:(CGRect)frame WithLocation:(CLLocationCoordinate2D)latlong;
... ...
... ... @@ -40,6 +40,7 @@
@end
@implementation RMMapView
@synthesize decelerationFactor;
-(void) initValues:(CLLocationCoordinate2D)latlong
{
... ... @@ -54,6 +55,7 @@
enableDragging = YES;
enableZoom = YES;
decelerationFactor = 0.88f;
// [self recalculateImageSet];
... ... @@ -493,8 +495,8 @@
// avoid calling delegate methods? design call here
[contents moveBy:decelerationDelta];
decelerationDelta.width *= 0.99f;
decelerationDelta.height *= 0.99f;
decelerationDelta.width *= [self decelerationFactor];
decelerationDelta.height *= [self decelerationFactor];
}
- (void)stopDeceleration {
... ...