summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFeature.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLFeature.mm')
-rw-r--r--platform/darwin/src/MGLFeature.mm13
1 files changed, 11 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLFeature.mm b/platform/darwin/src/MGLFeature.mm
index c45b0bbda1..ba2ea6e605 100644
--- a/platform/darwin/src/MGLFeature.mm
+++ b/platform/darwin/src/MGLFeature.mm
@@ -1,4 +1,5 @@
#import "MGLFeature_Private.h"
+#import "MGLShapeCollectionFeature_Private.h"
#import "MGLPointAnnotation.h"
#import "MGLPolyline.h"
@@ -177,6 +178,15 @@
return mbgl::Feature{geometry};
}
+- (mbgl::FeatureCollection)mbglFeatureCollection {
+ mbgl::FeatureCollection featureCollection;
+ featureCollection.reserve(self.shapes.count);
+ for (id <MGLFeaturePrivate> feature in self.shapes) {
+ featureCollection.push_back([feature mbglFeature]);
+ }
+ return featureCollection;
+}
+
@end
/**
@@ -277,8 +287,7 @@ public:
}
MGLShape <MGLFeaturePrivate> * operator()(const mbgl::Feature &feature) const {
- GeometryEvaluator<T> evaluator;
- MGLShape <MGLFeaturePrivate> *shape = mapbox::geometry::geometry<T>::visit(feature.geometry, evaluator);
+ MGLShape <MGLFeaturePrivate> *shape = (MGLShape <MGLFeaturePrivate> *)MGLFeatureFromMBGLFeature(feature);
return shape;
}