7
7
Swift DSLs for [ MapLibre Native] ( https://github.com/maplibre/maplibre-native ) , a free open-source renderer
8
8
for interactive vector maps, to enable better integration with SwiftUI and generally enable easier use of MapLibre.
9
9
10
+ ** NOTE: This package has migrated from Stadia Maps to the MapLibre organization 🎉**
11
+ If you previously installed this package,
12
+ see the [ ` CHANGELOG ` ] ( CHANGELOG.md ) for steps to ensure Xcode stays happy.
13
+
10
14
![ A screen recording demonstrating the declarative SwiftUI DSL reacting to changes live] ( demo.gif )
11
15
12
16
This package is a reimagining of the MapLibre API with a modern DSLs for SwiftUI.
@@ -32,19 +36,29 @@ Any breaking API changes will be reflected in release notes.
32
36
33
37
## Quick start
34
38
39
+ ### In a normal Xcode project
40
+
41
+ If you're building an app using an Xcode project,
42
+ the easiest way to add package dependencies is in the File menu.
43
+ Search for the package using the repository URL: ` https://github.com/maplibre/swiftui-dsl ` .
44
+
45
+ ### In a Swift package
46
+
35
47
Add the following to the main dependencies section of your ` Package.swift ` .
36
48
37
49
``` swift
38
- .package (url : " https://github.com/stadiamaps/ maplibre- swiftui-dsl-playground " , branch : " main" ),
50
+ .package (url : " https://github.com/maplibre/ swiftui-dsl" , branch : " main" ),
39
51
```
40
52
41
53
Then, for each target add either the DSL (for just the DSL) or both (for the SwiftUI view):
42
54
43
55
``` swift
44
- .product (name : " MapLibreSwiftDSL" , package : " maplibre- swiftui-dsl-playground " ),
45
- .product (name : " MapLibreSwiftUI" , package : " maplibre- swiftui-dsl-playground " ),
56
+ .product (name : " MapLibreSwiftDSL" , package : " swiftui-dsl" ),
57
+ .product (name : " MapLibreSwiftUI" , package : " swiftui-dsl" ),
46
58
```
47
59
60
+ ### Simple example: polyline rendering
61
+
48
62
Then, you can use it in a SwiftUI view body like this:
49
63
50
64
``` swift
0 commit comments