Tips For Using Gmap4

By: Joseph Elfelt    

Want to peek under the hood and quickly learn how Gmap4 displays GIS data? Want to learn how to make a simple text file that specifies GIS layers for a Gmap4 map? You will find that information near the end of these "Tips".

These "Tips" are intended to go along with a series of Gmap4 maps I produced that display GIS data related to public land and recreation. You can find those maps at

What is Gmap4?

Gmap4 is an enhanced Google map viewer. There is nothing to download, nothing to install. Simply touch or click a link and Gmap4 will start up in your browser. It will work in most browsers on most devices from smartphones to desktops. When Gmap4 is running in the browser on a smartphone or other mobile device it automatically uses a touch-friendly interface. Note that the browser does have to be online when Gmap4 starts.

Three ways to access different features

  • The "Menu" button lets you search, geolocate, change the coordinate format, make a GPX file, display the declination and do various other things.
  • The other button always displays the name of the current basemap. This button lets you (1) change the basemap and (2) turn GIS overlay layers on and off.
  • A rightclick anywhere on the map will display the coordinates in all the common formats for the point you clicked.
Working with GIS overlay layers

To see the list of available overlays, click (or touch) the button that lets you change the basemap. After that menu opens on a desktop/laptop you will see a column labeled "Overlays" and on a mobile device you will need to scroll down to the "Overlays" section.

Clicking the name of an overlay toggles it on and off. An overlay that is 'on' has a number in front of its name. Overlays that are 'on' are stacked on top of each other with #1 being at the bottom of the stack. The highest numbered overlay is at the top of the stack and will cover up any overlay data under it. To move an overlay to the top of the stack, turn it 'off' and then turn it back 'on'.

If an overlay is hard to read then change the base map to either "All white basemap" or the basic Google street map.

The "All white basemap" can also be used to make some nice maps that only have data from overlay layers that you turn on.

Typically an overlay only displays data at certain zoom levels. This is determined by whoever setup the GIS server and Gmap4 does not have any control over this. If a GIS overlay layer does not seem to be displaying any data, try zooming in. Also it is fairly common that a GIS overlay will start to display some data as you zoom in and then display more data if you zoom in more. Sometimes labels will appear for the overlay features if you zoom in more.

By early 2015 you will be able to click or touch a GIS feature that you see on the map and information about that thing will be displayed. This information will be the "attributes" the GIS server has for that thing. But until then, if you click/touch a GIS feature on the map, nothing will happen.

Working with GIS basemaps

Some Gmap4 maps might include addition basemaps that display GIS data. You will find GIS basemaps (if any) at the end of the list of built-in basemaps. Any GIS basemap will act just like the built-in basemaps.

Geolocate yourself - Center the map at your location

This feature is intended for mobile devices that have a GPS feature. Make sure the GPS feature is on, start Gmap4 and then touch Menu ==> My location. Give permission and the map will center at your position. As you travel the geolocate symbol on the map will follow you and the basemap will automatically move as needed.

If you touch the geolocate symbol, then the coordinates for your position will be displayed. This display will use the current coordinate format. Use the Menu button to change the coordinate format.

If you touch Menu ==> "My location" and the map does not re-center at your position, then most likely your mobile device needs to download a new GPS almanac from the satellites. Place your device where it has a reasonably good view of the sky. This will take 15-20 minutes.

Use Gmap4 offline

While you are online you can (1) start Gmap4 on your smartphone or tablet and (2) save a copy of the basemaps and GIS overlays you want to view while you are offline. As long as you do not turn your mobile device completely off or close the browser tab where Gmap4 is running, you will be able to view the saved basemaps and GIS overlays while you are offline.

The geolocation feature will also work offline and show your position on the maps you saved.

To save a basemap and GIS overlay layers for offline viewing, start by displaying that information on the map. Zoom the map to the same zoom level you want to use offline. Now pan the map all around the area where you will be offline. Each basemap and GIS overlay layer is made up of a bunch of "tiles". Each tile is a jpg or png image file and is 256 pixels by 256 pixels. It takes a number of tiles to fill you screen. As you pan the map a copy of these jpg/png files is saved in the browser's cache. When you are offline your browser retrieves these jpg/png files and displays them on your screen.

If you are offline and travel outside the area for which you saved map tiles in the browser's cache, then the basemap will be white but the geolocate feature will still work fine.

For more information about using Gmap4 offline please see this pdf file:

Display the high resolution topographic map

The basemap called "t4 Topo High" will display high resolution topos for the USA. You might need to be zoomed in more before these topo maps appear.

Change the scale to feet and miles

The bottom of the map includes a scale symbol which always starts out in metric. Click/touch that symbol and it will change to feet and miles.

Change the coordinate format

If you do Menu ==> "UTM - USNG - LatLng" then you can pick any of the common coordinate formats. The format you pick will be used in a corner of the screen to show the center of the map. On a desktop/laptop a corner of the screen will also show the coordinate for the cursor location. If you turn on the geolocate feature and touch that symbol when it appears, then the current coordinate format will be used to display your location.

Everyone should learn about USNG (US National Grid). USNG coordinates are the federal standard for SAR (search and rescue). It has also been adopted as a standard by Florida and Minnesota. The Gmap4 Help page (see homepage link below) includes a pdf file that describes all the features of Gmap4 that support USNG coordinates and links to videos and articles for more information. It is worth a few minutes of your time to look at some of those links just so you get a feel for what USNG is all about and why it is important.

