How to open Google Maps in turn-by-turn navigation mode from a PWA (Android)
The next attempt was the standard Maps URL:
window.open(`https://maps.google.com/maps?daddr=${lat},${lng}`, '_blank');
This opens Maps, but in the browser — not the app. And it shows the route preview, not turn-by-turn navigation.
What worked: Android Intent URLs
Android supports a special URL scheme that tells Chrome to launch a native app directly:
window.location.href = `intent://navigation/now?ll=${lat},${lng}&title=Next+stop#Intent;scheme=google.navigation;package=com.google.android.apps.maps;end`;
Breaking it down:
intent://— tells Chrome this is an Android intentnavigation/now?ll=${lat},${lng}— opens Maps in navigation mode, starting immediately#Intent;scheme=google.navigation— the URI scheme to usepackage=com.google.android.apps.maps— the target app packageend— closes the intent syntax
This opens the Google Maps app directly and starts turn-by-turn navigation automatically — no extra taps needed. It also works with Android Auto.
The full function
export function openNavigation(destination: { lat: number; lng: number }): void {
window.location.href = `intent://navigation/now?ll=${destination.lat},${destination.lng}&title=Next+stop#Intent;scheme=google.navigation;package=com.google.android.apps.maps;end`;
}
Call it on any user gesture (tap, click) and it works without being blocked by the browser.
The app
The full PWA is open source if you want to see the context:
- 🔗 GitHub repo
- 🌐 Live app
Built with React + TypeScript + Vite + Dexie.js + @vis.gl/react-google-maps.
If you're building a PWA that needs to hand off to Google Maps navigation on Android, this intent URL is the cleanest solution I found. Hope it saves you the hour I spent figuring it out.
Discussion in the ATmosphere