Monday 13 July 2015

Google Maps URL tricks

If you are providing links for people to follow, there are a number of options that you can specify in the URL of a map link to alter the map behavior. Other times you may want to intentionally change the type of map you are looking at. Below are some of the ones URL tricks that I have come across.

Change the behavior of Maps on your own computer

Maps has 2 versions, the Full Maps and Lite mode. In the Full Maps, you can either look at the 3D objects, or just a plain 2D satellite view.

Force Maps into Full mode without the 3D stuff: https://www.google.ca/maps/?force=canvas

Force Maps into full 3D mode: https://www.google.ca/maps/?force=webgl
(you have to do this while in the Full version for it work)

Force Maps into Lite mode: https://www.google.ca/maps/?force=lite

Links for locations

You can link to a named business or location by using the /place flag: https://www.google.ca/maps/place/CN Tower, Toronto

The default view will be the map view, but you can force the view mode to one of the other modes:

Terrain: /data=!5m1!1e4
Earth: /data=!3m1!1e3

To force the Earth mode: https://www.google.ca/maps/place/CN Tower, Toronto/data=!3m1!1e3

Links for directions

To specify a route, you need to use the /dir flag and add the start and end points separated with a /: https://www.google.ca/maps/dir/Union Station, Toronto/Eaton Centre, Toronto

If you only want the starting point just don't specify the ending: https://www.google.ca/maps/dir/Union Station, Toronto

If you only want the ending point add a double / after the dir: https://www.google.ca/maps/dir//Eaton Centre, Toronto

To add multiple destinations, keep using the / key:

https://www.google.ca/maps/dir/Union Station, Toronto/Eaton Centre, Toronto/Leslie Spit, Toronto/Ashbridge's Bay, Toronto

You can also specify the type of directions by adding the following flags:

Driving: /data=!4m2!4m1!3e0
Bicycling: /data=!4m2!4m1!3e1
Walking: /data=!4m2!4m1!3e2
Transit: /data=!4m2!4m1!3e3
Flying: /data=!4m2!4m1!3e4

(special thanks to treebles, who spent the time to figure these flags out)

So for the walking directions above you would use https://www.google.ca/maps/dir/Union Station, Toronto/Eaton Centre, Toronto/data=!4m2!4m1!3e2

As with places, the default view will be the map view, but you can force the view mode to one of the other modes:

Terrain: /data=!5m1!1e4
Earth: /data=!3m1!1e3

If you want walking directions and terrain view, you would add the codes together to get https://www.google.ca/maps/dir/Union Station, Toronto/Eaton Centre, Toronto/data=!4m2!4m1!3e2!5m1!1e4

If you know of any more URL tricks, let me know and I'll add them in.

Friday 1 May 2015

CleanMap bookmarklet

Based on a request, here is a modified version of the Clean SV bookmarklet that will clean both Streetview and the main Google Map to give you a full-screen view without any tools or boxes. If you use this you can get rid of the Clean SV bookmarklet.

If you are using a modern browser (I tested FF and Chrome), all you need to do is copy the link below to your bookmarks by dragging it over to your bookmarks bar, and when you click on it all of the boxes and tools on the screen will go away and give you an unobstructed view (or come back if they are already gone).


Hopefully you'll find this a useful tool.

Updated August 17,2015 to fix the broken bits

Wednesday 29 April 2015

Streetview Cleaner bookmarklet

Update: There's a newer version that also cleans Maps.

Original Post:

A few days ago I discussed a method to remove clutter from Streetview using your browser developer tools. It wasn't a very difficult process, but if you don't use it regularly it will be one of those things you'll always need to mess around with to get it working right every time. Today I stumbled across a link in the Maps help forum that led me to an interesting post by a guy named Alex Chan. A couple years ago he created a bookmarklet that hid some of the content on Google Maps. Long story short, I took inspiration from his code, mangled it up a bit, found help on Stack Overflow on how to un-mangle it, and made a bookmarklet to Clean Streetview.

