- Join OSM US Slack.
- Join the
#stadia-maps
channel.
Autocomplete Search for SwiftUI and Jetpack Compose
If you've ever tried adding location search to a mobile app, you already know how challenging it can be to get the UI right, juggle network data sources, and other headaches. Today we're making that easier with composable UI elements for SwiftUI and Jetpack Compose.
These packages build on top of our existing SDKs for Swift and Kotlin, and handle all the API communication for you. No boilerplate. With just a few lines of code, you'll have a UI that "just works." And once the user selects a result from the list, your code can decide what to do next. For example, you can autofill an address form or start turn-by-turn navigation.
Keeping it customizable
Composable UI frameworks like SwiftUI and Jetpack Compose
enable many customizations that are difficult or impossible with other approaches—
all while keeping things easy to use.
For example, if you want to customize the look and feel of the list,
just pass in your own View
or @Composable
, and we'll use that instead!
And of course, you can use any SwiftUI or Jetpack Compose modifiers
to change how the view is laid out in your app.
We also provide many customizations for you automatically. The view appearance automatically syncs with your material theme or dark mode preferences, so it fits in with the rest of your app. And we even localize the UI based on device settings, so users will see results in their language wherever possible.
Putting Results in Context—Privately
Location is critically important context if you want to provide relevant search results. For example, "London" might conjure up images of Big Ben for some, but maybe London, Ontario is a bit more relevant if you're in Toronto. That's why our APIs can optionally focus results around a location.
Our new packages support this too and, just like our APIs, location information is optional. And if you're in the EU and concerned about GDPR compliance, the new packages support our EU endpoints with a simple flag.
Learn More & Next Steps
- Check out our quickstart documentation for SwiftUI and Jetpack Compose.
- Find the source code on GitHub (SwiftUI and Jetpack Compose; give it a star!).
- Follow Stadia Maps on Mastodon, Twitter, or LinkedIn, or sign-up for our newsletter to hear about exciting developments first.