Skip to content

[ios][maps] Adds user interface style option for Apple Maps#42199

Merged
intergalacticspacehighway merged 2 commits intoexpo:mainfrom
huextrat:expo-maps/userInterfaceStyle
Jan 27, 2026
Merged

[ios][maps] Adds user interface style option for Apple Maps#42199
intergalacticspacehighway merged 2 commits intoexpo:mainfrom
huextrat:expo-maps/userInterfaceStyle

Conversation

@huextrat
Copy link
Copy Markdown
Contributor

@huextrat huextrat commented Jan 15, 2026

Why

This PR adds the ability to control the Apple Maps appearance (light/dark mode) independently from the app's color scheme.

Currently, the map follows the system/app appearance automatically. However, there are use cases where developers want to force a specific appearance for the map regardless of the app's theme - for example, displaying a light map in a dark-themed app for better visibility, or vice versa.

This addresses a common request for more granular control over map styling.

How

Added a new colorScheme prop to AppleMaps.View with three options:

  • AUTOMATIC (default) - Map follows the system's color scheme
  • LIGHT - Map is always displayed in light mode
  • DARK - Map is always displayed in dark mode

Test Plan

  1. Add userInterfaceStyle prop to an AppleMaps.View:
import { AppleMaps } from 'expo-maps';

<AppleMaps.View
  style={{ flex: 1 }}
  colorScheme={AppleMaps.MapColorScheme.DARK}
  cameraPosition={{
    coordinates: { latitude: 37.7749, longitude: -122.4194 },
    zoom: 12,
  }}
/>
  1. Test each value:

    • AUTOMATIC - Map should follow app appearance
    • LIGHT - Map should always be light, even when app/system is in dark mode
    • DARK - Map should always be dark, even when app/system is in light mode
  2. Verify that the rest of the app's UI is not affected by the map's colorScheme setting.

Checklist

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2026

Subscribed to pull request

File Patterns Mentions
docs/** @amandeepmittal
packages/expo-maps/** @jakex7, @alanjhughes

Generated by CodeMention

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Jan 15, 2026
Copy link
Copy Markdown
Member

@amandeepmittal amandeepmittal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc changes look good! Thank you!
Let's wait for the technical review.

@huextrat huextrat force-pushed the expo-maps/userInterfaceStyle branch from 9ccdbc4 to bf2f254 Compare January 16, 2026 15:07
@huextrat huextrat force-pushed the expo-maps/userInterfaceStyle branch from bf2f254 to bb3e747 Compare January 27, 2026 08:37
@huextrat
Copy link
Copy Markdown
Contributor Author

I don't know who exactly is in charge of expo-maps @intergalacticspacehighway or @jakex7 but this PR is waiting for a review

@intergalacticspacehighway
Copy link
Copy Markdown
Contributor

@huextrat Thanks for the PR! can you try using .environment(\.colorScheme, .dark) modifier? It seems to be working. We can add colorScheme prop if it works as expected.

Screenshot 2026-01-27 at 4 46 12 PM

@huextrat
Copy link
Copy Markdown
Contributor Author

@huextrat Thanks for the PR! can you try using .environment(\.colorScheme, .dark) modifier? It seems to be working. We can add colorScheme prop if it works as expected.

Screenshot 2026-01-27 at 4 46 12 PM

@intergalacticspacehighway thanks for the feedback and yep it's much simpler! It didn't work when I first tested it, but after testing it again with SDK 55, everything seems to be working. PR is up to date 👍

Copy link
Copy Markdown
Contributor

@intergalacticspacehighway intergalacticspacehighway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. LGTM!

@intergalacticspacehighway intergalacticspacehighway merged commit 2cb46a7 into expo:main Jan 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: passed checks ExpoBot has nothing to complain about

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants