Skip to content

Commit afdced7

Browse files
committed
Add docstring
1 parent 9dae6c1 commit afdced7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Shared/Samples/Download preplanned map area/DownloadPreplannedMapAreaView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct DownloadPreplannedMapAreaView: View {
2626
@StateObject private var model = Model()
2727

2828
var body: some View {
29-
MapView(map: model.currentMap, viewpoint: model.currentMap.initialViewpoint?.zoomedIn())
29+
MapView(map: model.currentMap, viewpoint: model.currentMap.initialViewpoint?.expanded())
3030
.overlay(alignment: .top) {
3131
mapNameOverlay
3232
}
@@ -75,7 +75,9 @@ struct DownloadPreplannedMapAreaView: View {
7575
}
7676

7777
private extension Viewpoint {
78-
func zoomedIn() -> Viewpoint {
78+
/// Expands the viewpoint's geometry.
79+
/// - Returns: A viewpoint with it's geometry expanded by 50%.
80+
func expanded() -> Viewpoint {
7981
let builder = EnvelopeBuilder(envelope: self.targetGeometry.extent)
8082
builder.expand(by: 0.5)
8183
let zoomEnvelope = builder.toGeometry()

0 commit comments

Comments
 (0)