Adirondack Forum

Adirondack Forum (
-   GPS Navigation, Maps, and Orienteering (
-   -   Free full screen topo maps & display KML files (

Jelf 11-26-2009 05:45 PM

Free full screen topo maps. Display GPS tracks & fly in 3D
Hello Everyone,

My name is Joseph Elfelt and I have a Thanksgiving Day present for you. I’ve written a map viewing program that is similar in concept to the work by colden46 on this site, but with some different features. My viewer is free, full screen, no ads. Here’s Lake Algonquin:,-74.292641

The topos come from MyTopo.
These maps include the USFS updates to the USGS maps. These updates include USFS road numbers and cover many (but certainly not all) national forest areas. The MyTopo maps are also better quality than the Terraserver maps and (I’m told) also better quality than the NG TOPO maps. I believe they include Canada.

The gmap4 map viewer understands these parameters:
q= http: pointer to a kml file anywhere online.
ll= map center. For North America use lat,-lon decimal degrees (same as Google, etc)
z= map zoom
t= map type

I’ve not implemented searching (yet). Use plain old Google maps to search. Point to what you found ==> right click ==> What’s this? ==> copy lat,lon from map search window ==> launch gmap4:

I live near Redmond, WA and here’s a map of a hike I’ve done in the Washington State Cascades
Did you notice the embedded picture link?

You can make similar maps of your trips and post links in your trip reports. There's no cost.
1. Convert your GPS data to a kml file
2. Put your kml file online. Make sure other people have ‘read’ permission for the file.
3. The link to your map is:

Here are some of the ways you can obtain a kml file containing your GPS and related data:
A. GPSBabel They re-designed their website since I saw it last. Easily convert GPX to KML.
B. GPSVisualizer. The output includes a fair bit of clutter in the form of tags that are used by Google Earth but are ignored by Google maps.
C. By hand. Here is the documentation from Google and there are examples in the tutorial. You must save a kml file with UTF-8 encoding. I use the free Notepad++ for editing kml files. Since kml files are a type of xml file, it really helps a lot to use an editor designed for working with xml files.

See the kml source file I used in the above example map for one approach for organizing the contents of a kml file.

<edited>Oh, and anything you include in the <Document><name> tag is treated as a caption and gets welded to the top of the map. See my example source files.</edited>

To launch gmap4:
or to see the default map (Google’s campus at Kirkland, WA)

To fully specify a map, use all 4 parameters.

But what if you don’t have your own website for hosting your kml file online? No worries. You can store your kml file in the cloud as a Google Document txt file and read it with the gmap4 map viewer. Since I’ve already given you a bunch to think about in this post, I’ll save those details for later.

Teaser: If several people are working together to make a trail map for an area, everyone in that group can pool their data by directly editing the same file in the Google cloud.

Enjoy and Happy Thanksgiving,
Joseph Elfelt

Jelf 11-27-2009 04:59 PM

I just remembered something that may help people that have a GPS unit that produces GPX files. You can use Google Earth to convert a GPX file to a KML file. You can then view your GPS data on 7.5” topo maps (full screen, no ads, free) by using the gmap4 map viewer.

Here’s how to use Google Earth to convert a GPX file to a KML file :

1. Open your GPX file with Google Earth. Your file can be on your local drive.
2. File ==> Save ==> Save Place as ==> Set ‘Save as type’ to KML ==> save the file

All you need to do now is place your KML file online and point to it with the gmap4 map viewer. See my earlier post for details.


looncry 11-27-2009 05:14 PM

Acsess to 55,000 topo satilite imagery shots is impressive. Tx for link. Looncry

adktyler 11-28-2009 08:13 PM

Wow, that's awesome. Thanks so much for creating this!!

Jelf 11-28-2009 08:21 PM

Thanks for the kind words.

The next update will let gmap4 read gpx files directly. Stay tuned...

mudrat 12-01-2009 03:02 PM


Originally Posted by Jelf (Post 137021)
Thanks for the kind words.

The next update will let gmap4 read gpx files directly. Stay tuned...

Awesome tool Jelf! Nice work and thank you. These are so useful when creating routes and evaluating what's been hiked. Do you mind if I put a link from my site to this tool ( )? I've a few already such as googleearth, virtual earth, etc under the links page.

Stephan26 12-02-2009 09:16 AM

Very nice Jelf. Thanks for the share.

adktyler 12-02-2009 12:14 PM

P.S. Do you mind if I cross-post this on a couple other forums? I think other people would find this very helpful! I'd give you full credit!

Jelf 12-03-2009 01:18 AM

Yes, everyone should feel welcome to post about the gmap4 map viewer far and wide. :dance::clap:

Support for GPX files will be done in a few days. I'll let you know when it's ready.

[edit] Please let me know where you post so I will not make an 'intro' post in that same place myself. Thanks.


adktyler 12-03-2009 10:46 AM


Originally Posted by Jelf (Post 137269)
Yes, everyone should feel welcome to post about the gmap4 map viewer far and wide. :dance::clap:

Support for GPX files will be done in a few days. I'll let you know when it's ready.

[edit] Please let me know where you post so I will not make an 'intro' post in that same place myself. Thanks.


Great, thanks! I cross posted it on ADKHighPeaks forum and VFTT. :thumbs:

Jelf 12-04-2009 01:19 AM

Correction to gmap4 map viewer

In an earlier post I indicated that any text in the <Document><description> element of your kml file would become a caption that gets welded to the top of your map. Oops! It was a mistake on my part to initially identify that element as the one where gmap4 would pick up text for a map caption. Instead, please use the <Document><name> element if you would like a caption on your map.

For example, this is how I coded a three line, bolded caption for the following demo map:
<name><![CDATA[<b>Includes part of County Line<br>trail (faint). GPS tracks<br>from 2004 and 2008.</b>]]></name>

Gmap4 will now ignore anything in the <Document><description> element of kml files.

To read more about adding html to your kml files, and the CDATA tag, please open this link and scroll down a bit:

If you use map captions, then I recommend keeping your caption and <name> tags on a single line in your kml file, like so:
<name><![CDATA[Your caption here. HTML is OK]]></name>

My apologies for any inconvenience this change will cause anyone.

Making changes to your map - &refresh=1

The MASU (MAppingSUpport) server must keep a copy of your kml file in order to display your data via Google maps. If you change the content of your kml file but do not change your file name, then you need to tell gmap4 that it should re-read your file and make a new copy. You can do this by first placing your revised file online and then launching gmap4 with this additional parameter: &refresh=1
For example:

After you revise your kml file, you only need to use the refresh parameter one time. Since the refresh parameter causes additional processing, it should not be routinely used. It only needs to be used 1 time after a kml file has been changed.

Google cache

Google maintains its own cache for kml files. This is different than your browser’s cache. If you make a change to your kml file then you will not see that change in gmap4 until Google decides to refresh its cache of kml files. Sorry about that but it’s out of my hands.

Testing kml files with Google Earth

Google Earth can read and display kml files from your local drive. If you change your file you can tell Google Earth to refresh itself with the revised data. This is a great tool to help you develop a kml file. The problem I described in the prior paragraph regarding the Google cache does not apply if you develop your kml files with Google Earth.

Store your kml files in the Google cloud

This feature is unique to gmap4.

In order for gmap4 to read your kml file, you must place that file online somewhere. And for those that do not have their own website - no worries - you can upload your data to the cloud as a Google document and let Google host your kml/txt file for free. However, since Google documents does not provide native support for kml files, you need to pay attention and follow these instructions:

1. Get a Google account. It’s free.
2. Change the extension on your file from kml to txt. Kml files are a type of text file.
3. Connect to Google documents and login.
4. Spend a little time learning your way around
5. Upload your kml/txt file
6. “Share” your file for viewing by anyone
7. “Publish” your file (check one file box ==> More actions ==> Check the box to “Automatically re-publish” ==> Publish)
8. Copy and save the url you get when you “publish”.
9. Launch gmap4 to view the data in your “published” file:,_____________
Replace the underscore with the id for your “published” file:

Here is a link to a different version of the demo map you have already seen. This specific file is stored as a Google document. Note that it does not have any caption at the top of the map. That is because this file does not have any text in the <Document><name> element of the kml file.

Tech note: Google adds a lot of html code to each file that is uploaded into Google documents. After reading one of these kml/txt files, gmap4 unwraps the html and converts the file back into a normal kml file which can then be read by Google maps. This feature is unique to gmap4.

Status of enhancement to support gpx files

The coding is finished and testing is underway. Here’s some insight into how this will work. Google maps understands kml files but does not understand gpx files. After I release this enhancement you will be able to launch gmap4 with the q parameter pointing to a gpx file hosted anywhere online. Gmap4 will read that file and use GPSBabel to convert it to a kml file. That conversion step will use the default settings built into GPSBabel. If those default conversion settings do not give you what you want to see on your gmap4 map, then you will need to run GPSBabel yourself and adjust the conversion settings to produce a kml file more to your liking. You can then place that kml file online somewhere and then display that data with the gmap4 map viewer.

Future enhancements

Actually before working on any more enhancements I really need to write v.1 of a ‘help’ file.

High on the list of future enhancements is the ability to click the map and build a list of coordinates. You will be able to copy those coords and save them on your local drive. Of course once the coords are on your drive you can process them with GPSBabel (or various other tools) and convert them into a gpx file or any other kind of file supported by your conversion tool. In this manner you will be able to load coords into your GPS prior to your next trip.

Bug reports

Please let me know if anything seems awry. I will try to check back here periodically but if I seem AWOL you can always email me through my website:
Since gmap4 is under active development, it is certainly possible that in adding a new feature I will accidentally break something that previously worked fine.

Joseph Elfelt

Jelf 12-05-2009 09:09 PM

Here’s some cheery news. The gmap4 map viewer can now read GPX files. You should see version 1.2.041 in the lower left corner of the map. If not, please clear your browser’s cache and try again.

If you do not like how your GPX data looks on the map (line width, line color, etc), then it is a simple matter for you to run GPSBabel on your own computer and tweak its options. By doing so you can produce a kml file that you can feed to gmap4 and see your data the way you want it to look.

Please do not store GPX files as a Google document. That feature only works for KML files. Some time in the future I will investigate turning this feature on for GPX files.

Please let me know if something does not work right.


Jelf 12-08-2009 10:54 AM

I just finished testing the latest update to gmap4 and it is now ‘live’.

Recall that:
1. Gmap4 can read both GPX and KML files.
2. You have to place your file online before gmap4 can read it.

New feature:
Gmap4 can now read GPX/txt files that Google is hosting online (for free) as Google documents.
The previous version of gmap4 could read KML/txt files that were online as Google documents.
You should now see version 1.2.074 in the lower left corner. If not, please clear your browser cache and try again.

Since you have to place your data online in order to view it with gmap4, why not let Google host your files for free?

Here are improved instructions for placing your kml and gpx files online as Google documents.

1. Get a Google account. It’s free.

2. Change the extension on your file so it ends in txt.
Change: my_hike.gpx to my_hike.txt

3. Connect to Google documents and login.

4. Click the “upload” button and upload the “txt” file.

5. Go back to the file screen and select this new file by checking its box.

6. Click Share ==> See who has access.

7. In the lower left corner of the popup make sure it says “People can view this item without signing in.” If necessary change the setting so this message appears.

TIP: Create a folder and “share” it for viewing by anybody. Then any file you upload into that folder will automatically have the correct “share” setting.

WARNING: One of the options under the “Share” button says “Get the link to share...”
Don’t go there. Gmap4 does not use any info from that link.

8. With the box in front of your new file still checked, click: More actions ==> Publish

9. Check the box that says “Automatically re-publish when changes are made”. You will be asked if you want to publish your file. Agree.

10. Soon after you agree, Google will display a message similar to this:
“Your document is publicly viewable at:”
Of course the id code for your file will be different.
Copy the id code for your file.

You are now ready to launch gmap4 and view the data in your KML or GPX file.

Enter the following into your browser bar but replace the xxxxxxxx with your file id code.,xxxxxxxx

You can include this link in emails, websites, trip reports, etc

Here is an example of the correct way to launch gmap4 when your data file is hosted online as a Google document:

My next task is to finish writing a ‘help’ file so there is decent documentation for gmap4.


Jelf 12-12-2009 09:59 PM

Free full screen topo maps. Display KML & GPX files
The Gmap4 map viewer now has a detailed help file.
Please take a look at the Quick Start section to get an idea of the kinds of things Gmap4 can help you do.

The topographic maps available via Gmap4 cover the USA at 1:24,000 (same as 7.5ʺ quad) and Canada at 1:50,000. Below is a link to a map of the USA-Canada. Just zoom in on something that you want to see and when you find it then click the MyTopo button in order to see a detailed topographic map for that spot:

You can look at anything if you know the latitude/longitude.
Mt. Rushmore:,-103.45087

Yellowstone - Old Faithful:

What - You mean you don’t know the latitude/longitude for Pocket Lake, in the Eagle Cap Wilderness of Oregon? (A very neat spot BTW) Not a problem. Search using POGM (Plain Old Google Maps). When you find that which you seek:
Point to it ==> Right click ==> What’s Here? ==> Copy the latitude/longitude from the map search window. Then paste that latitude/longitude onto the end of a command to launch gmap4:,-117.274332

These topos are from the MyTopo ( company. They scan the paper topographic maps and make their money by selling custom topo maps that you design. While there are not many websites (yet) displaying topographic maps from MyTopo, there are numerous sites that display topographic maps from Terraserver. If you are curious, here is how you can compare the onscreen quality:

1. Make your browser full screen.

2. In one browser tab, display the MyTopo Yellowstone - Old Faithful map from the above link.

3. Open another browser tab and go to

4. Enter these coords 45.174716,-117.274332 in the ACME search window and click Find.

5. Adjust the ACME zoom control so the tab is on the 4th crossbar from the top.

6. Click the ACME ‘Topo’ button to display the Terraserver maps.

The MyTopo and Terraserver maps should now have the same center and be the same scale. You can flip back and forth between your two browser tabs and compare the quality.

Jelf 12-30-2009 08:10 PM

Here's the latest Gmap4 update.

Gmap4 can now read Google MyMaps.
Also the on-screen interface is cleaner and the Help file has been updated.

Here’s an example of a Google MyMap I made for a hike in the Washington State Cascades:

Every time you make a MyMap there is a unique ‘id’ code assigned to that map. Gmap4 uses that ‘id’ code to display your MyMap. All you need to do is enter the following command into your browser. Replace the xxxxxxxxxxx.yyyyyyyyyyy with the ‘id’ code for your MyMap. Also, be careful not to let any spaces get into this command:

If you do not know the unique ‘id’ code for your MyMap then:
1. Display your MyMap
2. Click the “link” button in the upper right corner
3. Save the link and find where it says: &msid=
4. Copy your ‘id’ code. The ‘id’ code begins after the “&msid=”. If you are copying the ‘id’ code and get to a ‘&’ character, then copy everything up to (but not including) the ‘&’ character.

Finally, if you have a KML file then Google maps has a feature that lets you "import" that KML file into a MyMap. This is a very quick way to put a KML file online so you can view it on the detailed topographic maps that are available with Gmap4.

Jelf 01-07-2010 12:25 AM

Gmap4 now has a website:clap:.

mudrat 01-07-2010 05:32 PM

I'm not sure if anyone's tried this yet, but I just uploaded a .kml file to my site and added to the tool. There's nothing fancy about this route (which I haven't hiked yet), but I figured I'd start simply. It works great! Thank you. I'll start using this in trip reports soon.

Jelf 12-09-2010 03:24 PM

Yesterday I posted version 1.8.1 of Gmap4. New things include:
Search (Click Menu ==> Search)
Place one icon on the map via a URL parameter (&icon=)
Print via your browser

Gmap4 homepage:
Check out the menu links for:
What’s new

Search the Help file on “(New)” to find details on the new stuff.

To the best of my knowledge the Search - List feature is unique to Gmap4.


Jelf 01-02-2011 07:12 PM

Gmap4 has been updated to version 1.8.3

The present-day magnetic declination for the map center is now always displayed in the lower right corner. This value is produced using software from combined with data from
Since the magnetic declination is always changing, the older value printed on maps can be wrong by several degrees.

I also updated my links page to show (1) reviews of Gmap4 and (2) sites that are already using Gmap4 to produce online interactive maps.

Finally, if you are interested in the search feature and/or print feature, please check the ‘Help’ file (and use the Table of Contents) to be sure you have seen the most info on those features.

The link below will display a world map. To test-drive the search feature click Menu==>Search.


Jelf 01-19-2011 03:41 PM

Gmap4 has been updated to version 1.9.1 dated January 17, 2011. This version adds support for UTM coordinate grids. All UTM support in Gmap4 uses the WGS84 datum. This UTM support works worldwide. For more info on UTM coordinates see:

(Pay back time: When you visit other outdoor-related forums, please do a search and see if Gmap4 has been mentioned. If not, it would just take a moment for you to pass the word along. Also, are you doing the social network thing? Consider saying something nice about Gmap4.)

Here’s a map of Grand Canyon Village with a UTM grid.

To toggle UTM support on and off, click Menu ==> UTM On/Off. If UTM is ‘on’ then Gmap4 gives you UTM information in three ways:

1. A UTM grid is displayed. This UTM grid is displayed on both the MyTopo topographic maps (USA and Canada) and the standard views (aerial, etc) provided by Google Maps.

2. The lower right corner of the screen will always show the UTM zone and UTM coordinates for both the cursor and map center.

3. You can get the UTM zone and coordinates for any point on the map by right-clicking that point.

Things to keep in mind

You can build you own map links by using URL parameters. If you want your map to appear on the user’s screen and already have UTM turned on, then add this URL parameter: &coord=utm

Here is a comparison:
With UTM on
With UTM off (default)

If you zoom out far enough then you will not see a UTM grid. Instead you will only see vertical red lines which mark the edges of the UTM zones.

UTM grid lines that are near the edge of their zone often appear curved when displayed using the map projection used by Google Maps. The grid lines in the adjoining zone will curve in the opposite direction. For example, the next map is centered near Lake Tahoe. The red line marks the edge of adjoining UTM zones. Double click each side of the red line (this changes the map center) and watch the UTM grid lines change. The grid lines are calculated based on the UTM zone that contains the center of the map.

Some MyTopo topographic maps already have a UTM grid printed on them. Caution! Some of those printed grids are based on the older datum NAD27. Those older grids will have a uniform offset from the grid displayed by Gmap4 which is based on datum WGS84 . For example: Here is a map showing part of the Alpine Lakes Wilderness area in Washington State where the MyTopo maps have a UTM grid based on the WGS84 datum. Click Menu ==> UTM On/Off and you will see the faint UTM grid printed on the map:
By contrast, here is a map showing part of the Yosemite Valley area in California, where the MyTopo maps have a UTM grid based on NAD27. Note the uniform offset between the two sets of grid lines.

Usually (but not always) the different zoom levels use a different scale for the UTM grid. To learn the grid scale, compare the cursor coordinates (lower right corner) as you point to adjacent grid lines. If you want to know the zoom level, right click the map.

Maps with UTM grid lines can be printed. File ==> Print Preview

If you know of any other map viewing software that can display the MyTopo topographic maps along with a UTM grid, I would enjoy knowing about it.

Future UTM improvements

There are different methods for putting labels on the grid lines. I am pondering what will work best.
Another possible improvement is to let the user change the line width, color and/or spacing.
Other ideas?

Next Gmap4 update

Bad news: The ‘Search’ feature of Gmap4 no longer works very well for placenames. This feature uses Google’s ‘geocoding’ service on the backend. OK, I admit it. Gmap4 was pushing the envelope in its use of that service. Whoops - Google pushed back. Guess who won? I will add a second search tool that is designed to work well with placenames.

Good news: The existing ‘Search’ feature of Gmap4 still works fine for searching on (1) anything related to addresses including names of many settlements that no longer exist and (2) any reasonable way to write a latitude/longitude pair.

Finally, if you find Gmap4 to be useful I hope you can take a moment and do some ‘pay-back’ by letting other people know about it.

Joseph - Gmap4 author

All times are GMT -4. The time now is 07:33 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.