Jump to content

Geocaching Map Enhancements


jri
Followers 46

Recommended Posts

A big self congratulatory pat on the back for all those of you who know how to edit the user script. Anyone care to gizza clue???

 

1) Top right hand corner - click on the little arrow by the monkey.

 

2) Click manage user scripts

 

3) Click options on the Geocaching map enhancements

 

4) Click on the map script

 

5) Click edit this user script

 

6 Edit as per the instructions in the jri post

 

7) Click File then save

 

Should then work.

 

Nb for some reason I have several map scripts and ended up editing them all before it worked.

thank you for the above walk through it made it very easy to do

just for any one else to help them search for the line in the script. the line number that you need to find is #1141 and the number to change is #1142

Edited by martin&lindabryn
Link to comment

Hi Team Airtomoreira,

 

If you are using Firefox then click Tools on the top menu bar, click "Add-ons".

The little monkey should be on the left marked as "User Scripts".

Scroll down to "Geocaching Map Enhancements 0.6.4"

Click "Options"

Click "Edit" this user script

 

Edit it as above.

 

Regards

Bernard

 

Sorry just saw you are on Google Chrome.

You could try clicking on the little Three Bars symbol at top right "Customize and Control Google Chrome"

Click "Tools" then "Extensions" see if the monkey is there.

Edited by BCNorwich
Link to comment

Those Firefox folks use a script manager, Greasemonkey, to do the hard work. On Chrome, the scripts are handled internally. This means you need to edit the script directly, then re-load it.

 

