Skip to content

Commit 23a3f2d

Browse files
committed
Update label example
1 parent ff47ca2 commit 23a3f2d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Images/Labels.png

-33.9 KB
Loading

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ StaticMap(
5454

5555
```swift
5656
StaticMap(
57-
center: .init(latitude: 51.495, longitude: 0),
57+
zoom: 5,
5858
annotations: [
59-
.pin(coords: .init(latitude: 51.496, longitude: -0.002)).label("This is a label"),
60-
.pin(coords: .init(latitude: 51.494, longitude: -0.001)).label("This is another"),
59+
.pin(coords: .init(latitude: 53, longitude: -7)).label("Ireland"),
60+
.pin(coords: .init(latitude: 51.5, longitude: -2)).label("Britain"),
6161
]
6262
)
6363
```

Snippets/Labels.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ guard CommandLine.argc == 2 else {
1010
let outputPath = CommandLine.arguments[1]
1111

1212
let staticMap = StaticMap(
13-
center: .init(latitude: 51.495, longitude: 0),
13+
zoom: 5,
1414
annotations: [
15-
.pin(coords: .init(latitude: 51.496, longitude: -0.002)).label("This is a label"),
16-
.pin(coords: .init(latitude: 51.494, longitude: -0.001)).label("This is another"),
15+
.pin(coords: .init(latitude: 53, longitude: -7)).label("Ireland"),
16+
.pin(coords: .init(latitude: 51.5, longitude: -2)).label("Britain"),
1717
]
1818
)
1919
let image = try await staticMap.render()

0 commit comments

Comments
 (0)