Gmap4 - Enhanced Google Map viewer with topographic maps

Cartography, maps, navigation, GPS and more.
raven
Posts: 1531
Joined: May 28th, 2008, 10:03 pm

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by raven » March 13th, 2012, 5:54 pm

Does the iphone version turn on the phone's GPS? I rarely permit general location services because of the battery drain and the various pernicious ways those services can be used.

There is a more general question: Why do you default to the current location? Most of my uses for your program involve examining the properties of distant locations. One example is a discussion with a friend of her trip to Egypt, and the positions of the Sphinx and the Giza Pyramid relative to her hotel. I have never found a use for GPS while I have a good connection to the internet, and where a GPS might be useful to me, an internet connection is unlikely.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by Joseph Elfelt » March 13th, 2012, 7:04 pm

raven wrote:Does the iphone version turn on the phone's GPS? I rarely permit general location services because of the battery drain and the various pernicious ways those services can be used.

There is a more general question: Why do you default to the current location? Most of my uses for your program involve examining the properties of distant locations. One example is a discussion with a friend of her trip to Egypt, and the positions of the Sphinx and the Giza Pyramid relative to her hotel. I have never found a use for GPS while I have a good connection to the internet, and where a GPS might be useful to me, an internet connection is unlikely.
There is no iPhone version. There is only one version and it runs in most browsers, however the browser has to be online to the internet. If you are using the beta version and the browser is on your phone, then Gmap4 will automatically show you a different 'look' or 'skin' in order to make better use of that small screen.

Browser apps, including Gmap4, do not have any ability to turn on/off the phone's GPS.

By definition, geolocation (find me / my location) attempts to find your device on the face of the planet. It sounds like you might have more use for Gmap4's search feature.

When you click Menu ==> Find me (now called 'My location' in the beta version) then Gmap4 uses a feature of your browser to get your location. The location service used by your browser will likely use cell towers and any wi-ft hotspots. If you have wi-fi turned off, then the location service will only use cell towers. This initial location likely does not use your GPS even if it is on and might not be very accurate.

We know that when browser apps (like Gmap4) ask the browser for a lat/lng location, that location can be determined with some combo of cell towers (if any are in range), wi-fi hotspots (if any are in range and wi-fi is turned on in the device) and GPS (if the device has a GPS chip, and it is turned on, and it has a current almanac, and it can see 3 or more sats). If you think this is complex - well, you're right. And Gmap4 has almost no way to know which of those ingredients were used to produce the lat/lng the browsers send back to Gmap4. There is no documented way for a browser app to say: Get me the location from the GPS chip and ignore the cell towers and wifi spots. Nonetheless, there are some code improvements I can make to at least partially address this issue.

Yes, there is a 'standard' behind all this. But no standard is so simple that it cannot be interpreted various ways.

It turns out there are some tricks to doing 'geolocation' via a browser app and I know more than I did when I wrote that first version for Gmap4. My next task is to redo that code and I am looking for beta testers that have phones with GPS chips if anyone is interested.

raven
Posts: 1531
Joined: May 28th, 2008, 10:03 pm

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by raven » March 13th, 2012, 7:45 pm

You miss my point. I want the iphone skin for gmap4, but not that the map be centered on my location. My phone has all location services off. The cell phone company may be able to compute my location, but neither my phone's operating system nor any application is supposed to know. I have found to date no reason to use gmap4 in conjunction with my current position, so it would be at best a rare use.

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by Joseph Elfelt » March 13th, 2012, 8:10 pm

raven wrote:You miss my point. I want the iphone skin for gmap4, but not that the map be centered on my location. My phone has all location services off. The cell phone company may be able to compute my location, but neither my phone's operating system nor any application is supposed to know. I have found to date no reason to use gmap4 in conjunction with my current position, so it would be at best a rare use.
Oops - sorry.

The one and only way that Gmap4 knows anything about your current location is if you click Menu ==> Find me (or Menu ==> My location in the beta code)

