diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-08 14:51:57 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-08 17:45:18 -0800 |
commit | c6e60b8c03631a7ee24c480e10d3e426a400af9f (patch) | |
tree | 95ffd40cc9cbdc6275118c8b748f6466f837d26b /platform | |
parent | 84f90697df57782263cec0e0d688820bf3c4b644 (diff) | |
download | qtlocation-mapboxgl-c6e60b8c03631a7ee24c480e10d3e426a400af9f.tar.gz |
[ios, macos] Test unclusterable shape source shapes
Diffstat (limited to 'platform')
-rw-r--r-- | platform/darwin/test/MGLShapeSourceTests.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLShapeSourceTests.mm b/platform/darwin/test/MGLShapeSourceTests.mm index efff4b393e..2662d4b6f0 100644 --- a/platform/darwin/test/MGLShapeSourceTests.mm +++ b/platform/darwin/test/MGLShapeSourceTests.mm @@ -37,6 +37,19 @@ XCTAssertNil(source.shape); } +- (void)testUnclusterableShape { + NSDictionary *options = @{ + MGLShapeSourceOptionClustered: @YES, + }; + + MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"id" shape:[[MGLPointFeature alloc] init] options:options]; + XCTAssertTrue([source.shape isKindOfClass:[MGLPointFeature class]]); + + MGLShapeCollectionFeature *feature = [MGLShapeCollectionFeature shapeCollectionWithShapes:@[]]; + source = [[MGLShapeSource alloc] initWithIdentifier:@"id" shape:feature options:options]; + XCTAssertTrue([source.shape isKindOfClass:[MGLShapeCollectionFeature class]]); +} + - (void)testMGLShapeSourceWithDataMultipleFeatures { NSString *geoJSON = @"{\"type\": \"FeatureCollection\",\"features\": [{\"type\": \"Feature\",\"properties\": {},\"geometry\": {\"type\": \"LineString\",\"coordinates\": [[-107.75390625,40.329795743702064],[-104.34814453125,37.64903402157866]]}}]}"; |