Our SwiftUI DSL Is Joining the MapLibre Family

We're thrilled to announce MapLibre SwiftUI DSL has graduated from the Stadia Maps labs to become a MapLibre-hosted project. The project makes MapLibre a first-class citizen in SwiftUI apps, and fills an important gap in the iOS developer experience for MapLibre.

The project began when our co-founder Ian Wagner wanted MapLibre to have a developer experience that rivaled MapKit for SwiftUI. Jacob Fielding (Rallista), Patrick Wolowicz and Patrick Kladek (HudHud) shared the vision and joined the project, contributing significantly to the development and success of the project. We're grateful for their ongoing contributions, and for the support from their respective companies.

By transitioning to a MapLibre hosted project, the SwiftUI DSL will have more visibility, and will unify ongoing initiatives to make MapLibre work better with SwiftUI.

Modernizing the Map Developer Experience

Before the SwiftUI DSL, developers had to build their own wrapper views to use MapLibre in a SwiftUI app. This was a lot of work—often duplicating what others had already done—and required a deep understanding of MapLibre Native's Objective-C API. The SwiftUI DSL makes this largely a thing of the past. With just a few lines of code, developers can overlay custom layers, bind the camera to reactive state, and set up custom gestures.

For library authors, the DSL unlocks a whole new level of composability. It's now easy to offer a "default" experience that users can customize. Our own Ferrostar navigation SDK leverages this pattern, giving developers the power to add custom map layers, overlays, and controls on top of a map during turn-by-turn navigation. This sort of behavior is extremely difficult and error-prone in UIKit, but is a breeze in SwiftUI. We're excited to see more library authors adopting this approach too.

Learn More & Next Steps

  • Check out our quickstart to build your first map with SwiftUI.
  • Find the source code on GitHub (and give it a star!).
  • Join the #maplibre-swiftui-compose-playground channel in the OpenStreetMap US Slack to get help or join the development effort.
  • Follow Stadia Maps on Mastodon, Twitter, or LinkedIn, or sign-up for our newsletter to hear about exciting developments first.