You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-17Lines changed: 22 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,21 @@ Then, for each target add either the DSL (for just the DSL) or both (for the Swi
47
47
Check out the (super basic) [previews at the bottom of MapView.swift](Sources/MapLibreSwiftUI/MapView.swift)
48
48
or more detailed [Examples](Sources/MapLibreSwiftUI/Examples) to see how it works in practice.
49
49
50
-
## Navigation
50
+
## Common integrations
51
51
52
-
If you need to support navigation add https://github.com/HudHud-Maps/maplibre-navigation-ios.git to your Package.swift and add this code:
52
+
### Ferrostar
53
+
54
+
[Ferrostar](https://github.com/stadiamaps/ferrostar) has a MapLibre UI module as part of its Swift Package
55
+
which is already built on this!
56
+
See the [SwiftUI customization](https://stadiamaps.github.io/ferrostar/swiftui-customization.html)
57
+
part of the Ferrostar user guide for details on how to customize the map.
58
+
59
+
### MapLibre Navigation iOS
60
+
61
+
This package can help bridge the gap between MapLibre Navigation iOS and SwiftUI!
62
+
63
+
Add the Swift Package froh Hudhud (https://github.com/HudHud-Maps/maplibre-navigation-ios.git) to your Package.swift
64
+
and add code like this:
53
65
54
66
```swift
55
67
importMapboxCoreNavigation
@@ -84,21 +96,24 @@ var mapView: some View {
84
96
.cameraModifierDisabled(self.route!=nil)
85
97
}
86
98
```
87
-
We choose this approach so MapLibreSwiftUI is not depdending on maplibre-navigation as most users don't need it.
88
99
89
100
## Developer Quick Start
90
101
91
-
This project uses [`swiftformat`](https://github.com/nicklockwood/SwiftFormat) to automatically handle basic swift formatting
92
-
as well as to lint and ensure conformance in PRs. Check out the swiftformat [Install Guide](https://github.com/nicklockwood/SwiftFormat?tab=readme-ov-file#how-do-i-install-it)
93
-
to add swiftformat to your machine.
102
+
This project is a standard Swift package.
103
+
The only special thing you might need besides Xcode is [`swiftformat`](https://github.com/nicklockwood/SwiftFormat).
104
+
We use it to automatically handle basic formatting and to linting
105
+
so the code has a standard style.
94
106
107
+
Check out the swiftformat [Install Guide](https://github.com/nicklockwood/SwiftFormat?tab=readme-ov-file#how-do-i-install-it)
108
+
to add swiftformat to your machine.
95
109
Once installed, you can autoformat code using the command:
96
110
97
111
```sh
98
112
swiftformat .
99
113
```
100
114
101
-
Swiftformat can occasionally poorly resolve a formatting issue (e.g. when you've already line-broken a large comment). Issues like this are typically easy to manually correct.
115
+
Swiftformat can occasionally poorly resolve a formatting issue (e.g. when you've already line-broken a large comment).
116
+
Issues like this are typically easy to manually correct.
102
117
103
118
## Structure
104
119
@@ -126,17 +141,7 @@ The code has a number of TODOs, most of which can be tackled by any intermediate
126
141
issues should all be tracked in GitHub. DISCUSS comments (should migrate to GitHub issues/discussions) are deeper
127
142
questions. Input welcome.
128
143
129
-
WARNING: This section is slightly out of date. We are targeting MapLibre 6.0 pre-releases, so the docs are not totally
130
-
up to date.
131
-
132
144
The skeleton is already in place for several of the core concepts, including style layers and sources, but
133
145
these are incomplete. You can help by opening a PR that fills these in. For example, if you wanted to fill out the
134
146
API for the line style layer, head over to [the docs](https://maplibre.org/maplibre-native/ios/api/Classes/MGLLineStyleLayer.html)
135
147
and get to work filling out the remaining properties and modifiers.
136
-
137
-
Note that some Swift 5.9 improvements like macros will make things a bit easier, so it may make sense to punt on
138
-
things like fleshing out the expressions API helpers (which will be highly repetitive) till that lands. When in doubt,
139
-
check out the issue tracker, as these sholud be noted there.
140
-
141
-
TODO: Look at PointFree's Snapshot testing that generates images of SwiftUI views. Also look at inline snapshotting.
0 commit comments