Groundspeak Forums: Geocaching Map Enhancements - Groundspeak Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Geocaching Map Enhancements With NZ topo maps

#1 User is offline   jri 

  • Scriptwright
  • Group: +Premium Members
  • Posts: 178
  • Joined: 19-November 05

Posted 29 April 2012 - 05:23 AM

A while ago I wrote a userscript called Geocaching Map Enhancements so that I could use British Ordnance Survey maps with the Geocaching Maps site, but the script is user-configurable, and can also add in other maps from different sources. It also adds a load of other helpful features to the site. Someone recently suggested the free topo maps from Land Information New Zealand, and here's the result:

Posted Image


GME is tested with the Firefox, Opera, Chrome and the Android versions of Firefox Mobile and Opera Mobile. Here's how to get it working:

  • Install GME from userscripts.org (full installation instructions on that page).
  • Go to the LINZ Data Service and register for a free user account.
  • Logged-in to LINZ, go to the Dashboard, then 'API & Web Services', and create a key for 'OGC Web Services'.
  • Make a copy of your key (the 32-character string of numbers and letters).
  • Go to Geocaching Maps and click on the GME configuration icon (the gear).
  • Click on 'Add more maps' and paste one of the codes below into the 'Mapsource' box, replacing 'MY_PRIVATE_KEY' with the key you copied at step 4.
  • Click on 'Add mapsource'.
  • Repeat 6 and 7 if you want to add in the other maps, then hit 'OK'.
  • The LINZ maps should now show up in the pick list on the geocaching website.

You can use any of the following map sources:

  • Topo50 1:50 000 scale map imagery
{"alt":"NZ Topo50", "tileUrl":"http://wms.data.linz.govt.nz/MY_PRIVATE_KEY/r/wms", "layers":"x767", "maxZoom":18, "format":"image/png", "attribution":"Mapping by <a href=\"http://data.linz.govt.nz/\">LINZ</a>, <a href=\"http://creativecommons.org/licenses/by/3.0/nz/\">CC-BY</a>"}

  • Topo250 1:250 000 scale map imagery
{"alt":"NZ Topo250", "tileUrl":"http://wms.data.linz.govt.nz/MY_PRIVATE_KEY/r/wms", "layers":"x798", "maxZoom":16, "format":"image/png", "attribution":"Mapping by <a href=\"http://data.linz.govt.nz/\">LINZ</a>, <a href=\"http://creativecommons.org/licenses/by/3.0/nz/\">CC-BY</a>"}

  • Aerial photos taken between 1994 and 2005. NB quality and coverage vary across the country.
{"alt":"NZ Aerial", "tileUrl":"http://wms.data.linz.govt.nz/MY_PRIVATE_KEY/r/wms", "layers":"x1022,x1048,x1024,x1021,x1033,x1032,x1034,x1031,x1013", "maxZoom":25, "format":"image/jpeg", "attribution":"Orthophotos by <a href=\"http://data.linz.govt.nz/\">LINZ</a>, <a href=\"http://creativecommons.org/licenses/by/3.0/nz/\">CC-BY</a>"}

Hope someone finds this helpful!

#2 User is offline   Huntleigh 

  • EnZed
  • Group: +Premium Members
  • Posts: 449
  • Joined: 05-September 09

Posted 02 May 2012 - 04:58 PM

Sounds fabulous — can't wait to get home to have a play.

I did look at your script earlier on and decided it wasn't to be that much use for me — the Ordanance Survey maps being the main selling point.

Well done jri

#3 User is offline   Hurricane Luke 

  • Premium Member
  • Group: +Premium Members
  • Posts: 63
  • Joined: 11-June 10

Posted 25 May 2012 - 03:44 PM

Hi Jri,
Thanks for that! Having the NZTopo50 maps is really neat - well, it was really neat! Geocaching has re-broken the map system by adding Google Maps back in... is there any chance you could recreate 'Google Maps Enhancements' to deal with the new mapping system?

Cheers,
Luke.

#4 User is offline   jri 

  • Scriptwright
  • Group: +Premium Members
  • Posts: 178
  • Joined: 19-November 05

Posted 26 May 2012 - 03:08 AM

View PostHurricane Luke, on 25 May 2012 - 03:44 PM, said:

Thanks for that! Having the NZTopo50 maps is really neat - well, it was really neat! Geocaching has re-broken the map system by adding Google Maps back in... is there any chance you could recreate 'Google Maps Enhancements' to deal with the new mapping system?


Hi Luke - glad you liked the script.

As far as I know, it should still work OK, but you need to select Leaflet Maps first. It doesn't work with Google Maps. There's a "Set Map Preference" button to do this at the bottom of the pop-out panel on the left of the map (click the thin grey bar at the left edge of the screen if it's not visible).

Thanks to the changes there's currently a slight glitch in GME (the script's configuration screen appears in the map selection popup...) but I will update the script to avoid that later this weekend.

Hope that helps!

#5 User is offline   jri 

  • Scriptwright
  • Group: +Premium Members
  • Posts: 178
  • Joined: 19-November 05

Posted 03 June 2012 - 12:40 PM

View Postjri, on 26 May 2012 - 03:08 AM, said:

Thanks to the changes there's currently a slight glitch in GME (the script's configuration screen appears in the map selection popup...) but I will update the script to avoid that later this weekend.


Version 0.5.10 of GME should now fix the bugs introduced by the recent updates to Geocaching.com!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic