[ios] Add debug descriptions to shapes and features

This commit is contained in:
Jason Wray
2017-07-18 19:17:11 -04:00
parent 1188707dc3
commit cd36ec00bc
3 changed files with 69 additions and 0 deletions

View File

@@ -201,4 +201,14 @@
@"coordinates": coordinates};
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; title = %@, subtitle: = %@, count = %lu; bounds = %@>",
NSStringFromClass([self class]), (void *)self,
self.title ? [NSString stringWithFormat:@"\"%@\"", self.title] : self.title,
self.subtitle ? [NSString stringWithFormat:@"\"%@\"", self.subtitle] : self.subtitle,
(unsigned long)self.polylines.count,
MGLStringFromCoordinateBounds(self.overlayBounds)];
}
@end