Make ASMapNode vend its annotations

This commit is contained in:
Adlai Holler
2016-02-25 10:32:13 -08:00
parent e53c0c2d8c
commit 2fbc7b0942
2 changed files with 13 additions and 3 deletions

View File

@@ -43,6 +43,7 @@
_needsMapReloadOnBoundsChange = YES;
_liveMap = NO;
_centerCoordinateOfMap = kCLLocationCoordinate2DInvalid;
_annotations = @[];
return self;
}
@@ -251,8 +252,18 @@
_mapView = nil;
}
- (NSArray *)annotations
{
ASDN::MutexLocker l(_propertyLock);
return _annotations;
}
- (void)setAnnotations:(NSArray *)annotations
{
if (annotations == nil) {
annotations = @[];
}
ASDN::MutexLocker l(_propertyLock);
_annotations = [annotations copy];
if (self.isLiveMap) {