If you are using a modern browser (I tested FF and Chrome), all you need to do is copy the link below to your bookmarks by dragging it over to your bookmarks bar, and when you click on it the clutter on Streetview will go away (or come back if it's already gone).


Hopefully you'll find this a useful tool.

Monday 27 April 2015

Getting GPS coordinates on your phone

Everyone once in a while people ask about how to get GPS coordinates using their phone. Getting your current location is fairly straightforward, but what if you want to get the latitude and longitude for some other point? Maybe you want to meet someone in a park and give them the exact coordinates of where the picnic will be sometime in the future. Unfortunately there is no simple way to just click on a point and see the coordinates in Google Maps Mobile. The good news is that it still is possible, it just takes a few steps.

Method #1: Starred location

If you want to get the coordinates of some other point using Maps, you can save the location and find the coordinates in your saved places:
  1. hold your finger on the location until a pin is dropped
  2. click on the "Dropped pin" banner on the bottom of the screen to pull up the options
  3. click on Save to save the location to your saved places
  4. hit the back arrow to get out of the dropped location
  5. click on the menu icon in the upper left and select "Your Places"
  6. The location you saved will be there with the coordinates (in decimal degrees format)
The problem with this method is that you can't copy the coordinates, if you try pressing on them you won't be able to highlight the text. If you need to coordinates as text, once you save the location will also be able to get the coordinates from your bookmarks page at https://www.google.com/bookmarks. You can also use that page to delete the location when you are done with it, or you can just un-star it from Maps Mobile.

Method #2: Shared location

There is another slightly different way that involves grabbing the location from a URL:
  1. hold your finger on the location until a pin is dropped
  2. click on the "Dropped pin" banner on the bottom of the screen to pull up the options
  3. select the pin and choose the Share icon
  4. select Gmail and it will start an email that includes a short link that look something like https://goo.gl/maps/?????
  5. select the link and copy it
  6. open up a browser and paste the link and follow it, and the Lat/Long will be in the address bar

Sunday 26 April 2015

Removing clutter from Streetview

In the New Maps, when you are looking around in streetview there are a few boxes, icons, and toolbars on the screen that obscure a bit of the view. Usually it's not a problem, but some people may want to have a full screen view that's very clean. There is no ability within Maps to remove stuff, but modern browsers have some developer tools that are great for customizing a site temporarily.

This post is going to show how to remove content you don't want to look at using the developer tools in Chrome (Firefox is basically the same). The only catch is that it's a temporary fix, the next time you load the page it will all come back again.

So maybe you have a great view of the CN tower, but those pesky boxes are in the way:


Getting rid of all of it is actually pretty easy to do:
  1. Click ctrl-shft-i to get the developer tools
  2. Click on the magnifying glass icon in the upper left corner of the developer window (square with an arrow in FF)
  3. Go to the black location box in the upper left corner and hover over the black area just above the arrow so the entire box turns blue and click on it
  4. Go to the developer window and a few lines should be highlighted
  5. Right click on the line above it that says <div id="titlecard" jstcache="0"> and choose Delete to remove that box
  6. Repeat steps 2-5 for the bottom of the map, but for that one you want to delete the line is about a dozen lines above the highlighted line that says <div class="app-viewcard-strip noprint" jstcache="0">
  7. Click on the X in the upper right corner of the developer tools tools to close them
I can't be bothered to take images of the entire process, but if you follow them, the result should look like this:

I use this technique quite a bit when I want to take a screen-capture of something but there are elements I don't want to include. Sometimes you have to experiment a bit to find out what lines to delete to make the specific content go away, but the beauty of this process is that if you mess up you can just reload the page and it all comes back again.

KML overlays in Map Maker

Now that I got that terrible first post out of the way, here's some actual content.

If you are going to map some roads or trails, you may find yourself using My Tracks to record a track, and then you need to figure out how to turn that track into actual lines in Map Maker. I actually did that today to map some new roads they are building in my area. The trick to importing your KML file is finding a place to host the KML online and then getting the URL to the actual KML file that you can paste into Map Maker. Google always seems to be changing their mapping products, so some of the instructions you may come across may not work anymore.

There are 2 ways that I know currently work that I use. I create the track using Google My Tracks on my Android device and then I can export to My Maps and from there it's pretty easy to get the link:
  • Once you have the track in My Maps, the link needs to be shared so that anyone with the link can view. Click on the green "Share" button in the upper right corner to do this
  • To get a URL you can use with MapMaker, you need to take the shared link and change "embed" or "edit" in the middle of the URL to "kml", so it will look something like "https://mapsengine.google.com/map/kml?mid=" and then a big long ID string
  • Paste that KML link into the Overlay Manager in Map Maker

If you don't want to use My Maps you can also put the file on Google Drive:
  • Upload the KML file to your Google Drive (it will actually be uploaded as a KMZ file, but that's basically the same as a KML except it's also been zipped to make it a smaller file)
  • Share the file so that anyone with the link can view the file
  • You need to get the ID code for the file, and it's a bit tricky. The way I get it is to double-click on the file and a screen will come up that says there is no Preview available. Click on the "Pop-out" icon in the upper right corner and the KML will open up in Maps and the URL will contain a long string that is the file ID
  • The URL to the actual KML file is the following URL: https://docs.google.com/uc?export=download&id= and then you need to paste the ID from the pop-out window
That's all there is to it.

First!!!1!!!1!

I think the first post of a blog is supposed to be something clever, but I'm too lazy for that. This blog was mainly created to be a collection of mapping related resources that I'll be able to find easily, and that other people may be interested in. Using Blogger to create a database of interested tidbits of mapping information seems like a good idea right now, so we'll have to see how this all plays out.

I've never used Blogger before, so this might be a bit of a mess until I figure out how to work this software, but that probably won't matter too much, who knows if anyone other than me is even going to read this. On that note, I guess I'll stop rambling.