diff options
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r-- | platform/macos/app/MapDocument.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index 602ed1aa41..7d39f93347 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -726,8 +726,14 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio [self.undoManager setActionName:@"Add Graticule"]; } + NSDictionary *sourceOptions = @{ + MGLShapeSourceOptionMaximumZoomLevel:@14, + MGLShapeSourceOptionWrapsCoordinates: @YES, + MGLShapeSourceOptionClipsCoordinates: @YES, + }; MGLComputedShapeSource *source = [[MGLComputedShapeSource alloc] initWithIdentifier:@"graticule" - options:@{MGLShapeSourceOptionMaximumZoomLevel:@14}]; + options:sourceOptions]; + source.dataSource = self; [self.mapView.style addSource:source]; MGLLineStyleLayer *lineLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"graticule.lines" |