Many people that have been in the military already know about MGRS (military grid reference system) coordinates. For all practical purpose, USNG is the same as MGRS except USNG coordinates are written with spaces so they are easier to read.

If you change the coordinate format to UTM, USNG or MGRS then you will also see a grid on the screen.

Make you own custom Gmap4 map link

Make the map look on your screen the way you want it to look. Then do Menu ==> Link to this map. The link that is displayed will reproduce the map on your screen. You can email that link, post it in forums, include it in blogs, etc.


To open a search bar above the map, do Menu ==> Search. You can search on addresses, many kinds of place names and most reasonable ways to write coordinates. All the common coordinate formats are supported.


If you do Menu ==> Declination, then the current magnetic declination for the center of the map will be displayed near the lower left corner. Declination changes faster than you might think. In many cases the declination printed at the bottom of USGS topographic maps has now changed by several degrees.

Draw on the map - Trace an area boundary

The Menu ==> "Draw and Save" feature lets you add data to the map and then save your data as either a GPX file or a delimited text file. You can also use Gmap4's unique map-in-a-link feature to save your data right in the Gmap4 link itself and not have to bother with any data file.

How to make a GPX file that has the approximate boundary of an area you see on the map:
1. Turn on "Draw and Save" and then check "Waypoint and linepoint" before hitting the "Continue" button.
2. Click along the boundary of the area. Rightclick any symbol to see a context menu.
3. Zoom in and drag each point to better match the boundary you see on the map.
4. Rightclick any symbol and save your work as a GPX file.

The line you draw on the map will be a "route" in the GPX file. If you make that route "active" on your GPS then the GPS screen will show the lines you made by tracing on the Gmap4 map. Caution! The boundary lines you see on the maps can be wrong by 100 feet or more. Always error on the side of caution and respect private property rights.

Get directions

Rightclick the map at either your starting point or ending point. Look at the bottom of the popup and select the appropriate button. A side panel will open where you can specify the other end of your trip. When the directions appear you drag the line to change the route.

Display your own files

Gmap4 can display these types of files: GPX, TPO, KML, KMZ, Google MyMap, and a delimited file format. You first need to put your files online. Here is a pdf file from the Gmap4 Help page that shows you how to use the free Google Sites to host your data files:

Peek under the hood
Anyone can make a text file that specifies GIS data for Gmap4 to display

Gmap4 understands a maximum of 25 GIS layers. You can create your own custom map that combines layers from existing Gmap4 maps and/or uses GIS layers that you find yourself.

Start by downloading and opening one of the text files that I made. The link at the very top of this page will take you to some Gmap4 links I produced. Each of those Gmap4 links includes the internet address for a text file that I made. If you look at any one of those text files while you read these short instructions then you will quickly see how this works.

Here are the steps to make a Gmap4 map that can display the GIS data that *you* want to see on the map:
  1. Make a text file that specifies the GIS data for the map
  2. Put your text file online
  3. Make a Gmap4 link that points to your text file
Google Sites will host your text file for free. For step-by-step directions, download this pdf file and search it on "Google Sites".

To specify a GIS data layer make a line in your text file like so:

Replace the first underline with the full link to the GIS layer.

The "name" parameter is a short name that you invent. Use an underline charcter instead of a space. This is the name that will appear in the Gmap4 "Overlay" menu.

Set the "layers" parameter to the number that identifies this layer. This parameter will also accept a comma separated list of layer numbers as well as a range of layer numbers. Example: layers=4,5,11-16,22

If this layer will be a basemap then use transparent=false. Otherwise use transparent=true and Gmap4 will try to treat this layer as an overlay with a transparent background. Note: If a layer was designed to have a solid background (i.e. non-transparent) then Gmap4 does not have any way to change that characteristic.

There should not be any spaces in your 'rest=' line.

When you are done specifying layers, then put your text file online and make a Gmap4 link like so:

Replace the underline with the full http link to your file.

Paste the completed Gmap4 link into a browser and open your map. You will see a map of the world.
  1. Zoom and pan (or do Menu ==> Search) to the area covered by your data
  2. Select the basemap you want on when the map opens
  3. Turn on any overlay layers that you want on when the map opens
  4. Fine tune the zoom and pan if needed
  5. Turn on any special features you want (Grid, MyLocation, etc)
  6. Menu ==> Link to this map
The link that is produced will replicate the map on your screen.

The complete documentation for displaying GIS data with Gmap4 (including data available via WMS) is at

When you specify GIS data in a text file then you are using a delimited file format I designed. The full documentation for that delimited file format is at

Gmap4 homepage

The Gmap4 homepage has a FAQ, examples, quick start info (on the Help page) and more to quickly get you up to speed.

One of the articles on the Help page shows you how to use Gmap4 on your smartphone offline.

Gmap4 homepage:

Gmap4 default map of the world

This Gmap4 link does not have any parameters. It will display a world map:

Looking ahead - New features being developed

One new feature being developed will let you click/touch a GIS symbol you see on the map (campground, trail, etc) and a popup will appear with the attributes for that thing.

Another new feature will display aerials that are stored on GIS servers as "ImageServer" data. Some of these aerials might be a higher resolution that Google's aerials and/or taken when the leaves were off the trees. (Gmap4 can presently display "MapServer" tile data and tile data that is available via the open source WMS interface.)


Gmap4 is developed by Joseph Elfelt, Redmond, Washington State, USA.