Showing posts with label Google My Maps. Show all posts
Showing posts with label Google My Maps. Show all posts

Friday, 20 April 2018

Android: Navigating a meticulously constructed custom route?

Given the number of hiccups we encountered with Garmin GPS on the last trip, this time around we've decided to forgo the rental expense of GPS units and use our mobile phones instead. Between us, we've got a diverse selection of Samsung Galaxy (Android) phones so the interesting question for us is: "How do we transfer the routes that we have agonised over for nights on end to our phones so that we can navigate them (turn-by-turn) on the bikes? Is there a method to take routes from Google MyMaps and navigate them on the Samsung Galaxy?

Unfortunately, application support for turn-by-turn routes is still very thin on the ground where smart-phones is concerned. I have managed to find a way to do this, but it took a few weeks research and testing to find a process and target application to meet our needs.

Google MyMaps

The tool we use to plan our Japan trips is Google MyMaps. We tend to plan a set of daily routes over months; typically with a lot of back-and-forth on the start/end points, the must-see sights to along the way, various notable roads that must be ridden and so on. Google MyMaps provides the perfect tool for such collaboration. Waypoints can be entered and the route between them dragged and tweaked until the perfect set of roads is selected. The results are stored in the cloud, and the maturing routes can be accessed and modified by all participants right up until you step on to the plane.

Google 'My Maps' is perfect for route planning!
MyMaps does have large limitations however. Most notably, it's not a navigation application. It can't provide turn-by-turn navigation, nor does it even know about your current (GPS) location. For this you need a navigation application. Even during map development this limitation means that MyMaps can't even tell you how long a chosen route will take you to ride. It can give you the distance in kilometres (sort of) but not the all important time measurement. For this statistic, Google Maps must be used - tracing out the roads that you've selected in your route yet again and checking the time taken. Yes - it's as annoying as it sounds. If the Google dev team could just get off their fat arses, stay away from those Mountain View office perks for just a few hours each day, maybe they could get their two mapping applications better integrated. We would all be kissing their arses big time! Are you listening Google?

Ok, so how then do you actually navigate a route created in MyMaps when you're on the bike? Well on the Garmin Zumo for example it's possible to load the route into the device as a KML file. The Garmin struggles to stay on route though (hence our issues last trip) with the slightest deviation causing the device to recalculate out the wazoo. Goodbye perfect set of mountain roads.

Now that we've done-away with the Garmin, what are the options on the smart-phone?

Google Maps?

There are several navigation options available for Android devices, but by far the most polished and most obvious choice is Google Maps. Or so you would think.  Google Maps provides a beautifully rendered display and easily digestible turn-by-turn navigation. The trouble with Google Maps, however, is that it is completely incapable of following a route created externally. The worst part of this is that you can actually load and display in a route created in MyMaps, but Google Maps won't use it to navigate. It just displays it for reference only.

Google Maps can kinda be used in a pinch. If you have your specific waypoints defined, you can use it to navigate to each waypoint individually.  Unfortunately:
  • you need to start navigating again after each waypoint is reached
  • Google chooses what it believes to be the most efficient route to each waypoint.
This is problematic for us because we have very specific routing requirements - those skyliners and notable mountain roads are not to be missed!

So what other options are out there?

OsmAnd

After trying nearly every navigation app available for Android and getting increasingly desperate, I happened upon quite a good process for route navigation using the application OsmAnd. Phew! Finally I'd found a way to get a route from MyMaps into a turn-by-turn navigation app that actually:
  • provides turn-by-turn directions from your current location to the start of the route
  • actually follows the route you've specified
  • let's you know when you've left the specified route
  • tries to navigate you back onto the route if you leave it, and
  • most importantly, if you re-enter the route at a position other than were you left it, the turn-by-turn navigation adjusts and continues from where you re-joined the route.
Add to this the fact that maps for Japan can be downloaded for free and used offline, and you've got a pretty perfect navigation tool for our needs. Of course the real-time display that as flash as the one Google Maps provides - especially Google Maps in Android Auto mode - but it's usable all the same.

Routes from Google MyMaps to OsmAnd

Getting a route created in Google MyMaps into OsmAnd ready for navigation is a little involved but, in the end, is very straightforward process. I guarantee you'll think the investment in time was worth the effort. The process is laid out below:

