summaryrefslogtreecommitdiff
path: root/platform/ios/app
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2017-01-11 16:05:38 -0800
committerGitHub <noreply@github.com>2017-01-11 16:05:38 -0800
commit6ad47cfbad038ee8330fece5da7438d084e67a68 (patch)
tree98aa48e9c2562791a310c30e5d107c4221f99c1e /platform/ios/app
parent4332b3b9539e1c059b18c77ef6c0a9e6af44fe84 (diff)
downloadqtlocation-mapboxgl-6ad47cfbad038ee8330fece5da7438d084e67a68.tar.gz
[ios, macos] Add convenience initializers to shape source (#7665)
This adds two new convenience initializers to MGLShapeSource: -initWithIdentifier:features:options: takes an array of shape objects that conform to MGLFeature, inserts them in a shape collection feature and creates a source with that shape. -initWithIdentifier:shapes:options does the same but with concrete MGLShape objects that get added to a shape collection. Throw an exception if an shape source is created with the features initializer but is sent an array of features that contains something that is not actually an object that conforms to the feature protocol. Updates to geojson data guide Qualify APIs that take arrays of shapes that are features
Diffstat (limited to 'platform/ios/app')
-rw-r--r--platform/ios/app/MBXViewController.m3
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 13401997a0..ff69581dac 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -919,8 +919,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
}
dispatch_async(dispatch_get_main_queue(), ^{
- MGLShapeCollectionFeature *features = [MGLShapeCollectionFeature shapeCollectionWithShapes:visibleFeatures];
- MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:querySourceID shape:features options:nil];
+ MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:querySourceID features:visibleFeatures options:nil];
[self.mapView.style addSource:source];
MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:queryLayerID source:source];