Jump to content

Geocaching Map Enhancements


jri

Recommended Posts

I've uploaded v0.5.1 of my Geocaching Map Enhancements script to Userscripts.org

 

The aim of this little script is to add a little enjoyment to your Geocaching website experience B)

 

  • Adds lots of map types (Google, Bing, Ordnance Survey, Amapy, even street maps of London)
  • Adds a home button to get back to your own coordinates
  • Lets you refresh your browser session when all your finds stop showing up
  • Lets you see an old-fashioned list of caches around the area in the map
  • Adds a scale indicator that shows the width displayed on the map

 

The main advantage of this version over last week's is that it's now user-configurable (look for the cog icon). You can select which of the maps you want to show up in the pick-list, and change a few other settings. The script also integrates a lot better into the website's user interface.

 

This script should work with both Firefox and Chrome - probably Opera too although I've not tested it. There are installation instructions at the link above.

 

Any suggestions for more map types or other improvements welcome!

Link to comment

Thank you again for your hard work in to putting all of this together. This is great! :)

 

As you've asked for feedback for enhancements, I suppose if there was anything missing from the previous map version that I found useful it was the line scale on the map itself, which showed an arbitrary length (of a couple of centimetres on the screen) as representing the relative distance on the map in feet or meters (miles and km when you zoom out).

 

If that would be too difficult, then perhaps a configuration option to show the scale in miles as well (for those of us who are still imperial measurement minded!)

 

Mind you, what we have is pretty fabby! You're a star! I shall recommend it to anyone I know who does geocaching!

Link to comment

Thank you again for your hard work in to putting all of this together. This is great! :)

 

As you've asked for feedback for enhancements, I suppose if there was anything missing from the previous map version that I found useful it was the line scale on the map itself, which showed an arbitrary length (of a couple of centimetres on the screen) as representing the relative distance on the map in feet or meters (miles and km when you zoom out).

 

If that would be too difficult, then perhaps a configuration option to show the scale in miles as well (for those of us who are still imperial measurement minded!)

 

Mind you, what we have is pretty fabby! You're a star! I shall recommend it to anyone I know who does geocaching!

 

^^ pretty much this

Link to comment

Thanks for this - it's an amazing piece of work and makes cache-planning a joy again. Also it replaces the various temporary workaround scripts after the lights went out with the gc maps, so I only need one script for all the gc mapping bits now.

 

Really good - love the list of maps. Bing's aerial is much newer than Google's satellite (within the past 8 months at my home, whereas google's is about 8 years old!), and of course having proper OS maps /and/ the choice to amend the list, AND a one-click list of caches is brilliant.

 

Thank you!

Link to comment

This script should work with both Firefox and Chrome - probably Opera too although I've not tested it.

 

Tested with Opera and all I get on the map screen is a blank page, so it doesn't :( I have other machines running Opera at home and I'll see if it's just this one or a general Opera issue.

Link to comment

Sorry to keep clogging up the forums with updates, but there's another new version of the GME script.

 

Thanks to popular demand, in v0.5.2 I've added in a ruler-style scale, and figured out how to make it configurable to work in imperial measures (isn't that actually a downgrade? ;) ) The default map is also now configurable.

 

I did throw in terrain maps, but there's no option for hybrid maps - these are actually an overlay, rather than a map type in themselves, so would take rather more thought to implement. That said, if I figure out how to do it, it would bring the possibility of being able to display other overlay information, like traffic or weather data.

 

I've also updated the Firefox Mobile version to work with the beta release for Firefox mobile 11. The Firefox add-on seems to run fine both on my Asus Eee Transformer (Android 3.2, see screenshot below), and my HTC Desire (Android 2.2). That said, using it on the phone involves a lot of scrolling and rotating the screen to get the Geocaching Maps website to fit - bigger screens are definitely recommended! Unfortunately, last night's Groundspeak update didn't bring the promised fix to the bug that stops cache details popping up on mobile platforms. When that gets sorted, the mobile add-on will be even more useful, but for now it gives you the workaround of being able to pop up the text-based listing of caches for the area you are looking at on the map.

 

large.png?1330515610

 

Next on my to-do list is to see if I can make the script work on Opera. That won't happen for a few weeks yet, as I'm off on holiday. That and my wife says I should spend less time in front of the computer...

Link to comment

Next on my to-do list is to see if I can make the script work on Opera. That won't happen for a few weeks yet, as I'm off on holiday. That and my wife says I should spend less time in front of the computer...

 

