-
-
Save plu/b3835e6afe7538fada15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <CoreLocation/CoreLocation.h> | |
#import <Foundation/Foundation.h> | |
#import <MapKit/MapKit.h> | |
@interface KMPointMapItem : NSObject <MKAnnotation> | |
- (instancetype)initWithLocation:(KMLocation *)location; | |
@property (nonatomic, assign) BOOL shouldBeMerged; | |
@property (nonatomic, strong) NSArray *containedAnnotations; | |
@property (nonatomic, strong) KMPointMapItem *clusterAnnotation; | |
@property (nonatomic, readwrite) CLLocationCoordinate2D coordinate; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "KMLocation.h" | |
#import "KMPointMapItem.h" | |
@interface KMPointMapItem () | |
@property (nonatomic, strong) KMLocation *location; | |
@end | |
@implementation KMPointMapItem | |
- (instancetype)initWithLocation:(KMLocation *)location | |
{ | |
if (self = [super init]) { | |
_coordinate = CLLocationCoordinate2DMake(location.latitude.doubleValue, location.longitude.doubleValue); | |
_location = location; | |
_shouldBeMerged = YES; | |
} | |
return self; | |
} | |
- (NSString *)title | |
{ | |
return self.location.name; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey plu can you provide the whole code of it to perform clustering..I am student and want to perform clustering of gmsmarkers on google map in ios..but not get the code which can direct me in right direction to find solutions.Thanks in advance