diff options
Diffstat (limited to 'platform/darwin/src/MGLShapeSource.mm')
-rw-r--r-- | platform/darwin/src/MGLShapeSource.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLShapeSource.mm b/platform/darwin/src/MGLShapeSource.mm index 15437ebedb..023a81bba8 100644 --- a/platform/darwin/src/MGLShapeSource.mm +++ b/platform/darwin/src/MGLShapeSource.mm @@ -95,7 +95,10 @@ const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance = @"MGLSh optionalFilter = predicate.mgl_filter; } - std::vector<mbgl::Feature> features = self.rawSource->querySourceFeatures({ {}, optionalFilter }); + std::vector<mbgl::Feature> features; + if (self.mapView) { + features = self.mapView.mbglMap->querySourceFeatures(self.rawSource->getID(), { {}, optionalFilter }); + } return MGLFeaturesFromMBGLFeatures(features); } |