The Open-Source Navigation Standard for React Native & Expo
"Navigating the world with Open Data, powered by the community."
OSM Navigator is a high-performance, open-source mapping and navigation SDK for React Native. It offers a zero-cost, privacy-focused alternative to proprietary solutions like Google Maps and Mapbox by unbundling map rendering, routing, and geocoding.
- High-Performance Map Rendering: Powered by MapLibre Native for smooth, vector-based maps.
- Turn-by-Turn Routing: Integration with Valhalla REST API for fast and flexible navigation.
- Geocoding & Search: Built-in support for Photon (OpenStreetMap-based search).
- Open Data First: Native support for OpenFreeMap and Protomaps tile sources.
- Modern React Native: Built as an Expo Module leveraging the New Architecture (Fabric/TurboModules).
This project is managed as a monorepo using Yarn Workspaces:
| Package | Description |
|---|---|
@osm-navigator/core |
Core logic for routing (Valhalla), geocoding (Photon), and shared types. |
@osm-navigator/native-map |
Expo Module wrapping MapLibre Native for high-performance map rendering. |
@osm-navigator/ui-navigation |
Ready-to-use UI components for navigation (banners, turn icons, etc.). |
navigation-example |
A comprehensive demo app showcasing real-time navigation and search. |
- Yarn Classic (v1): Workspaces management.
- Expo SDK 51+: Development Builds are required for native modules.
- React Native 0.74+: Utilizing the New Architecture (Fabric).
- iOS: Swift 5.9+, iOS 13.4+
- Android: Kotlin 1.9+, SDK 24+
Clone the repository and install dependencies:
git clone https://github.com/Ominous-Josef/osm-navigator.git
cd osm-navigator
yarn installTo run the navigation example app:
# Start the development server
yarn workspace navigation-example start
# Run on iOS
yarn workspace navigation-example ios
# Run on Android
yarn workspace navigation-example androidNote
Since this project uses native modules, you must use Development Builds (npx expo run:ios or npx expo run:android) rather than Expo Go.
OSM Navigator follows a modular architecture:
- Core Engine: MapLibre Native handles the heavy lifting of map rendering using Metal (iOS) and Vulkan (Android).
- Service Layer: The
@osm-navigator/corepackage provides functional clients for Valhalla (Routing) and Photon (Geocoding). - UI Component Layer:
@osm-navigator/ui-navigationprovides a set of themeable components that react to the navigation state provided by the core logic.
The project is currently in active development. Current focus areas include:
- Initial MapLibre Native integration via Expo Module.
- Basic routing and geocoding clients.
- [/] Real-time Navigation Performance: Optimizing geometry lookups and simulation state.
- Native Permissions: Automating location permission requests via Expo Config Plugin.
- Offline Maps: Support for mbtiles and offline routing.
We welcome contributions! Please feel free to open issues or submit pull requests.
- Fork the repo.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
This project is licensed under the MIT License - see each package for specific details.
Disclaimer: This project is not affiliated with or endorsed by the OpenStreetMap Foundation.