MediaWiki talk:GeoHack.js

Let get the ball rolling
editprotected Please create this pages with the following content: — Dispenser 14:08, 20 July 2009 (UTC)


 * ❌ First, i'd like to see some links to relevant discussion as to why this should be HERE, and second, we have ways to do this. It's called appendCSS and addOnloadHook. —Th e DJ (talk • contribs) 09:57, 21 July 2009 (UTC)
 * I am one of the maintainers of GeoHack. This is part of the separation of general layout.  The MediaWiki namespace is best for tools to store executed JavaScript.  Finally, a simple script like this is a good introduction to the possible uses before we start adding the clicktracking or WMA.  — Dispenser 13:39, 21 July 2009 (UTC)
 * I have modified the above code to implement appendCSS since it not available from GeoHack and call it instead. — Dispenser 13:46, 21 July 2009 (UTC)
 * OK, i see. The toolserver GeoHack includes this page. But then why not create a GeoHack.css and a GeoHack.js and REALLY separate layout and functionality ? It seems a bit pointless to me to include this CSS with Javascript. —Th e DJ (talk • contribs) 10:37, 25 July 2009 (UTC)
 * The code is just suppose to be a sample just to get things started. So the CSS is just a hack to show that it does something.  If you want to, I'd be find with just the header comment.  In the past, Para has developed and hosted a things on his Toolserver account that should be integrated into GeoHack somehow, like that Google street view finder.  — Dispenser 22:40, 25 July 2009 (UTC)

✅ —Th e DJ (talk • contribs) 10:14, 26 July 2009 (UTC)

Clicker tracker
Per Template talk:GeoTemplate we would like to have this code added. — Dispenser 02:39, 27 September 2009 (UTC)

Draggable maps

 * Also add  to the onload function.

This code will replace the contents of div tags with special classes with an instance of WikiMiniAtlas. In the future we can change this to OSM at some point, but the OSM folks are worried about load. — Dispenser 01:34, 28 September 2009 (UTC)

Service shuffler
So the click tracker works fine (I wouldn't have expected the image url to load when the browser is leaving the page, but it does!). While waiting for some statistics to be published, I had a sneak peek, and it seems people have no trouble finding the Google links that aren't the very first map links. Encouraged by this, I finished the service shuffler script: GeoHack where you choose the service order. The code is at ~para/temp/GeoHack-shuffle.js. Should we add this or something like it? --Para (talk) 19:31, 14 October 2009 (UTC)
 * I've thought about this and to me its too much effort for something that will disappear if you clear your cookies or move to another computer. It might be easier if it were drag and drop.  Another possibility is to simply list the last five links a user click on at the top of the page.  — Dispenser 16:38, 20 October 2009 (UTC)
 * True, moving anything one by one on a 30 row list is a pain. So I searched for some drag&drop code, and merged it with mine at ~para/temp/GeoHack-dragdrop.html. Seems to work. Moving rows without the user explicitly making the move would confuse people when they're looking for services from the alphabetical list, I think. Copying often used rows and changing the style might be better. This row moving thing could use some styling magic as well, especially if the popularity of services is going to be indicated with background colours. --Para (talk) 22:34, 21 October 2009 (UTC)

HTTPS fix
Per, I've replaced the hardcoded HTTP toolserver URLs with protocol-relative ones, fixing the mixed-content block in Firefox 23+. --brion (talk) 14:41, 30 August 2013 (UTC)

WikiMiniAtlas moved to Labs
please change var iframeurl = '//toolserver.org/~dschwen/wma/iframe.html';

to var iframeurl = '//wma.wmflabs.org/iframe.html';

The Wikiminiatlas has moved from the (now dead) Toolserver to WMF Labs. --Dschwen 17:44, 9 June 2014 (UTC)
 * Yes check.svg Done -- Red rose64 (talk) 18:01, 9 June 2014 (UTC)
 * It would be nice if you setup a redirect (e.g.  in ~/public_html/.htaccess) so all the old links wouldn't break.  — Dispenser 18:47, 9 June 2014 (UTC)
 * I don't know where to put that. -- Red rose64 (talk) 18:54, 9 June 2014 (UTC)
 * Yeah, it would have been nice if I had done that, like you suggested a few weeks ago :-(. I forgot to add that and now the ts account is closed again. --Dschwen 19:04, 9 June 2014 (UTC)

Translation
Is there a way to translate 'Zoom in' and 'Zoom out' hover text? It's in https://maps.wikimedia.org/leaflet/leaflet.js. --Obsuser (talk) 21:04, 12 May 2017 (UTC)

Interface-protected edit request on 23 March 2020
Please change  to   to enable maps with retina resolution. —Th e DJ (talk • contribs) 19:20, 23 March 2020 (UTC)
 * I trust you know what you are doing here, but would like a sanity check, can you provide examples of the generated url that is currently happening, as this change isn't just adding a new function - but will also change every single existing call with the re-use of {z} in the filename component. — xaosflux  Talk 21:46, 26 March 2020 (UTC)
 * , you are right in being skeptical. Should be {r}. https://maps.wikimedia.org/osm-intl/13/1310/3165@2x.png?lang=en https://leafletjs.com/reference-1.6.0.html#tilelayer —Th e DJ (talk • contribs) 09:10, 27 March 2020 (UTC)
 * ✅ I added the parameter. —  xaosflux  Talk 18:09, 2 April 2020 (UTC)

Map jumps upon first zoom click
There are apparently two bugs using GeoHack.js with Google Chrome under Linux. Please see Template talk:GeoTemplate for details. -- Red rose64 &#x1f339; (talk) 08:58, 14 March 2023 (UTC)

Add a "make fullscreen" button to Wikimedia Maps map
See Template_talk:GeoTemplate/Archive_14. The RedBurn (ϕ) 10:08, 12 May 2023 (UTC)