Step 1 : Generate a KML file in MyMaps
  1. Open your map in Google MyMaps.
  2. Click on the "three dots" in order to see the list of options.
  3. Click Export in KML.
  4. Keep the first check box unticked (it's only useful for online work).
  5. Tick the second one ticked to generate a KML file.
Step 2 : Convert your KML file to GPX
  1. Visit https://mygeodata.cloud/converter/kmz-to-gpx


  2. Drop your KML file onto the left panel and click Continue.
  3. In frame 1, you'll see all your layers from your map (e.g. one layer for your Points of Interest, one layer for the route, etc.). You can keep frame 1 unchanged if you want to convert the entire content of your map or you can remove the layer you don't want. Personally I just select the route I want to ride.
  4. In frame 2, select GPX format.
  5. In frame 3, click "Convert Now".
  6. Click on download and save the GPX file.
Step 3 : Import the GPX into OSMAnd
  1. On your computer, email the GPX file containing your route to the mail account on your phone/device
  2. On the phone/device, receive the email and download the GPX attachment.
  3. On your phone/device, click on the downloaded GPX attachment and select to open with the OsmAnd application.
  4. OsmAnd will display the route and allow you to use it for turn-by-tun navigation.



And that's all the news that's fit to print. I'm going to be doing a few test rides to get used to using the OsmAnd turn-by-turn instructions and so on, but I'm pretty sure it's going to be a useful resource on the road in Japan.

Monday, 19 October 2015

From Google My Maps to the Garmin Zumo 660

It's taken a week or so, but I've finally gotten a handle on how to plan our routes for Japan using Google Maps (My Maps) and then exporting them to the Garmin Zumo 660 for use on the road. Interested? Let me lay the process out for you.

A pre-requisite to the process is that you must have a valid map for your ride area installed on your Garmin GPS. If you are in Australia and are looking for a Japan map, then look no further than the Open Street Map (OSM) Project. The map of the ride area is required on the Garmin device so that the Garmin Basecamp application can use it for route calculations. Yep, you guessed it, a second pre-requisite is to get Garmin Basecamp installed on your PC or Mac!

With these two pre-requisites in place, the process of My Maps -> Garmin is relatively straightforward. Firstly, create a route in My Maps following these simple steps:

  1. Create a New Map in Google My Maps
  2. Enter your start and finish points as "destinations" in the map.
  3. For other roads that you really want to ride (eg. for us it is certain Skyline Highways in Japan) or any sites you want to visit, make sure you add a destination at the start and end of the road segment (or a destination at the site) and insert it into the destination list in the correct order for the intended route.
  4. Drag the resulting route around the available roads until it follows the path you want to follow.
What you will have created in My Maps is a route that conforms to the exact roads that you want to ride on the day, but also has certain locations "locked in" as waypoints. These waypoints are the anchors for your day's ride.

Exporting to KML in Google My Maps
Now the process of getting the route onto the Garmin is pretty easy. Firstly, plug your GPS into your workstation and then run Basecamp.
  1. Wait for Basecamp to download any maps from the GPS that it discovers
  2. Go to My Maps, click on the elipsis '...' next to your list of destinations and select 'Export as KML" (see above).
  3. When prompted, select to export just the directions, and to export as KML not KMZ.
  4. Your browser will download and save the KML file to your harddrive.
  5. Find the file in File Explorer and double click it to load it into Basecamp.
  6. Find the KML file you just imported in the "My Collection" section on the left-hand-side of the Basecamp screen. 
  7. Right click the directions entry shown in the Bottom left-hand view and select "Create Route from Track (see below).
  8. Your new route will be created and can now be sent down to the GPS or SD Card.
Converting the directions in the KM file into a route.
Note that this last step - converting the track into a route - can only be correctly achieved if you have the GPS plugged in and an appropriate map available! 

What I love about this process is that you and your travelling buddies can collaborate as much as you like on your route through My Maos and Google Drive. When you are happy with it, one of you can export it to your GPS.

When you finally get out on the road, the Garmin GPS will start your journey following the route that you  set down. But the best thing is that if you get off-track (due to a missed turn or whatever) the Garmin will re-calculate the route to the next waypoint. It will make sure that it routes you through all the selected waypoints (checking them off as you go) no matter how far away from the original route fate takes you. It remains faithful to the initial route you laid down, but is smart enough to change plans if there is an issue.