In your efforts to get from point A to point B using Google Maps, you'll occasionally want to find something—a gas station, a store, a place to stop and eat—somewhere along the route you're taking (or about to take).
You might think this involves a lot of hopping between navigation mode and the normal map mode, but Google Maps anticipates you're going to want to do this, and actually makes it pretty simple. You can search along a route whether you're already navigating to somewhere, or still in the planning phase.
Finding places in Google Maps before you set off
If you're planning in advance, it's best to do it in Google Maps on the web. Try searching for a location, then getting directions to it via whatever mode of transport you like. Select the route you prefer, and then click in the Search along the route box up at the top of the screen—this is where you can find spots along the selected route. Once you click in the box, you'll see some suggestions, like Hotels and Campsites, but you can pick anything you like.
Run the search, and you'll get a selection of options marked as red pins on the map. Extra information about each place (parking, opening times, and all the usual details) shows up on the left. If you don't see something you like straight away, try zooming into the map and clicking Search this area to see more options.
When you've found somewhere you like, select it on the map and choose Add stop. Google Maps adjusts the route and the route timings to include the new stop, and you can see this reflected on the map. You can continue to add more destinations if you need to (or click the X next to any stop to remove it).
In the Google Maps mobile app, you can get a route up on screen, then tap the three dots in the top-right corner and choose Search along route. You're then able to search for types of places and add them as stops as you can on the web—it's just a smaller screen. To make things less cumbersome, it's best to do the planning on the web, then click the Send directions to your phone link.
Adding a stop to Google Maps mid-navigation
When you're actually navigating somewhere in Google Maps on Android and iOS, you can add extra stops there, too. Of course, make sure you're keeping your eyes on the road at all times and not doing this while actively driving. It might be best to pull over or get a passenger to make the changes to the route for you.
The simplified navigation mode that appears when you're getting step-by-step directions has a magnifying glass button up in the top-right corner: Click on this and your options for searching along the route appear. Some options, including coffee shops, hotels, and rest stops, should appear as suggestions.
Tap any of the suggestions or run your own search (you can tap the mic button to search with your voice). A number of options will appear on the map as red pins—not along the whole route, which is what happens in Google Maps on the web, but close to your current location. The intention is to find somewhere close to where you are now.
Select any of the pins, choose Add stop, and the route will update—you'll also be told how many minutes the detour is going to add to your journey. If you'd rather make a stop somewhere further along in your journey, then wait until later to run the search—you can't search for places any great distance from where you are.
This works in Google Maps for Android Auto and Apple CarPlay too. On Android Auto, tap the magnifying glass on the info card (tap on the map if the card isn't showing); on CarPlay, tap the Add Stop option at the top of the screen (tap on the map if it's not showing). You can then run a search for a place, or choose a suggestion.