-
Mastering Google Maps
This is a basic tutorial for using Google Maps on your computer and transferring a route to your smartphone. Doesn't matter if you have a Mac, PC or Linux, and this works with just about every phone running Google Maps, with the exception of the iPhone. Also works with ditu.google.com AFAIK.
Concept: Spend hours plotting an awesome route on your Mac/PC, jump on your moto, follow that exact route with your phone as a GPS.
Problem: Google Maps has a tendency to take you on the shortest route, missing all those great twisty roads.
Skills: You don't need to be a computer genius, but you do need a basic understanding of files and things like copy and paste.
Tools: A browser (Safari, Firefox etc.), a plain text editor (Notepad, TextEdit, Pico etc.), a way to upload a file to the internet (FTP, SFTP, WebDAV etc.), and a smartphone running Google Maps. You will also be able to use the output file in programs like OruxMaps. A simple online converter can also convert these files to the GPX format for use on GPS units like Garmin etc.
Let's begin...
#1 Open you browser and go to Google Maps
http://www.contactdi.com/Processed/goog1.jpg
#2 Figure out where you want to go and right mouse click on a start point. Select "Directions from here"
http://www.contactdi.com/Processed/goog2.jpg
#3 Navigate to where you want to end the trip for the day and right mouse click on an end point. Select "Directions to here".
http://www.contactdi.com/Processed/goog3.jpg
#4 On the left hand side of the window, click the "Show options" link.
http://www.contactdi.com/Processed/goog4.jpg
#5 Select the "Avoid highways" box (as motorcycles are not allowed on those roads in most places) and then click get directions.
http://www.contactdi.com/Processed/goog5.jpg
#6 You now have a boring route between point A and B.
http://www.contactdi.com/Processed/goog6.jpg
#7 Use your mouse to "grab" your route by clicking on it and dragging the route to the road you actually want to take.
http://www.contactdi.com/Processed/goog7.jpg
#8 You can do this multiple times to create a complicated route adding lots of twisty roads. In this example, I made four custom points on the route. If you make a mistake, just right click on the little circle and select "Remove this point".
http://www.contactdi.com/Processed/goog8.jpg
#9 Now you need to get this route out of Google Maps. (Sure, you could just save it to "My Maps" if you have a google account, but the following gives you a bit more power and flexibility.) In the right hand corner click on "Link" and you will get a choice of links. "Copy" the top line of text.
http://www.contactdi.com/Processed/goog9.jpg
#10 Open a new browser window or a new tab in your browser and "Paste" the text into the URL box at the top. Don't hit enter yet... go to the end of the line you just "Pasted" and type "&output=kml". Now hit enter ( or return) and a kml file will download to your computer. It will probably be named something like maps.kml.
http://www.contactdi.com/Processed/goog10.jpg
#11 Let's open that "maps.kml" file in our text editor and have a peek. :eekers: Lots of scary looking text. Don't worry, we're only going to use the coordinates, the part I have highlighted in orange. Go ahead and look for the <coordinates> statement and "Copy" it and everything else until you get to the </coordinates> statement. If you mapped a big route, you will have a lot of text to select. Just "Copy" all that info.
http://www.contactdi.com/Processed/goog11.jpg
#12 Now we need to make a new kml file with a header and footer that Google/Orux Maps will understand. Don't worry, I've already made one for you and you can download it here. This is the basic data needed to draw route lines on the map. You only have to worry about "Pasting" your data over the orange part I have highlighted.
http://www.contactdi.com/Processed/goog12.jpg
#13 After adding your coordinates to the the text file, you need to scan the file for "breaks" that google maps will sometimes insert on long routes. I recommend you remove these lines, as they sometimes cause problems and you will only see part of the route you created. Just scan the file and remove each occurrence you find, being sure you leave a space so it all looks uniform.
http://www.contactdi.com/Processed/goog13.jpg
#14 OK, the hard part is done, you can now save the file to your desktop, documents folder, or wherever makes you happy. Make sure you name the file "XXX.kml" and not "XXX.txt". You can put whatever you want for XXX, but I usually use something very short, like "107.kml", it's easier to remember short file names.
Now this is where many of you have a problem. You can't open this file in Google Maps without it being stored online. That means you need access to a web server that will host the file for you. I don't know how you can get that for free, maybe someone can chime in with some suggestions. I don't mean something like rapidshare or mega-upload, you need a plain jane folder being served by a normal web server. I will be happy to post a file or two for people here, but it's not a service I can reliably offer to everyone. You can shoot me a PM and I will give you my email to send the file if you want to try it.
Once you have the file stored online, you just go to the search box in Google Maps and enter the location of your file. You can do this on your computer or on your phone. You can also send that link to a friend and they can do the same. The file will be public and can be seen by everyone, so you might want to start your routes a few blocks from home if you're paranoid about that kind of stuff.
Here's a route example...
http://www.contactdi.com/Processed/goog14.jpg
If you want to get all fancy, you can edit the XXX and YY part of the text file to add the distance and time. You can also change the route color and transparency. I made it pink because I'm secure with my manhood and can use such colors, you may feel more comfortable with blue or purple.
Just remember, everything you are seeing is just an XML text statement being translated by the Google Maps program. The more you play with it, the more customized you can get. The basic route is simple, maybe later on I will go into things like correcting offsets and overlaying map layers for those that really want to go nuts.
Fire away with questions and suggestions.
Cheers!
ChinaV
-
Re: Mastering Google Maps
Awesome tutorial, ChinaV. How the f*&K did you figure all that out? Don't you have a fulltime job? Do you ever sleep? Anyway, this MCM denizen deeply admires your geotechnical prowess. Wow.
I have two questions:
1) I'll take your word that none of this works in the iPhone. But is that perhaps in the works? Is there something in the jailbreak/Cydia universe that would be able to accept a .kml map of this sort? Or is this just an unfortunate outcome of the Google-Apple rivalry in mobile world, with no likelihood of a solution?
2) Is it possible to download that google map into my Garmin Zumo 660?
Again, beautiful tutorial, for which many thanks!
cheers
-
Re: Mastering Google Maps
I made it a sticky thread as ChinaV was too modest. Thanks mate.
It is valuable and relevant, and usable for a lot of people, so add your various questions and comments and solutions about anything Google maps and related GPS issues for now, with the proviso that we will split off other related Q and A if they become cumbersome, ie if we get lots on Garmin, then we will have a Garmin thread. etc. Those decisions will be ChinaV's as it is his expertise and hard work!
-
Re: Mastering Google Maps
Quote:
Originally Posted by
euphonius
1) I'll take your word that none of this works in the iPhone. But is that perhaps in the works? Is there something in the jailbreak/Cydia universe that would be able to accept a .kml map of this sort? Or is this just an unfortunate outcome of the Google-Apple rivalry in mobile world, with no likelihood of a solution?
I'm not sure if this kind of thing is an Apple or Google issue. When I had my iPhones, I just couldn't get this to work, and it's the main reason I never considered another iPhone. Google Maps on Android and WinMobile have no offset issues and can easily open these custom KML files, I hear lots of conflicting reports about maps on iPhone having, or not having, the offset.
Also have heard a bit about using the "My Maps" account with google to open custom maps on iPhone, but since I don't have one anymore, I can't try it. You can easily create a google account for free and load the example kml I posted at ...http://www.contactdi.com/map/107.kml... then save it to your "My Maps" account and then try to log into your "MyMaps" account on your iPhone. If it works, that would be great. I usually hit Hong Kong at least once per month and whenever I get my paws on an iPhone or iPad, the first thing I try is to open the kml via the search bar in maps... it never works.
Quote:
Originally Posted by
euphonius
2) Is it possible to download that google map into my Garmin Zumo 660?
Some Garmin GPS units support KML files and some have browser plugins that are supposed to allow uploading a route. I only have Garmin Mobile XT for pocket PC, and there isn't any way of loading a route, but you can load a single waypoint directly from your browser using Garmins crappy plug in for Safari.
One thing you can do with any Garmin unit:
Take the kml file you have and go to http://www.gpsvisualizer.com/ There's a built in converter that will change your file from KML to GPX. Once it's in the GPX format, you can load it into your Garmin GPS. Some Garmin units allow you to just put the file on your SD card, others require Basecamp or Mapsource to upload the GPX track.
Cheers!
ChinaV
-
Re: Mastering Google Maps
Absolutely awesome ChinaV !! Thanks a lot for taking the time to post all this with screenshots and all !
One of my geek friend is also thanking you, as I was on his back all the time asking him how to do this exact thing, and also to force him to sell me his "old" HTC, teasing him with the newest one... Now I only have to insist on the HTC part. ;-))
-
Re: Mastering Google Maps
Thanks, V, I just learn a new trick downloading a google map route into a kml file and making it ready for usage.
About the question from the other thread, I was curious that anyone has been aware Google Maps mobile can overlay Mymaps' route, so that one at least can see the route at his phone as he goes.
Mymaps has some advantage than the exporting kml way describe at this tutorial. After a planed route saved to Mymaps, modify the waypoints, route still snap to roads. You get similar flexibility in Mymaps as in Google Maps. At my test import the kml back to Mymaps does not. But V's way solve one problem that Mymaps cannot save route with options, either "avoid toll" or "avoid highway". Google should make that work, but not now. Another is Mymaps is simple, one don't have to be a GPS geek like V:icon10:.
Google Navigation can't load Mymaps route, it would be one key selling point for me, maybe that's why the app still in beta.
Quote:
...Once it's in the GPX format, you can load it into your Garmin GPS.
I haven't touched pro Gps device like Garmin, did you mean Garmin can voice navigate thought pre-load GPX route?
-
Re: Mastering Google Maps
Quote:
Originally Posted by
td_ref
did you mean Garmin can voice navigate thought pre-load GPX route?
No, it can't do that. The uploaded GPX will show up as a track instead of a route, so you still need to manually plot your route if you want turn by turn voice navigation. The GPX track import is mostly used for roads that don't show up on the Garmin maps or to help you plot your route.
TD, you are correct about some of the editing advantages of using "MyMaps". One thing I have not tried comparing is what happens if you are following a route with a MyMap layer and you lose internet connection? With the KML file loaded in the above example, you lose the map background, but you can still see the pink line and your position. I know the offline support of Google Maps is getting better, so that will probably not be an issue soon, and I'm sure MyMaps will get all the features necessary to avoid this kind of complicated mess sometime in the future.
One other nice thing with the KML file is sharing. If your friend calls while on the road, and asks for a twisty route, you can tell them to load the KML file and they can follow along. It's a bit complicated to share your MyMaps route with a friend via smartphone.
Cheers!
ChinaV
-
Re: Mastering Google Maps
First of all, thanks for the excellent write up :thumbsup:, particularly from 8 onwards.
Quote:
Originally Posted by
ChinaV
TD, you are correct about some of the editing advantages of using "MyMaps". One thing I have not tried comparing is what happens if you are following a route with a MyMap layer and you lose internet connection?
Yes, the line from MyMaps and your position will still show, even when the Internet connection is lost.
I am not sure but it seems that as soon you load a map from MyMaps, caching concentrates on the area the map covers - again, not sure but it seems to be.
Some remarks from my experience with Google Maps.
The map link is different in Chrome (at least in XP Pro), and doesn't work with the "&output=kml"
http://www.mychinamoto.com/forums/as...1&d=1298255436
I usually don't select the start and the end and drag the points, but choose the end pretty near the start and then add one by one destination (right click - add destination). I find it a bit easier to force where I actually want to go and it doesn't re-calculate the whole route when you only drag the last destination you've added, but that's just a matter of taste.
The good thing on MyMaps is that you can save the maps, share and collaborate with others and create day by day routes for longer trips. The good thing is that the method described by ChinaV from 8. onward still works.
According to my experience the filename and pathname for the kml shouldn't contain special characters as it won't open.
Again, thanks for starting this :clap:
-
Re: Mastering Google Maps
Quote:
Originally Posted by
ChinaV
Now this is where many of you have a problem. You can't open this file in Google Maps without it being stored online. That means you need access to a web server that will host the file for you. I don't know how you can get that for free, maybe someone can chime in with some suggestions. I don't mean something like rapidshare or mega-upload, you need a plain jane folder being served by a normal web server. I will be happy to post a file or two for people here, but it's not a service I can reliably offer to everyone. You can shoot me a PM and I will give you my email to send the file if you want to try it.
Dropbox's online backup service offers direct links to your files; upto 2 gb free total. Unfortunately it's bl*cked in China. I needed such a service for my students, if anyone knows an equivelant service that's still not blocked, please let me know.
Thanks for the great writeup V, especially step 11. I did something similar before I went to Chengdu, but without stepp 11, all I got was the points where GMaps tells you to turn. I ended up with waypoints I use just for confirmation that I'm getting closer to my destination. With the special offset here, I'm not sure how useful that was for me.
-
Re: Mastering Google Maps
I had a look at the windows live skydrive for file hosting but to no avail. It lets you store 25gb of pictures or any files for free, but doesn't give a direct link to the files. Shame. I still think it's great for hosting pictures for ride reports though.
-
Re: Mastering Google Maps
Felix, apart from the mapping questions, are you saying that if you let skydrive host your pix you'd not be able to link to them from MCM or other sites? What a shame indeed, but typical for microschlock.
cheers
-
Re: Mastering Google Maps
No no, it works fine for hosting pics for some reason, even though the url is a bit weird:
http://public.bay.livefilestore.com/...29).JPG?psid=1
I've been happily using it for my ride reports, but it just doesn't work for gmaps.
-
Re: Mastering Google Maps
Ok i found a solution for KML route file hosting: www.mediafire.com
It's perfect: free, very easy, don't even need to sign up. Go to the mediafire home page, click upload a file, upload your route and it'll give you an address for a page where you can download it. Here's a test route i uploaded:
http://www.mediafire.com/?qo427a7r09i2sja
On that page you'll see a "click here to start download" button appear. Right click on it and hit "copy the link location" to copy the direct URL of the file. In this example it's :
http://download96.mediafire.com/9xjc...test+route.kml
Stick that into googlemaps and you're done!
-
Re: Mastering Google Maps
Thanks Felix, tried it and it didn't work for me. Got this message in GoogleMaps "http://download96.mediafire... could not be displayed because it is not a valid KML or KMZ file". Did work with a file I created, so I'm guessing the space in your file name may have caused the issue. Always a good idea to avoid spaces and strange characters with files on the internet. Hopefully mediafire stays open for us, thanks for figuring this out. :thumbsup:
Cheers!
ChinaV
-
Re: Mastering Google Maps
Quote:
Originally Posted by
ChinaV
Thanks Felix, tried it and it didn't work for me. Got this message in GoogleMaps "http://download96.mediafire... could not be displayed because it is not a valid KML or KMZ file". Did work with a file I created, so I'm guessing the space in your file name may have caused the issue. Always a good idea to avoid spaces and strange characters with files on the internet. Hopefully mediafire stays open for us, thanks for figuring this out. :thumbsup:
Cheers!
ChinaV
When I do the following it works.
Quote:
Originally Posted by
felix
When I use the third link of his post it doesn't.
However, really try to avoid any other characters than Ab1_ in file and path.
GMaps is kind of allergic to it.
-
Re: Mastering Google Maps
If you've been following my bitching and moaning :gerg:over here in this thread, you can understand my feelings about MyMaps. Using the KML method keeps your trips a bit more anonymous...MyMaps is simply a way for Google to figure out where you go, how you got there, and when you travelled. Paranoid, yes, but it is true. One other thing that was bothering me with "The Google" is applications that don't work correctly in certain countries. I heard about this fancy new thing called "Google Navigation", and turn by turn vector maps sounded too good to pass up. Unfortunately, when you run it on a phone in China, the application won't work because of some stupid policy. That didn't go over well with me, so I started digging and found out about Brut Google Maps. Brut is a hacked version of Google Maps created to address all the stupid issues that Google screws up. The first thing it did, many moons ago, was cache the map data so you didn't need an internet connection...pretty smart.
I'm not going make a noob guide for this. If you are not geeky, surrender now, because getting this up and running is a bit of a project. If you're up for the challenge, read the 2444 posts at XDA developers and have at it. Once your done you will have turn by turn voice navigation (via 3D vector maps) coming at you in your helmet via bluetooth.
Couple of screen pics from my ride home yesterday.
http://www.contactdi.com/2011/20110307172514.png
http://www.contactdi.com/2011/20110307172428.png
http://www.contactdi.com/2011/20110307172340.png
Cheers!
ChinaV
-
Re: Mastering Google Maps
That's all a bit much for me but I am sure it will help some-one Lorne! I tend to attack such things only when I need them.
With the google anonymity stuff, I have used an alias on all hotmail/google/yahoo sites since the 'net began after realising just how much information open posting leaves about you in dark corners. I am sure we all posted stuff or published stuff we regret at one time or another or even changed our minds and views. And I too also dislike intensely the idea of my information being 'tracked' and databased. However I also recognise that even with anonymity of that level, any government or commercial agency, black, white or grey can dig deeper through firewalls and ISP trails. You have to manage your anonymity to an almost unusable level to avoid detection and tracing. For me, it is a trade off, we get to use the tax-payer paid for military equipment such as GPS satellites and we get amazing technology opening for us.
-
Re: Mastering Google Maps
Quote:
Originally Posted by
ChinaV
The first thing it did, many moons ago, was cache the map data so you didn't need an internet connection...pretty smart.
....(via 3D vector maps) coming at you in your helmet via bluetooth.
hehe, I didn't think you would test the navigation, brut has a good mod. But that version is old 4.6, get the brut 5+. The former is not vector based, the latter is, plus cuts more than half of data throughput and caches map data to SD card on the fly (once cached it also ready for navigation), so very usable even on EDGE network.
p.s. in fact it's very easy to install a mod Maps, no need to touch command-line, just like install an normal application. Some phone might reject foreign substance to replace system app, it would be also easy if you had the android rooted, move the app to system, done.
-
Re: Mastering Google Maps
Quote:
Originally Posted by
td_ref
hehe, I didn't think you would test the navigation, brut has a good mod. But that version is old 4.6, get the brut 5+. The former is not vector based, the latter is, plus cuts more than half of data throughput and cache on the fly (once cached it also ready for navigation), so very usable even on EDGE network.
p.s. in fact it's very easy to install a mod, not need to touch command-line, just like install a application. Some phone might reject foreign substance to replace system app, it would be also easy if you had the android rooted, move the app to system, done.
Yes td_ref, 5.2 is current version of Google maps, but Brut stopped at 4.6.0.4686-brut17 and the product seems to be taken over by a Chinese guy, "ownhere", his current version is aps5.2.0-ownhere, that's the one I'm running. Good stuff :thumbsup:.
The problem for most people will be "rooting", and the fact that Google Maps is a system app so it's difficult to install over it. If you do a fresh install and there's no Google Maps on the device, it's a piece of cake.
Cheers!
ChinaV
-
Re: Mastering Google Maps
i know you would be amazed the how usable and simple google navigation in China.
For rooting, everybody should do it, to get even more from android.
Cheers. TD
-
Re: Mastering Google Maps
ChinaV, I'm confused about why Brut Google Maps is better than regular Google Maps... I mean, the regular app caches for offline access and has turn by turn navigation now, so what are we missing?
I just noticed today that Google Maps isn't loading the map tiles on my cell phone here in Beijing, even though I am on a wifi connection. (I don't have a data plan setup yet).
Does anyone have any ideas why that might be?
-
Re: Mastering Google Maps
Quote:
Originally Posted by
CantDecide
ChinaV, I'm confused about why Brut Google Maps is better than regular Google Maps... I mean, the regular app caches for offline access and has turn by turn navigation now, so what are we missing?
I just noticed today that Google Maps isn't loading the map tiles on my cell phone here in Beijing, even though I am on a wifi connection. (I don't have a data plan setup yet).
Does anyone have any ideas why that might be?
It doesn't offer turn by turn 3D navigation via vector maps in China. It just started caching after 2 years and 4 million requests.
Many things related to the internet do not function as they should here. It's difficult to troubleshoot device problems when many times it's the internet that is "broken". Try connecting through an SSH tunnel or V P N and see if they load.
Cheers!
ChinaV
-
Re: Mastering Google Maps
I guess I'll have to root my phone... I have OpenVPN service but I'll need a modded ROM to get OpenVPN working... I don't understand why Android doesn't come with OpenVPN support out of the box.
It looks like the renamed version of Brut Google Maps randomly crashes, which sucks, because I'm not sure I want to uninstall the original GM on my G2. On the other hand, I do have my G1 I could stick it on...
This is slightly off topic, but what do you use for Bluetooth to your helmet for the directions?
BTW, if anyone is looking for the version ChinaV is using its here, See post 2420 for the files.
-
Re: Mastering Google Maps
Quote:
Originally Posted by
CantDecide
I guess I'll have to root my phone... I have OpenVPN service but I'll need a modded ROM to get OpenVPN working... I don't understand why Android doesn't come with OpenVPN support out of the box.
It looks like the renamed version of Brut Google Maps randomly crashes, which sucks, because I'm not sure I want to uninstall the original GM on my G2. On the other hand, I do have my G1 I could stick it on...
This is slightly off topic, but what do you use for Bluetooth to your helmet for the directions?
BTW, if anyone is looking for the version ChinaV is using its here,
See post 2420 for the files.
I haven't had any crashes, but also haven't put it through a full day of hard use. Newer version is here. I would like to be able to install both versions (google/brut), side by side, but I'm still working on that.
For Bluetooth, I'm using the Cardo Scala Rider TeamSet PRO. If you want Google Navigation to correctly pronounce the street names, you will need the SVOX Mandarin voice for Android.
Cheers!
ChinaV
-
Re: Mastering Google Maps
Quote:
Originally Posted by
CantDecide
ChinaV, I'm confused about why Brut Google Maps is better than regular Google Maps... I mean, the regular app caches for offline access and has turn by turn navigation now, so what are we missing?
I just noticed today that Google Maps isn't loading the map tiles on my cell phone here in Beijing, even though I am on a wifi connection. (I don't have a data plan setup yet).
Does anyone have any ideas why that might be?
Prior to GM 5.0, it could not cache map data to SD card, so Brut address that, make it read SD card data first. you are also able download maps file from a regular computer for it.
Since google release version 5, ....... That fuctions are partly covered, I think that's why he stop making the mod. But navigation is not open by default, Ownhere mod main purpose for me is for navi.
You dont have to use VPN, a regular EDGE/3G/WIFI network connection should work.
TD
-
Re: Mastering Google Maps
Quote:
Originally Posted by
td_ref
You dont have to use VPN, a regular EDGE/3G/WIFI network connection should work.
Yeah, with regular GM the tiles were not loading over Wifi. I just tried again before replying and it seems to be working now. Go figure.
Does GM still have the offset problem that it used to have?
I saw that BGM fixes that, which would be a big improvement. I downloaded the 5.2.0 and 5.2.1 versions of BGM, hopefully they will install on my G1, I don't know if Cyanogen 6.1 is new enough...
-
Re: Mastering Google Maps
Helmet bluetooth is another good thread in the making. I also use the Cardo Scala system, which Ryan and Colin also used in their ride around China.
But just this week I found something new in Taobao, at about one-tenth the price. The Taobao ad doesn't show what brand this is, but one of the little blow-up pictures shows that it's Gigatron, so here's what it seems you get for 286 RMB:
http://www.alibaba.com/product-gs/28...otorcycle.html
-
Re: Mastering Google Maps
You don't need the second link much Jeff, further down the Taobao page it has all the same product details in English! Looks very good.
-
Re: Mastering Google Maps
I'm asking the manufacturer for a detailed product manual. if it's good i'll post it somewhere for all to read. would be amazing if you could link between riders as we do with our cardo systems.
these things cost several hundred dollars in the us. under $45 on taobao. nice.
-
Re: Mastering Google Maps
If its too good to be true, it usually is...