diff options
author | Nadia Barbosa <nadiabarbosa@me.com> | 2018-08-13 17:24:56 -0700 |
---|---|---|
committer | Nadia Barbosa <captainbarbosa@users.noreply.github.com> | 2018-08-20 15:45:03 -0700 |
commit | 50059659d100759978c8bebb04ac7beb9e6d618f (patch) | |
tree | 67aa9811c9357b128738a38da02b6a9ca327ff7f /platform/darwin/src/MGLShapeSource.mm | |
parent | fcb68041d51990a4cf67d88fa1eeb0f5d882305c (diff) | |
download | qtlocation-mapboxgl-50059659d100759978c8bebb04ac7beb9e6d618f.tar.gz |
Warn if MGLShapeSource is initialized with MGLShapeCollection
Move warning from ShapeCollection to ShapeSource
Try checking MGLComputedShapeSources
Include MGLShapeCollection header
Add changelog entry
Diffstat (limited to 'platform/darwin/src/MGLShapeSource.mm')
-rw-r--r-- | platform/darwin/src/MGLShapeSource.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLShapeSource.mm b/platform/darwin/src/MGLShapeSource.mm index 1425269012..9457d2569a 100644 --- a/platform/darwin/src/MGLShapeSource.mm +++ b/platform/darwin/src/MGLShapeSource.mm @@ -105,6 +105,14 @@ mbgl::style::GeoJSONOptions MGLGeoJSONOptionsFromDictionary(NSDictionary<MGLShap auto geoJSONOptions = MGLGeoJSONOptionsFromDictionary(options); auto source = std::make_unique<mbgl::style::GeoJSONSource>(identifier.UTF8String, geoJSONOptions); if (self = [super initWithPendingSource:std::move(source)]) { + if ([shape isMemberOfClass:[MGLShapeCollection class]]) { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + NSLog(@"MGLShapeCollection initialized with MGLFeatures will not retain attributes." + @"Use MGLShapeCollectionFeature to retain attributes instead." + @"This will be logged only once."); + }); + } self.shape = shape; } return self; |