From a7f7b0938ad8e81e20fea55b20cc6899c3360380 Mon Sep 17 00:00:00 2001 From: Nadia Barbosa Date: Mon, 20 Aug 2018 13:11:14 -0700 Subject: Try checking MGLComputedShapeSources --- platform/darwin/src/MGLComputedShapeSource.mm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platform/darwin/src/MGLComputedShapeSource.mm b/platform/darwin/src/MGLComputedShapeSource.mm index 609db7f399..5c8da74ac4 100644 --- a/platform/darwin/src/MGLComputedShapeSource.mm +++ b/platform/darwin/src/MGLComputedShapeSource.mm @@ -131,6 +131,14 @@ mbgl::style::CustomGeometrySource::Options MBGLCustomGeometrySourceOptionsFromDi mbgl::FeatureCollection featureCollection; featureCollection.reserve(data.count); for (MGLShape * feature in data) { + if ([feature 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."); + }); + } mbgl::Feature geoJsonObject = [feature geoJSONObject].get(); featureCollection.push_back(geoJsonObject); } @@ -196,6 +204,14 @@ mbgl::style::CustomGeometrySource::Options MBGLCustomGeometrySourceOptionsFromDi for (MGLShape * feature in features) { mbgl::Feature geoJsonObject = [feature geoJSONObject].get(); featureCollection.push_back(geoJsonObject); + if ([feature 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."); + }); + } } const auto geojson = mbgl::GeoJSON{featureCollection}; static_cast(self.rawSource)->setTileData(tileID, geojson); -- cgit v1.2.1