How about you send her on holiday and you stay at home and do the script.... :anibad::lol::laughing:

Link to comment

heylp!?! please :)

 

I clicked the link above, clicked install and said yes I wanted to continue but got an error box 'Extension installation error. Attempting to downgrade extension'

 

I'm running Chrome (17.0.963.56 m) and Windows XP (no laughing at the back!)

 

I suspect I need to remove the previous script and reinstall the new one, but I've no idea where they are to remove! can anyone help please?

 

thanks :)

Link to comment

I clicked the link above, clicked install and said yes I wanted to continue but got an error box 'Extension installation error. Attempting to downgrade extension'

This happens with old versions of my script, before I figured out how Chrome treats version numbers (it treats anything it doesn't like the formatting of as v1.0).

 

I suspect I need to remove the previous script and reinstall the new one, but I've no idea where they are to remove! can anyone help please?

That's right. In Chrome, click on the spanner icon then choose Tools then Extensions from the menus. Geocaching Map Extensions should show up in the list, with a remove button next to it. After you've removed the old script, you should be able to install the new one straight away.

Link to comment

Another update to Geocaching Map Enhancements

 

Since Groundspeak have added a scale bar onto the Geocaching Map, I've removed the scale bar in the script. But there's also a more interesting feature been added: custom maps and overlays.

 

What this means is that as well as using the standard maps, and the extra ones that the script enables, you can add in extra sources to your heart's content. Click on the cog icon to configure, select "Add more maps", paste in a string of code, and hit "Add mapsource". It's as easy as that.

 

By default the new mapsources are used as basemaps that get added to the normal pick-list; although you can have lots in the list, you can only use one at a time. e.g. use the code below to add in 1950s New Popular Edition Ordnance Survey maps (only works in Great Britain):

 

{"alt":"OS NPE","tileUrl":"http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", "minZoom":6, "maxZoom": 15, "attribution": "OpenStreetMap NPE" }

 

But if you have a mapsource with transparent tiles, you can also add it as an overlay. Although it might slow things down, you can switch on several overlays at the same time, displaying different info. Here's an example that shows Northern Ireland's national nature reserves, overlaid over your normal map (only works in NI - try here!):

 

{"alt":"National Nature Reserves (NI)","tileUrl":"http://webservices.spatialni.gov.uk/arcgis/services/NIEA/NationalNatureReserves/MapServer/InspireViewService/ENG", "layers":"NationalNatureReserves", "format":"image/png", "transparent":true, "attribution":"data.gov.uk", "overlay":true}

 

So what other sources can you use? ...erm, well that's the tricky bit. There are instructions and a couple of examples in the script itself, but it would be great if there are some GIS ninjas out there that can suggest codes for interesting data sources. I can imagine it being useful for people in other countries that want to use local maps, or for accessing things like some of the MAGIC environmental datasets, to help find interesting features or avoid sensitive areas. Some sites that give pointers include the Neongeo wiki for basemaps or data.gov.uk and the Environment Agency for potential overlays.

 

For the techies, the code string uses JSON encoding, with the same parameters as Leaflet map layers. It supports Bing-style quadkey URLs, Google and TMS (inverted-y) x/y/z URLs, and WMS servers. Use {q} in the tileUrl template for quadkeys, and set the overlay parameter to true for overlays.

 

Enjoy!

Edited by jri
Link to comment

This script should work with both Firefox and Chrome - probably Opera too although I've not tested it.

 

Tested with Opera and all I get on the map screen is a blank page, so it doesn't :( I have other machines running Opera at home and I'll see if it's just this one or a general Opera issue.

 

I've finally got round to installing a copy of Opera on my laptop (v11.61 on WinXP), and was pleased to find v0.5.3 of the script worked for me without any tweaks :D (I've no idea why the previous version didn't :anicute:). To install GME in Opera, you have to go into Opera's settings to set a User JavaScript folder, then save a copy of the script in that folder (right click on the Install button at http://userscripts.org/scripts/show/109145 then save, rather than trying to install directly). Even more surprising, it seems to work on Opera Mobile too, on my Android tablet.

 

I've added the Opera installation instructions to the userscripts.org page. See here for more details of Opera's support for Greasemonkey scripts.

Link to comment

After newest update menu buttons have stopped to work. :huh:

(Chrome 16.0.912.63 m)

 

EDIT: It doesn't work only when the side bar (with filter options) is visible. When it's hidden it's OK.

 

Hmm... it's still working fine for me. I've got a later version of Chrome, but that shouldn't make too much difference. If you're still having the problem, since I can't see it, could you give me a few more details:

 

  • Which menu buttons do you mean? The ones added by GME, or part of the original web page? What did they used to do?
  • Are you using any other scripts that might be interfering? If you disable them, does it make a difference?
  • Do any errors show in the console? (to see this, press Ctrl-Shift-J in Chrome, then click on "Console").

Link to comment

First, I've checked this on other computer and it works fine. So the problem was/is with one particular laptop and I do not know the reason but because you ask I'll try to answer your question. I wander if it may be caused by firewall?

 

[*]Which menu buttons do you mean? The ones added by GME, or part of the original web page? What did they used to do?

[*]Are you using any other scripts that might be interfering? If you disable them, does it make a difference?

[*]Do any errors show in the console? (to see this, press Ctrl-Shift-J in Chrome, then click on "Console").

1. None of buttons worked. They did nothing.

2. I disabled all other scripts.

3. I can't check it now but I can do it tomorrow.

Link to comment
[*]Do any errors show in the console? (to see this, press Ctrl-Shift-J in Chrome, then click on "Console").

The result from console:

Viewport argument value "device-width;" for key "width" not recognized. Content ignored. default.aspx:6

Viewport argument value "1.0;" for key "initial-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "1.0;" for key "maximum-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "1.0;" for key "minimum-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "no;" for key "user-scalable" not recognized. Content ignored. default.aspx:6

740event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

Link to comment

This script should work with both Firefox and Chrome - probably Opera too although I've not tested it.

 

Tested with Opera and all I get on the map screen is a blank page, so it doesn't :( I have other machines running Opera at home and I'll see if it's just this one or a general Opera issue.

 

I've finally got round to installing a copy of Opera on my laptop (v11.61 on WinXP), and was pleased to find v0.5.3 of the script worked for me without any tweaks :D (I've no idea why the previous version didn't :anicute:). To install GME in Opera, you have to go into Opera's settings to set a User JavaScript folder, then save a copy of the script in that folder (right click on the Install button at http://userscripts.o...pts/show/109145 then save, rather than trying to install directly). Even more surprising, it seems to work on Opera Mobile too, on my Android tablet.

 

I've added the Opera installation instructions to the userscripts.org page. See here for more details of Opera's support for Greasemonkey scripts.

 

 

Just to confirm it works :)

 

 

 

...and I love you :laughing:

 

Link to comment
[*]Do any errors show in the console? (to see this, press Ctrl-Shift-J in Chrome, then click on "Console").

The result from console:

Viewport argument value "device-width;" for key "width" not recognized. Content ignored. default.aspx:6

Viewport argument value "1.0;" for key "initial-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "1.0;" for key "maximum-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "1.0;" for key "minimum-scale" was truncated to its numeric prefix. default.aspx:6

Viewport argument value "no;" for key "user-scalable" not recognized. Content ignored. default.aspx:6

740event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

 

I'm still not sure I really understand the problem you are seeing - all those errors are "normal" and have nothing to do with GME :blink:

 

However, I have discovered a bug in GME that might have caused the script to fail if you added custom overlays and maps, then set one of the custom maps as the default. I've fixed this in v0.5.4 of the script.

 

There is also a totally unrelated problem that was stopping some people see the popup cache information. See this forum thread.

 

If neither of these solve your problem, you'll have to give me a more detailed description of what you are expecting to happen, that isn't.

Link to comment

GME Version 0.5.4 is here!

 

So what does it do now?

 

  • Better support for tablets and other GPS-enabled devices: I've improved the "Find My Location" widget so that it will try for up to a minute to get a fix - long enough for the GPS to lock on in most tablets. Without GME it times-out after only 10s, often too quick to get a GPS fix from a cold start. Another problem with using GPS location was that the map used to automatically zoom in to match the location accuracy. If you had a very precise fix, you ended up with a map only a few metres wide, and couldn't see anything helpful. GME stops this happening. "FollowMe" mode can also be set using the cog icon. In this mode, when you click the location widget, the map automatically pans around when you move. Click on the widget again to stop following. GME works on tablets that either run Firefox Mobile or Opera Mobile (but not Opera Mini).
  • New info tool: If you click on the "i" widget, you can then click anywhere on the map to see information about that location. At the moment you can see Geograph pictures (works in the British Isles and some of Germany), look it up on Wikimapia.org, get directions from your home coordinates (if you're logged in), or see the place on Google Streetview. NB Streetview doesn't work everywhere - generally it needs to be a location near a Street! :laughing: If Google haven't got Streetview pictures for that point, you'll probably see a map of North America.
  • Bugfixes: Fixed some bugs where the map could be zoomed in or out too far, and also some problems with adding custom maps or overlays and then setting them as the default view.

I've also got some suggestions for new custom map layers you might want to try out. To use them, click on the cog icon to configure GME, choose "Add more maps", paste one of the codes below into the "Mapsource" box, then hit "Add mapsource".

 

  • OSM Transport - like the standard OpenStreetMaps mapsource, but also shows public transport options like bus stops, railway stations, etc.
    {"alt":"OSM Transport", "tileUrl":"http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png","maxZoom":18,"attribution":"Maps from <a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and contributors <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\">CC-BY-SA</a>"}


  • Wikimapia.org - a free, community-built map. It doesn't look so great in my area, but in some places where there is strong community input (e.g. India), it is much more accurate than the mainstream mapsources.
    {"alt":"Wikimapia", "tileUrl":"http://i{s4}.wikimapia.org/?x={x}&y={y}&zoom={z}","maxZoom":21,"attribution":"Maps from <a href=\"http://wikimapia.org/\">Wikimapia.org</a> and contributors <a href=\"http://creativecommons.org/licenses/by-nc-sa/3.0/\">CC-BY-NC-SA</a>"}


  • New Popular Edition - out-of-copyright Ordnance Survey maps from around the 1950s.
    {"alt":"OS NPE (GB only)","tileUrl":"http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", "minZoom":6, "maxZoom": 15, "attribution": "Ordnance Survey NPE maps from <a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and contributors <a href=\"http://creativecommons.org/licenses/by-nc/2.5/\">CC-BY-NC</a>" }


 

For full installation instructions, and to get the latest version, go to http://userscripts.org/scripts/show/109145

Edited by jri
Link to comment

I've uploaded v0.5.1 of my Geocaching Map Enhancements script to Userscripts.org

 

The aim of this little script is to add a little enjoyment to your Geocaching website experience B)

 

  • Adds lots of map types (Google, Bing, Ordnance Survey, Amapy, even street maps of London)
  • Adds a home button to get back to your own coordinates
  • Lets you refresh your browser session when all your finds stop showing up
  • Lets you see an old-fashioned list of caches around the area in the map
  • Adds a scale indicator that shows the width displayed on the map

 

The main advantage of this version over last week's is that it's now user-configurable (look for the cog icon). You can select which of the maps you want to show up in the pick-list, and change a few other settings. The script also integrates a lot better into the website's user interface.

 

This script should work with both Firefox and Chrome - probably Opera too although I've not tested it. There are installation instructions at the link above.

 

Any suggestions for more map types or other improvements welcome!

I installed scriptish for seamonkey and your add-on works with it also. Many thanks for your efforts. I did notice something that happens when using Google maps and zooming in. When I get down to 563M for total map width it still shows the cache, but when I zoom one step farther which would be 282M the cache disappears. It does it in both Firefox and in Seamonkey. Is this a bug or is it something you know about.

Link to comment

I installed scriptish for seamonkey and your add-on works with it also. Many thanks for your efforts. I did notice something that happens when using Google maps and zooming in. When I get down to 563M for total map width it still shows the cache, but when I zoom one step farther which would be 282M the cache disappears. It does it in both Firefox and in Seamonkey. Is this a bug or is it something you know about.

 

Erm, it's a bug :anicute:

 

Or, as I like to think of it, a limitation of Geocaching.com :P

 

The reason the cache icons disappear is that you can now zoom some base maps in further than the geocache overlay.

 

Different map sources work at different zoom levels. Some, like Google, work from Level 0 (where the world fits several times across the screen) to Level 22 (approx 1cm:1m). Other maps limit how far you can zoom in or out. In particular, the OSM family of maps can only zoom in to Level 18. The cache icons you see on the map are really just a layer of map tiles, shown as a transparent overlay. As Geocaching.com uses base maps that only go to Level 18, there's no point in them maintaining geocache tiles for higher zoom levels. There are 4 times more tiles at each level, so it would be a lot of extra effort to keep them updated.

 

When I fixed the script to stop zooming beyond the limits of the base maps, I forgot it might mean that the more detailed map sources would let you zoom in too far for the geocache layer. I've got several options to fix the issue:

 

  • Stop any map from zooming beyond Level 18, so you can always see caches, but might not get the ultimate detail the map can provide.
  • Allow zooming as far as the basemap goes, for the people who want a really large scale view.
  • Allow deep zooming, but pop up an alert when you go beyond the level that maps are visible.

Any thoughts?

Link to comment

I installed scriptish for seamonkey and your add-on works with it also. Many thanks for your efforts. I did notice something that happens when using Google maps and zooming in. When I get down to 563M for total map width it still shows the cache, but when I zoom one step farther which would be 282M the cache disappears. It does it in both Firefox and in Seamonkey. Is this a bug or is it something you know about.

 

Erm, it's a bug :anicute:

 

Or, as I like to think of it, a limitation of Geocaching.com :P

 

The reason the cache icons disappear is that you can now zoom some base maps in further than the geocache overlay.

 

Different map sources work at different zoom levels. Some, like Google, work from Level 0 (where the world fits several times across the screen) to Level 22 (approx 1cm:1m). Other maps limit how far you can zoom in or out. In particular, the OSM family of maps can only zoom in to Level 18. The cache icons you see on the map are really just a layer of map tiles, shown as a transparent overlay. As Geocaching.com uses base maps that only go to Level 18, there's no point in them maintaining geocache tiles for higher zoom levels. There are 4 times more tiles at each level, so it would be a lot of extra effort to keep them updated.

 

When I fixed the script to stop zooming beyond the limits of the base maps, I forgot it might mean that the more detailed map sources would let you zoom in too far for the geocache layer. I've got several options to fix the issue:

 

  • Stop any map from zooming beyond Level 18, so you can always see caches, but might not get the ultimate detail the map can provide.
  • Allow zooming as far as the basemap goes, for the people who want a really large scale view.
  • Allow deep zooming, but pop up an alert when you go beyond the level that maps are visible.

Any thoughts?

My vote would be to leave it as is, once I picture where the cache is sometimes I would still like to zoom closer. I am going to save your explanation and if I see anyone bringing up the question again I will have an answer I can paste into a reply. I think eventually the word will get around. The way it is now is still 100% better then it was.

Edited by DonB
Link to comment

I can't see the config buttons in Firefox 11, although they are available in Chrome.

 

There was a bug in v0.5.3 to do with setting the default map that might have stopped the GME widget appearing, if you had added an overlay. If you upgrade to the latest version it should fix that problem.

 

If you've already got v0.5.4, you'll have to give me more info for a diagnosis. Do any error messages appear in the Firefox console? Are you using any other userscripts that work on the same page?

Link to comment

I can't see the config buttons in Firefox 11, although they are available in Chrome.

 

There was a bug in v0.5.3 to do with setting the default map that might have stopped the GME widget appearing, if you had added an overlay. If you upgrade to the latest version it should fix that problem.

 

If you've already got v0.5.4, you'll have to give me more info for a diagnosis. Do any error messages appear in the Firefox console? Are you using any other userscripts that work on the same page?

 

Since I have the problem on my home and work computers, I decided it had to be how I had setup FireFox.

 

Playing around with scripts and addons, I have discovered it is the Abine TACO privacy addon which is interfering with your script. I've just disabled it and I get the icons and the ability to change the settings.

 

I probably don't need to run TACO on the site, but I changed the map settings and then enabled it again. I lose the config buttons, but at least I keep my settings.

 

Problem solved (for me anyway).

Link to comment

Oops upgraded last week but its stopped working today, prob on GS's end? .

There was some website downtime earlier today, which might have caused the problem. It seems to be back to normal for me now...

 

In Chrome I can not get the lower left icon to work (settings, home, etc)

They're still working for me, so without more details, all I can suggest is to check you have the latest version of the script from userscripts.org, and read the previous posts in this thread to see if they give you any hints.

 

Now...can you fix the sat view on the GC App on my iphone??? :)

Only if someone buys me a Mac Pro to do the development on! :lol:

Link to comment

Today's Geocaching.com website update has removed the Google Maps API from cache pages (the "Dynamic Maps" feature) and replaced it with the Leaflet API and Mapquest. On the down side, this temporarily breaks GME and means no more satellite or OS maps on cache pages. :(

 

On the up side, it will now be much easier for a future version of GME to add in a similar range of maps to what is available on the full-size maps page. :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...