Skip to content

Commit d75f980

Browse files
Add missing inits
1 parent ab29fb2 commit d75f980

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/MCMap/Library/CartographyDrawing.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,24 @@ public struct CartographyDrawing: SendableCoded, Identifiable {
4848

4949
/// The map region that encompasses the drawing.
5050
public var mapRect: MapRect
51+
52+
public init(coordinate: CGPoint, drawing: PKDrawing, mapRect: MapRect) {
53+
self.coordinate = coordinate
54+
self.drawing = drawing
55+
self.mapRect = mapRect
56+
}
5157
}
5258

5359
/// A unique identifier for the drawing overlay.
5460
public var id: UUID = UUID()
5561

5662
/// The drawing overlay contents to send to a corresponding map.
5763
public var data: DrawingOverlay
64+
65+
public init(id: UUID, data: DrawingOverlay) {
66+
self.id = id
67+
self.data = data
68+
}
5869
}
5970

6071
extension CartographyDrawing: VersionedCodable {

0 commit comments

Comments
 (0)