
Generate a Google Maps API key to access Maps, Places, and Directions in React Native apps, set up the billing with the free $200 monthly, and save the key.
Install google maps for android and ios, use the google places API and google directions API to display results on the map, and handle user input for destination suggestions.
Install react native cli to use the native maps component directly, bypassing the expo wrapper, and follow native docs to install Google Maps API for iOS and Android.
Initialize a React Native maps project with a proven working version, configure and install native maps, and ensure compatibility for Google Maps API on iOS and Android.
Open the maps project and perform a quick sanity check by running the React Native app on an Android emulator to ensure the build succeeds before adding native maps.
Explore the react-native-maps documentation and learn installation steps for android, including editing five files and linking native libraries, with guidance from the MEPS GitHub repository.
Install the react-native-maps package using yarn to fetch the native maps library. Prefer yarn over npm for faster installs and better results with this package.
Initialize a git repository, stage the added package, and commit; then run react-native link to connect native maps for iOS and Android, undoing Android changes and keeping iOS changes.
Learn how to handle four file changes from linking for Google Maps API in a React Native app, detailing iOS and Android updates and manual steps when auto-linking fails.
Run the app on Android, verify the build succeeds after linking the Google Maps API in React Native, and test that the map loads and the app runs without crashes.
Create a maps test component by copying the installation example and importing React and View from React Native, then add the Google API key to the Android manifest and rebuild.
Ensure your android emulator uses a Google APIs x86_64 image, not a plain x86 image, by configuring the SDK manager and creating a new emulator with Google APIs.
Resolve android build failures by performing a manual installation, following the native maps documentation. Scroll to the android build configuration and follow the steps step by step.
Undo changes from the React Native link command by reverting settings cradle, build cradle, and main application; then review Android manifest containing the API key and test maps setup.
Set up Android in a React Native app by updating Gradle files with Google Play Services and Maps versions, adding the API key to the manifest, and registering MapsPackage.
Comment out the Google Maps provider in the maps test component, use Apple Maps as the provider, and run the app again on iOS and Android to resolve the error.
Assess performance challenges of the MEPs on the iPhone x simulator and consider switching to the iPhone 6 for better performance, noting some users report good results on the emulator.
Configure Android and iOS simulators, remove device bezels, and use the iPhone 6 emulator for performance. Remove the Google map element, apply flex:1, and render a full-screen map.
Learn to obtain the user's location in a React Native app using the Google Maps API, following the react maps install, and set a destination from the user's location.
Enable user location in map view by setting show user location and follow user location, observe the blue dot in iOS simulator, and add location permission in the Android manifest.
Request android location permissions with the PermissionsAndroid module, check for ACCESS_FINE_LOCATION, and render the map only after permission is granted. Include manifest updates and emulator testing for troubleshooting.
Learn to obtain the user's latitude and longitude in a React Native app using watchPosition, update location state, and adjust the map region for Google Maps API queries.
Learn how to use the Google Maps Places Autocomplete API with Postman to query places using the input and API key, and refine predictions with radius and location parameters.
Create a places input component in a new components folder, connect it to the Google autocomplete API, and integrate destination suggestions into the app for iOS and Android.
Style the PlaceInput component in a react native map ui by adjusting top margin 50, removing absolute fills, and configuring white 40px tall text input with a where to placeholder.
Call the Google Places Autocomplete API from a React Native component, fetch predictions as the user types, and display each result with main and secondary text.
Practice building a React Native UI that fetches Google Places predictions from user input, manages state for input and predictions, binds handlers, and renders results in a wrapped view.
Display predictions based on input in a React Native Google Maps API integration, fetch places, and show unique suggestions using prediction IDs as keys for iOS and Android.
Refactor the React Native Google Maps UI by consolidating styles, restructuring the prediction object with structured formatting, and adding a one-second debounce to API calls, while disabling auto-correct and auto-capitalization.
Wrap the input area in a touchable without feedback and call keyboard.dismiss on press to hide the keyboard. Implement debouncing to avoid calling the Google Maps API on every keystroke.
Limit Google Places API calls in a React Native app by debouncing user input with lodash, pausing for one second after typing before calling the get places function.
Enable tapping predictions by wrapping them in touchable components, update the destination input with the selected text, clear predictions, and dismiss the keyboard to hide the list.
Lift the user location to a parent component and pass latitude and longitude to both the map screen and place input using the Google Places API.
Lift location state from the map screen to a parent component, obtain user position with permission, and pass latitude and longitude to child components via props.
Use device location to power places autocomplete in a React Native app for iOS and Android by feeding latitude and longitude into the Google Places API, replacing hardcoded values.
Use the Google Maps Directions API to get directions to a specific destination, and check the repository branches for code tips if you get stuck.
Learn to call the Google directions API from Postman, parse JSON response, and convert the polyline to a latitude-longitude path for rendering origins to destinations in a React Native map.
Tap a suggestion to pass the place id to the app, then show directions on the map using the Google Directions API in a React Native iOS and Android project.
Learn to call the Google Maps directions API in React Native using async requests, user location, place ID, and an API key; convert the polyline to a lat lon array.
Decode an encoded Google directions polyline into a latitude-longitude array. Then feed it to the polyline coordinates property to render a route on React Native maps.
Learn to convert a polyline from an array of [lat, lng] pairs into objects with latitude and longitude, map them, and render the polyline in a React Native Maps view.
Use Google Maps API in React Native to render a polyline from destination coordinates, conditionally display it as a child component, and auto-zoom on destination selection.
Fit the map view to a route using the fit to coordinates method with latitude and longitude arrays, and learn to forward refs to access map methods in React Native.
Learn how to refactor your map screen by forwarding refs to a child component, integrating map view and poly line from react-native-maps, and simplifying components without overusing refs.
Call fitToCoordinates on the map ref to zoom out and fit a polyline across chosen coordinates, then test on iOS and Android and apply the padding fix.
Add edgePadding to the coordinates function with a padding object for top, bottom, left, and right; compare spacing on iOS and Android and consider platform-specific padding using platform OS.
Import marker, add a marker to the map in React Native with a title, description, and optional image, and render it only when destination coordinates exist, alongside the polyline.
In this course you will learn:
How to build a Maps app for both iOS and Android
How to install react-native-maps, and pitfalls you can avoid when doing so!
How to ask for permission to get users location
How to show the user location
How to follow the user location on the map
How to use Google Maps API's easily
How to use Google Places Autocomplete API, to autocomplete as the user types
How to use Google Directions API, to get directions from the user location to a location
How to display this route inside our React Native app
How to zoom out map to display our route
I'm will show the quickest and easiest path to get a map app up and running for both iOS and Android, saving you lots of time that I've used when I couldn't find help, or had to fumble around various bugs!