If you launch Gmap4 without any URL parameters at all, then you get the default map. That map is centered at lat 0 lng 0. On a desktop size screen, the whole world is shown.
http://www.mappingsupport.com/p/gmap4.php

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by Joseph Elfelt » March 15th, 2012, 9:12 am

Raven - I owe you an apology.
I am starting to redo the 'Find me" code (called 'My location' in the beta) and you are right.
I had fo'rgotten exactly how my own code worked. :|
Presently, if you open the default Gmap4 map (http://www.mappingsupport.com/p/gmap4.php) with a phone then it will try to find your location.

I agree with you and I just took this out of my development code. Thank you for your good advice.

Even if you turn off your phone's GPS and wi-fi, your phone's browser can still find at least your general location via cell towers (assuming at least one tower is in range).

Joseph

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by Joseph Elfelt » March 31st, 2012, 12:11 pm

I just posted new Gmap4 beta code. This is version #068.
The main new thing is a re-write of the 'My location' feature. (Used to be called 'Find me').

Here is the beta page with (1) a link to open the beta Gmap4 code in your browser and (2) short background info and three tests you can do to help you understand more about how 'geolocation' works on mobile devices.

http://www.mappingsupport.com/p/gmap4_beta.html

User avatar
potato
Posts: 1211
Joined: October 10th, 2011, 9:16 pm
Location: my car
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by potato » April 16th, 2012, 11:14 am

Hi Joseph,

Thanks for your work on this... awesome resource, I use it all the time.

When I go to mappingsupport.com and click on the Gmap option, it always shows me a "Howson Creek trail" route. Here is the captured URL from that map:
http://www.mappingsupport.com/p/gmap4.p ... f&skin=off

Do I have some kind of cookie that is recalling this map every time? Or is it intentional that this trip is always shown at first? Or is it a mistake?

Thanks,
-Joe
self observing universe (main blog)
Joe hikes (PCT blog)
Laws of Nature (bandcamp)

Joseph Elfelt
Posts: 157
Joined: September 3rd, 2010, 10:24 am
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by Joseph Elfelt » April 16th, 2012, 11:27 am

I have a 2 level 'homepage'.

The top level is: http://www.mappingsupport.com/
If you click the Gmap4 link on that page then you go to the Gmap4 homepage: http://www.mappingsupport.com/p/gmap4.html

The Gmap4 homepage includes a 'live' map in the lower left corner. That map always displays a GPS track I collected while hiking on the Howson Creek trail.

An easy way to start Gmap4 on any device is to simply do a Google search for Gmap4. The Gmap4 homepage is the first hit. Open that homepage and then click the second line from the top which says "Start Gmap4". Gmap4 will start and display the default map of the world.

raven
Posts: 1531
Joined: May 28th, 2008, 10:03 pm

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by raven » April 16th, 2012, 11:35 am

Customizing your load map is a simple alternative. I use a Portland area road map view expanded toward Mt. Hood. I navigate to where I want detail and then shift views.

Set up the map you want on the screen, then on the Menu click on the Show Map URL. Then copy that URL and use it when starting Gmap.

User avatar
potato
Posts: 1211
Joined: October 10th, 2011, 9:16 pm
Location: my car
Contact:

Re: Gmap4 - Enhanced Google Map viewer with topographic maps

Post by potato » April 16th, 2012, 11:47 am

Thanks Joseph, I guess I never noticed that link. I always saw the Gmap4 homepage, said "Aha, a map!" and expanded that Howson Creek trail to fullscreen and moved around from there, somewhat annoyed that I always had to start at Howson Creek.

Thanks for the tip raven, I think I will do that. I know I can save a bookmark to any view of the map that I want, but I do my computing a few different places and making all my bookmarks the same is a chore.
self observing universe (main blog)
Joe hikes (PCT blog)
Laws of Nature (bandcamp)

Post Reply