Go to the download page for GME, right-click on the green "Install" button and select "Save link as.." - save the file to a location of your choice (you've probably had to do this before, to install the extension in the first place).

 

Once downloaded (a second or two) go to the location where you saved the file - it will be called 109145.user.js. RIGHT-click on it, and select "Open with..". Browse to Notepad, or Wordpad, or another text editor to open the file with.

 

Once open, look for the line starting:

function extendLeaflet() {\

then change the line below it:

if( L.version >= 0.5 ) {\

to

if( true ) {\

 

Save the file.

 

Open Chrome, select Settings | Extensions. Drag the modified 109145.user.js onto the extensions page, as you no doubt did to install the script originally. This will update the currently installed script with the modified version, and everything should then work as it did before.

Link to comment

This is what I have in the script.

 

extendLeaflet();\

window.setTimeout(load,500);',

'} else {\

if(load_count < 60) {\

window.setTimeout(checkAPI,1000);\

load_count++;\

log("Waiting for API to load: "+load_count+"...");\

}\

 

Any help as to what I should change? It seems different to everyone else!

Edited by The Growler
Link to comment

Hi folks

 

I'm trying to do this tweak so I can get OS maps back in Chrome, but I'm having the same trouble as Growler & can't find the lines to change. NB I'm definitely not a scripting guru. So far I've found the script file from where I downloaded it months ago, and searched for the text "extendleaflet". That finds two instances, neither of which seem to relate to the line I'm supposed to change, as follows:

 

1st instance:

quote

if(typeof L === "object") {\

GME_extendLeaflet();\

window.setTimeout(GME_load,1000);\

} else {\

unquote

 

2nd instance:

quote

function GME_extendLeaflet() {\

L.QuadkeyLayer = L.TileLayer.extend({\

tile2quad: function(x, y, z) {\

unquote

 

In neither case does the next line correspond to the one I'm supposed to edit. All suggestions gratefully received, thanks.

Link to comment

Folks

 

Ignore my previous question, I now see that I was looking at the original download from Aug 12 and the script has updated (probably several times) since then so I can now see the latest version that's actually running, which does indeed include the line I'm supposed to look for. Then followed simplysup's instructions & I now have OS maps back, so huge thanks for that. Have left the previous post in case it helps anyone else.

 

I notice that that method installs GME directly rather than through Tampermonkey (which I've now removed, it wasn't doing anything else), does that have any implications for managing GME in future, eg do I still get the auto-updates that seem to have been happening in the background without me knowing ?

Link to comment

A big self congratulatory pat on the back for all those of you who know how to edit the user script. Anyone care to gizza clue???

 

1) Top right hand corner - click on the little arrow by the monkey.

 

2) Click manage user scripts

 

3) Click options on the Geocaching map enhancements

 

4) Click on the map script

 

5) Click edit this user script

 

6 Edit as per the instructions in the jri post

 

7) Click File then save

 

Should then work.

 

Nb for some reason I have several map scripts and ended up editing them all before it worked.

thank you for the above walk through it made it very easy to do

just for any one else to help them search for the line in the script. the line number that you need to find is #1141 and the number to change is #1142

Link to comment

I don't know if it is linked, but I can't click on any geocaches, regardless of which map I choose to use :huh:

 

OS maps display fine though :smile:

 

 

 

Do you have a hand instead of an arrow if so just hover for a while and it should change to an arrow then the cache name will come up eventually :mad: Geocaching site has gone very, very slow :blink:

Edited by Hawardenleaders
Link to comment

I've had a chance to get a better look at the changes Groundspeak made to the site on Tuesday night, and started fixing GME to work around them. I've come across three main changes so far:

  1. Updating the Leaflet API version. This broke display of certain types of map, including the OS maps, but will hopefully be better once I've got the script working with it properly.
  2. Changing the UTFGrid handling code. This is the bit that tells the browser when the mouse is hovering over a geocache icon. Changing it broke cache labelling.
  3. Removing the JQuery MobileUI library. This library handles the user interface for the config screens. I'm not sure why it was there in the first place (it didn't seem to be used by the website), but taking it away has caused lots of formatting problems for GME.

I think I've fixed the first two problems, and if you want to test my code, you can install a temporary version from this link: http://geo.inge.org....cements.user.js

 

NB. I've not done much testing on this, so it may be full of hideous bugs. In particular, the configuration screen won't be working, and there will be various other formatting issues.

 

I'm also pondering whether there's an easy way for GME to give you access to all the new map types that are now available. That said, they're mainly just re-renderings of OpenStreetMap data, and not all of them work in the UK anyway...

Link to comment

Can someone please help.

I can read the text.

I can follow instruction.

I have no idea what any of it means.

I'm using a mac and my lines have no numbers.

The closet to what was mentioned previous is this...

function GME_checkAPI() {\

if(typeof L === "object") {\

GME_extendLeaflet();\

window.setTimeout(GME_load,1000);\

} else {\

if(GME_load_count < 60) {\

GME_load_count++;\

window.setTimeout(GME_checkAPI,1000);\

}\

 

...am I close?

Link to comment

Can someone please help.

I can read the text.

I can follow instruction.

I have no idea what any of it means.

I'm using a mac and my lines have no numbers.

The closet to what was mentioned previous is this...

function GME_checkAPI() {\

if(typeof L === "object") {\

GME_extendLeaflet();\

window.setTimeout(GME_load,1000);\

} else {\

if(GME_load_count < 60) {\

GME_load_count++;\

window.setTimeout(GME_checkAPI,1000);\

}\

 

...am I close?

 

Don't think so, it looks like you're using an old version of the script (like TheCelts in posts 261 & 262 above), and the code for that version is different to the current version.

Link to comment

I've had a chance to get a better look at the changes Groundspeak made to the site on Tuesday night, and started fixing GME to work around them. I've come across three main changes so far:

  1. Updating the Leaflet API version. This broke display of certain types of map, including the OS maps, but will hopefully be better once I've got the script working with it properly.
  2. Changing the UTFGrid handling code. This is the bit that tells the browser when the mouse is hovering over a geocache icon. Changing it broke cache labelling.
  3. Removing the JQuery MobileUI library. This library handles the user interface for the config screens. I'm not sure why it was there in the first place (it didn't seem to be used by the website), but taking it away has caused lots of formatting problems for GME.

I think I've fixed the first two problems, and if you want to test my code, you can install a temporary version from this link: http://geo.inge.org....cements.user.js

 

NB. I've not done much testing on this, so it may be full of hideous bugs. In particular, the configuration screen won't be working, and there will be various other formatting issues.

 

I've updated the test version at the link above. The config menu still doesn't work, but it looks better than last night's effort!

 

Unfortunately I've not got much time for programming at the moment, so I'm concentrating on fixing the script rather than replying to the messages here. It's great to see all the votes of thanks for the though, and the effort people are putting it in to helping each other get it working. We'll make programmers of you yet! However, now that I've got a partially working version, if you can't wait for a full update, my advice is not to edit the script yourself, but to install the latest temporary script from the link above. You should follow the installation instructions at http://geo.inge.org.uk/gme.htm but use the link above instead of the install button on the userscripts.org page.

Link to comment

I've started to get an error message when trying to 'Install' the script from userscript.org using Chrome.

 

It says: Apps extensions and user scripts cannot be added from this website OK

 

That's been the case for a while, since Google tightened up on extensions not listed in their store. See here for workarounds.

Link to comment

I have a minor problem that I hope someone can help me with.

I like to save my track and then use the facility in GME to drag it onto the map and see where I've been.

However it seems that all GPX tracks aren't created equal. The track from EasyGPS or Gartrip (my old favourite) don't work when dragged to the map. Nothing happens.

If I open and re-save in another program (a track editor) it works fine. I tried using GPSBabel to convert GPX to GPX but no joy there either.

Can anybody explain please?

Link to comment

Hi

 

I have edited the script on GME and have saved it on my lap top. How do i install the edited file please?

 

Thanks

 

Paul

 

It depends on your browser:-

 

For Chrome follow the link in the post by simplysup immediately before your original post to get instructions.

 

With Firefox it is easier to install it from the website and then edit the script that is installed within Firefox

Link to comment

I have a minor problem that I hope someone can help me with.

I like to save my track and then use the facility in GME to drag it onto the map and see where I've been.

However it seems that all GPX tracks aren't created equal. The track from EasyGPS or Gartrip (my old favourite) don't work when dragged to the map. Nothing happens.

If I open and re-save in another program (a track editor) it works fine. I tried using GPSBabel to convert GPX to GPX but no joy there either.

Can anybody explain please?

 

If you send me a copy of one of your (short!) tracks, I can have a look to see what the problem is. You can message me through my geocaching profile - open the GPX file in Notepad or a similar text editor, and cut'n'paste the contents into the message. If it's a fairly simple problem, I might be able to fix it in the next version of GME.

Link to comment

I have edited the script on GME and have saved it on my lap top. How do i install the edited file please?

 

In most browsers you need to save the new script over the old one (wherever that is). That depends on what browser you are using, and possibly also what operating system and plugins you have got. In Chrome, you need to re-install the script file, if you had previously installed it as an extension rather than using a script manager.

 

It's much easier just to install my work-in-progress version of GME using the link and instructions in my post from the 22nd. Plus more of the script will be working!

Link to comment

I've started to get an error message when trying to 'Install' the script from userscript.org using Chrome.

 

It says: Apps extensions and user scripts cannot be added from this website OK

 

That's been the case for a while, since Google tightened up on extensions not listed in their store. See here for workarounds.

Thanks :) working now.
Link to comment

I've had a chance to get a better look at the changes Groundspeak made to the site on Tuesday night, and started fixing GME to work around them. I've come across three main changes so far:

  1. Updating the Leaflet API version. This broke display of certain types of map, including the OS maps, but will hopefully be better once I've got the script working with it properly.
  2. Changing the UTFGrid handling code. This is the bit that tells the browser when the mouse is hovering over a geocache icon. Changing it broke cache labelling.
  3. Removing the JQuery MobileUI library. This library handles the user interface for the config screens. I'm not sure why it was there in the first place (it didn't seem to be used by the website), but taking it away has caused lots of formatting problems for GME.

I think I've fixed the first two problems, and if you want to test my code, you can install a temporary version from this link: http://geo.inge.org....cements.user.js

 

NB. I've not done much testing on this, so it may be full of hideous bugs. In particular, the configuration screen won't be working, and there will be various other formatting issues.

 

I've updated the test version at the link above. The config menu still doesn't work, but it looks better than last night's effort!

 

Unfortunately I've not got much time for programming at the moment, so I'm concentrating on fixing the script rather than replying to the messages here. It's great to see all the votes of thanks for the though, and the effort people are putting it in to helping each other get it working. We'll make programmers of you yet! However, now that I've got a partially working version, if you can't wait for a full update, my advice is not to edit the script yourself, but to install the latest temporary script from the link above. You should follow the installation instructions at http://geo.inge.org.uk/gme.htm but use the link above instead of the install button on the userscripts.org page.

Link to comment

Just to offer my heartfelt thanks to jri for both developing and now fixing this wonderful facility. I had come to rely heavily on it when planning caching trips and when it stopped working a couple of weeks ago I was desolate. I have now followed the link and GME is working again. I hold my breath every time I click on OS, fearing it will have gone again. Keep up the good work, you are very much appreciated.

Link to comment

Just updated the work-in-progress version at http://geo.inge.org.uk/GeocachingMapEnhancements.user.js

 

The configuration functions should now (mostly) be working, but still don't quite look right...

 

Sorry to be a bit dim here, but how do I actually install that work-in-progress version ? I'm using Chrome, so clicking on the link simply opens a new tab with a message that I can't install scripts from that page, and when I OK that the tab closes. Is there some way I can download the script and drag it into the Chrome extensions page as per other instructions in this thread ?

 

Thanks - it's a great product, and I for one am really glad you're working away at it !

Link to comment

Just updated the work-in-progress version at http://geo.inge.org.uk/GeocachingMapEnhancements.user.js

 

The configuration functions should now (mostly) be working, but still don't quite look right...

 

Sorry to be a bit dim here, but how do I actually install that work-in-progress version ? I'm using Chrome, so clicking on the link simply opens a new tab with a message that I can't install scripts from that page, and when I OK that the tab closes. Is there some way I can download the script and drag it into the Chrome extensions page as per other instructions in this thread ?

 

Thanks - it's a great product, and I for one am really glad you're working away at it !

Had the same problem myself a couple of days ago. Solution here
Link to comment

 

Had the same problem myself a couple of days ago. Solution here

 

Er, no, sorry, don't think that's it. That allows you to install the version published on the Userscripts page, which seems to be 0.6.4, and requires manual editting to get the OS maps back. I've already done that. What I'm after is jri's work-in-progress version, which ought to be accessible via his link, but in Chrome that link just produces the "Can't install scripts from here" warning.

Link to comment

Had the same problem myself a couple of days ago. Solution here

 

Er, no, sorry, don't think that's it. That allows you to install the version published on the Userscripts page, which seems to be 0.6.4, and requires manual editting to get the OS maps back. I've already done that. What I'm after is jri's work-in-progress version, which ought to be accessible via his link, but in Chrome that link just produces the "Can't install scripts from here" warning.

 

Nope, he's right! Those instructions should work. You just need to follow them using the link in my post in place of the install link on userscripts.org

Link to comment

Those Firefox folks use a script manager, Greasemonkey, to do the hard work. On Chrome, the scripts are handled internally. This means you need to edit the script directly, then re-load it.

 

Go to the download page for GME, right-click on the green "Install" button and select "Save link as.." - save the file to a location of your choice (you've probably had to do this before, to install the extension in the first place).

 

Once downloaded (a second or two) go to the location where you saved the file - it will be called 109145.user.js. RIGHT-click on it, and select "Open with..". Browse to Notepad, or Wordpad, or another text editor to open the file with.

 

Once open, look for the line starting:

function extendLeaflet() {\

then change the line below it:

if( L.version >= 0.5 ) {\

to

if( true ) {\

 

Save the file.

 

Open Chrome, select Settings | Extensions. Drag the modified 109145.user.js onto the extensions page, as you no doubt did to install the script originally. This will update the currently installed script with the modified version, and everything should then work as it did before.

Link to comment

I have been using OS maps on geocaching map enhancements with no problems.For a couple of weeks now no map shows when I go into OS only caches . I use Firefox and my GCE is now up to date version 0.6.4. I have this version on my laptop as well as my desktop PC.Can anyone advise me please

Link to comment

Yup, Groundspeaks update to the website last night broke GME again.

 

On the main maps page, they have upgraded from v4 to v5.1 of the Leaflet Maps API, which has stopped OS maps (and other maps that use quadkeys) from working. They still work on cache listing pages (as those pages already use Leaflet v5.0). The fact that Groundspeak use different software versions on different parts of the site is one of the things that make writing scripts such a joy (and one reason the website is slower than it could be).

 

Updating the script for the new API will be easy. In fact, if you know how to edit scripts yourself, search for the function

extendLeaflet()

then change the line

if( L.version >= 0.5 ) {\

to

if( true ) {\

and the maps should start working again.

 

Unfortunately, it looks like there are also some changes to the layout or page structure which are breaking the sidebar menus and config screen. I'm away from home at the moment and can't do any debugging on the computer I have with me, so I'm not going to be able to post an updated script until sometime next week.

 

In the meantime, if you spot any more problems that haven't already been mentioned here, let me know and I'll try to include them in the fix.

Link to comment

Right. I think I have cracked it.

 

I've uploaded Geocaching Map Enhancements v0.6.5 to userscripts.org

 

The new version should fix the problems that were caused when Groundspeak made the 17th April update to Geocaching.com. OS maps should work again, and the configuration system has been totally re-vamped. It should now look better, and can also be accessed via a link on the Profile menu from most pages on the site.

 

The upside of Groundspeak's upgrade to a more recent version Leaflet Maps is that I've been able to make various other under-the-hood improvements to the script code, and remove some of the bug-fixes and workarounds that were there before. That said, I've not done too much testing (none on Internet Explorer), so do let me know if you come across bugs.

 

With this update, there should be no need for any awkward manual editing of scripts. I've also disabled the link to the work-in-progress version - just go for the new official version on userscripts.org. As always, the full feature list, installation instructions, change log, etc. is available at http://geo.inge.org.uk/gme.htm

 

Link to comment

Hi and thanks it was all working... but today I switched on and I can get OSmaps but no caches are displayed. Have they been playing about again? It has started working properly now.We are lucky to be Premium members.It is soooooo reliable.

 

I have had a similar problem over the last few weeks but it always seems to happen when the GS website is running slowly and it sorts itself quite soon, though I must admit I do get worried each time it happens, not knowing if GS have broken it again or just forgotten to feed the hamsters.

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...
Followers 46
×
×
  • Create New...