GPS Visualizer

Google API Keys

In July of 2018, Google dramatically reduced the number of Google Maps "transactions" you're allowed to make per month. Unfortunately, this means that the general public can no longer access some of Google's services using GPS Visualizer's credentials.

Making maps

When you make a Google HTML map, you may see a "This page can't load Google Maps correctly" message, and Google's map tiles will be watermarked with "For development purposes only." For now, there are three ways to deal with this:

  1. Make a map with the open-source Leaflet API instead of Google Maps. The main difference is that you won't have access to Google's background tiles, but no key is required, and the map functionality is essentially the same.
  2. Get your own API Key and enter it into GPS Visualizer's input form; instructions are below, in the blue box.
  3. Use a non-Google background map, such as OpenStreetMap. You'll still get the "can't load correctly" message (which can be quickly dismissed), but the tiles won't be watermarked with the "development" message.

Converting driving directions

You can no longer simply paste in a Google Maps directions URL to get a GPX file or elevation profile. You have two options:

  1. Get your own API Key and enter it into the conversion or profile input form; instructions are below, in the blue box. (This is your best bet if you'll be using this feature a lot.)
  2. Run the directions through Google's "My Maps" feature; instructions are below, in the purple box.

(By the way, Google Earth KML files are completely unaffected by all of this!)


How to get your own API Key

The best long-term solution is to create your own Google Cloud Platform API key:

  • Go to https://cloud.google.com/maps-platform/. Sign in if you are not already logged into a Google account.
  • Click Get Started, select your country, and agree to Google's Terms & Conditions. You'll also need to enter a credit card number to prove you're a real human being.
  • When you are prompted to select a product, select Maps and Routes.
  • Google will create an API Key for you, and will probably enable several APIs by default. Click on APIs in the sidebar and verify that the Maps JavaScript API and Directions API are enabled. You may also want to enable the Geocoding API, if it isn't enabled yet.
  • To check on your newly-created API Key (or make another one), click on Credentials in the sidebar or navigate to https://console.developers.google.com/apis/credentials.
  • To make a new key, click Create Credentials and then select API Key. To edit an existing key, click the "pencil" icon to the right of the key's name.
  • If you are only going to use the key to make maps or convert routes with GPS Visualizer, you can set Application restrictions to None. But if you're concerned about someone potentially "stealing" your key, you can set it to allow certain HTTP referers, and enter https://www.gpsvisualizer.com/* under Website restrictions. (If you also want to be able to use the maps from your own desktop computer, add __file_url__//* as well.)

Note: once you've entered your key into a GPS Visualizer input form, it will be saved in a "cookie," so you won't have to enter it again unless you switch to a different browser.

About "billing"

To use the Google APIs, you need to "enable billing" by entering a credit card and verifying that you're a real person. Individual users will almost NEVER exceed the free usage limit, so you won't actually be billed. If you're worried, set a daily quota for your project/key.


Using "My Maps" to convert Google directions

(no API Key required)

If you just need to convert a Google Maps driving/walking/biking route to GPX, you can create the route in Google's "My Maps" feature, and GPS Visualizer will still be able to read it, as long as "sharing" has been enabled.

  • Go to https://www.google.com/maps/d/. Sign in if you are not already logged into a Google account.
  • Click on Create a new map.
  • In the map-drawing interface's toolbar, click on the "add directions" button ().
  • Enter your beginning and ending points. You can also add additional destinations, or drag the route to a different road, just like in the normal Google Maps interface.
  • Click Share in the sidebar (). Name your map.
  • Under Who has access," click Change... and then select On - anyone with the link.