Mountain Project Logo

Gmap4 = View topos/aerials *offline* and your geolocation

Original Post
Joseph Elfelt · · Unknown Hometown · Joined Sep 2010 · Points: 0

I have posted here before about Gmap4 which is an enhanced Google map viewer that I developed. Up until this summer I believed that Gmap4 would not work if your mobile browser was offline.

I was wrong.

If you follow a few simple instructions, many (but not all) of the Gmap4 features will work just fine on a smartphone, tablet or other mobile device when you are offline. Among other things, when you are offline you can:

  • Look at high resolution topo maps (t4 Topo High)
  • Look at Google aerials
  • Look at other basemaps
  • Look at GIS overlays
  • Turn on the geolocation feature (Menu ==> My location) and see the map become centered where you are standing
  • Move and watch the location symbol follow you and the map automatically move as needed
  • Touch the location symbol and see your coordinates in the current coordinate format
  • Change the coordinate format
  • Turn on/off a UTM grid
  • Turn on/off a USNG grid

Yes, you can do all of the above while the browser in your smartphone or tablet is offline. Now let’s pop the hood and see how this works.

Any map you see with Gmap4 consists of a bunch of small image files called “tiles” that are stitched together to cover your screen. When you look at a map while you are online, a copy of each image file is saved in the browser’s cache. If you keep the browser tab open that has the Gmap4 map, then you can then go offline and still pan the map over the area for which there are map tiles in the browser’s cache. If you pan too far, the screen will be white.

To read plain English instructions that I guarantee you will understand (I don’t know how to write computer babble-speak) please visit the Gmap4 Help page and download the pdf file “How To Use Gmap4 Offline”.
Help page: mappingsupport.com/p/gmap4_…

From the Help page you can also find the FAQ, examples, a Quick Start guide (also on the Help page) and more.

Gmap4 default map: mappingsupport.com/p/gmap4.php

Joseph, the Gmap4 guy
Andrew L · · Austin, TX · Joined Aug 2014 · Points: 0

Just as a warning: don't rely on this entirely.

At least in iOS, the OS will periodically kill tabs and applications that are in the background. So let's say you open up this and then switch over to the MP app to check some routes. Opening up the MP app causes the OS to free up some "unused" memory, which also happens to be the pages you left open. If you go back to Mobile Safari or Chrome or whatever, you may find that your browser tries to refetch those pages, but that won't work since you're offline.

This may have changed since I was really involved with iOS development, but I haven't heard anything about it. I think it just became less of an issue when iPhones started coming out with more memory.

As a backup, with the official Google Maps app for iOS, you can do a long-tap to save a map for offline viewing.

While I have no personal experience, I imagine that Android works similarly.

Edit: Cleaned up some wording. FWIW, I'm a software engineer who primarily does web development, though I also have some experience in iOS development.

Joseph Elfelt · · Unknown Hometown · Joined Sep 2010 · Points: 0

Thanks for the insight Andrew.

As I hear from others with experience developing mobile apps I will update the pdf documentation with suggested 'best practices' for using Gmap4 offline.

One suggestion already in that pdf is if you use Gmap4 to save some map tiles for offline viewing and then want to do any online browsing, it is likely a good idea to use a different browser.

Morgan Patterson · · NH · Joined Oct 2009 · Points: 8,960

How does your app handle GIS layers, like LiDAR layers that consist of immense amount of data?

LiDAR Layers for CT

Joseph Elfelt · · Unknown Hometown · Joined Sep 2010 · Points: 0
Morgan Patterson wrote:How does your app handle GIS layers, like LiDAR layers that consist of immense amount of data? LiDAR Layers for CT
Looks to me like the CT lidar stuff is hosted at:
ctecoapp3.uconn.edu/ArcGIS/…

Data that is hosted on GIS servers as "MapServer" stuff is delivered to Gmap4 as tiles exactly like the topo maps, google aerials, etc are delivered as tiles.

A tile is a tile is a tile.

If you use Gmap4 in the browser on your smartphone/tablet to view map tiles that have lidar data (or any other kind of data such as topo maps, aerials, etc, etc) a copy of those tiles is saved in the browser's cache. You can then go offline and continue to view all the tiles (including the lidar ones) that are in the browser's cache.

To see how to display MapServer data with Gmap4 please see:
mappingsupport.com/p/gmap4_…

I tried to make a link to display some CT lidar data but could not get it to work.

Here is a Gmap4 link displaying lidar data for a random spot in Polk County, MN.
mappingsupport.com/p/gmap4.…
Morgan Patterson · · NH · Joined Oct 2009 · Points: 8,960

Right on Joseph! This is neat thanks dude!

Guideline #1: Don't be a jerk.

General Climbing
Post a Reply to "Gmap4 = View topos/aerials *offline* and your g…"

Log In to Reply
Welcome

Join the Community

Create your FREE account today!
Already have an account? Login to close this notice.

Get Started