Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes #158: add support for callout subtitle via annotation subtitle

  • Loading branch information...
commit ce208f0de9129d67395f0e2a6c88bed2d45d9fcf 1 parent 8ad846a
@incanus incanus authored
View
3  MapView/Map/RMAnnotation.h
@@ -62,6 +62,9 @@
/** The annotation's title. */
@property (nonatomic, retain) NSString *title;
+/** The annotation's subtitle. */
+@property (nonatomic, retain) NSString *subtitle;
+
/** Storage for arbitrary data. */
@property (nonatomic, retain) id userInfo;
View
3  MapView/Map/RMAnnotation.m
@@ -38,6 +38,7 @@ @implementation RMAnnotation
@synthesize coordinate;
@synthesize title;
+@synthesize subtitle;
@synthesize userInfo;
@synthesize annotationType;
@synthesize annotationIcon, badgeIcon;
@@ -65,6 +66,7 @@ - (id)initWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)a
self.mapView = aMapView;
self.coordinate = aCoordinate;
self.title = aTitle;
+ self.subtitle = nil;
self.userInfo = nil;
self.quadTreeNode = nil;
@@ -86,6 +88,7 @@ - (id)initWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)a
- (void)dealloc
{
self.title = nil;
+ self.subtitle = nil;
self.userInfo = nil;
self.layer = nil;
[[self.mapView quadTree] removeAnnotation:self];
View
3  MapView/Map/RMMapView.m
@@ -1705,7 +1705,8 @@ - (void)tapOnAnnotation:(RMAnnotation *)anAnnotation atPoint:(CGPoint)aPoint
_currentCallout = [SMCalloutView new];
- _currentCallout.title = anAnnotation.title;
+ _currentCallout.title = anAnnotation.title;
+ _currentCallout.subtitle = anAnnotation.subtitle;
if (anAnnotation.layer.leftCalloutAccessoryView)
{
Please sign in to comment.
Something went wrong with that request. Please try again.