As I mentioned in a previous post, I’m using Google My Maps as my primary tool for creating my map for Te Araroa, mapping estimated day stopping points, resupply points, etc. This tool has been invaluable for this purpose. It’s very easy to use, allows me to add custom icons to the points on the map to differentiate huts and resupply points and everything else, and, most importantly, it has the ability to export KML.
On the trail itself I’ll be using Galileo Offline Maps as my primary navigation tool. This app has the ability to download vector maps of all of New Zealand, import KML to display on the map, and allows for custom raster map tile sources. Sadly, but understandably, it won’t download the entire set of topo maps for the whole country in one shot, but what it does do is have a cache that can be used offline, so I just need to make sure I have the maps I need to get me to the next place I’ll have internet in my cache, and I’m set. This is easily done by simply looking at the map and sliding around, picking up the tiles I need and caching them in the process. I can then flip to airplane mode, verify I still have the tiles I need, and I’m set.
A problem I ran into is that while Galileo also supports customizing the icons or “Category” thats get displayed for a “Bookmark” (their name for what KML calls a Placemark), it doesn’t support the ones exported by Google Maps. Fortunately, it does support its own categories. As in, I can create some bookmarks, export the KML, import that same KML, and the categories are preserved. This means I should be able to convert the KML from Google Maps into something Galileo can use.
So I wrote a script which does just that. One of the things I noticed in my experimenting with the KML I’m importing into Galileo is that it actually doesn’t seem to care about any of the Style information in the file, it just looks at the styleUrl on the Placemark and uses that to determine which category to apply to the bookmark. This allowed me to quick-and-dirty modify each Placemark and import it into Galileo.
This allows me to turn this:
Right now this is super super hacky. It uses a static mapping of icons from Google Maps to Galileo (including colors), because I’d like to be able to convert back to Google Maps from Galileo, so I came up with a mapping from Galileo’s icons to a subset of Google Maps icons. It’s not perfect, but it works.
It also only touches the styleUrl contents on each Placemark. This means the file is actually completely broken for any other purpose than using it with Galileo. I’d like to change that so it converts it to something closer to what Galileo itself exports.
This is a huge step, though. It means I can now, with minimal fuss, export my Google Map to my phone and use it offline. Something that is going to be incredibly valuable to me on the trail!