Introducing expo-maps: A modern maps API for Expo developers

Product6 minutes read

Alan Hughes

Alan Hughes

Engineering

Expo Maps is a new maps library for React Native built on SwiftUI and Jetpack Compose. Native feel, minimal setup, and maintained by the Expo team.

Introducing expo-maps: A modern maps API for Expo developers

Maps have been a fundamental feature of our mobile devices since iOS 3 and the earliest versions of Android. Users have well-established expectations of how the map should work and feel. Similar to the camera, they will know instantly when something feels “off”.

For react native, react-native-maps has long been the go-to solution when map functionality was required. This has served us well for a long time. As time has gone on, maintenance of react-native-maps has changed hands. Moving from Airbnb's stewardship to a community-maintained project. It is a huge task to maintain such a large and important library, even more so when it is done by volunteers who largely do this in their spare time. These maintainers should be commended, but it is also risky for us as an ecosystem to be so reliant on a single solution for such an important feature.

At Expo, we believe now is the right time to introduce another option. We have been working on our SwiftUI and Jetpack Compose integrations and testing them thoroughly with another experimental library: expo-ui. With the release of native SwiftUI and Compose support for maps, we think now is a great time to start building on top of these technologies, so we can evolve with them. With SDK 53, we are releasing our alpha version of expo-maps.

Expo Maps Deep Dive!

Expo Maps

Powered by the Expo Modules API, SwiftUI, and Jetpack Compose, expo-maps provides you with access to the most common map features. Markers, annotations, smooth scrolling and zooming, compass, scale bar, 3d effect, street view, everything users have come to expect. Rendering a map on screen is as easy as:

Code
<AppleMaps.View
style={{ width: 'auto', height: '100%' }}
cameraPosition={{
coordinates: {
latitude: 51.509865,
longitude: -0.1275,
},
zoom: 1,
}}
/>
<GoogleMaps.View
style={{ width: 'auto', height: '100%' }}
cameraPosition={{
coordinates: {
latitude: 51.509865,
longitude: -0.1275,
},
zoom: 1,
}}
/>
  • Built on SwiftUI and Jetpack Compose, using all the latest features available
  • Uses platform defaults, Apple Maps for iOS, Google Maps for android
  • Minimal setup
    • On iOS, it works out of the box
    • On Android, an API key is all that is required

Expo’s Philosophy

With expo-maps, we have taken the same practical approach that we have to our other recent rewrites, such as expo-video, expo-camera and expo-audio. Focusing primarily on developer experience and handling the most common use-cases people would expect from a maps library.

We do not claim expo-maps will fulfill every need. There will always be advanced and niche features that a small percentage of users will want or need. This is not the goal of expo-maps, and if these features are required, users are better served by other libraries in the ecosystem. We aim to provide developers with what the platform provides, in a way that they can rely on. That means that if a feature cannot be well supported without compromises in quality, then it won’t be added.

Platform Availability

The library uses the very latest that both platforms have to offer, but comes with some tradeoffs in availability.

On iOS, the minimum supported OS version is iOS 17. While this might sound very recent, iOS 19 is not far away, and adoption on iOS is generally very high, we would expect usage of iOS 16 and below to fall sharply in the next few months. Currently, as a share of all iOS devices, iOS 16’s usage stands at 4.1% with iOS 18 making up the lions share at 85%. We understand that this may still be disappointing for some, but this decision was made in the interest of building the best library possible.

For Android, any device that will run your app will be able to use expo-maps.

What you can do with expo-maps

expo-maps is designed to cover the essential features developers and users expect from a native, map experience:

  • Display maps with native feel and performance: Instantly load high-quality maps powered by Apple Maps on iOS and Google Maps on Android, with native gestures like panning, zooming, and rotating.
  • Set camera position and control the viewport: Easily configure where the map starts and how it behaves, including setting initial coordinates and zoom levels.
  • Drop markers and points of interest: Add markers to highlight important locations, like store locations and pins for user content.
  • Handle user interactions: Detect taps on markers, allowing you to build experiences like showing location details or selecting destinations.
  • Show compass, scale bar, and 3D buildings: Provide intuitive navigation aids and richer map visuals, matching the experience users expect from modern apps.
  • Enable Street View on Android and iOS’s equivalent Look Around.
  • Overlay polylines to enable route guidance features.
  • Add markers that use your own custom image to provide a more unique experience in your app.

Try It Today (Alpha!)

As of the SDK 53 release, expo-maps is officially in alpha and available to try npx expo install expo-maps. We would appreciate any and all feedback and all contributions are welcome. Find us on Discord, we are happy to hear your experiences, good or bad. You can help shape the future of the library while it’s in it’s early stages. This is something we intend to continue with for a very long time so please, if possible, give it a try!

Limitations to be aware of

  • [iOS] iOS 17 is required
  • React components as custom markers and annotations are not currently supported.

What’s next for Expo Maps?

We will continue to push the library forward as Apple and Google provide more functionality. At the moment, it is early days for both the native offerings. In the fullness of time, we hope to have a very feature rich library that can support the vast majority of use-cases any React Native app could need, and you can be assured that it will remain maintained by the Expo SDK team for the long term.

React Native
expo-maps
SwiftUI
Jetpack Compose
SDK 53

Dive in, and create your first Expo project

Learn more