{{ editprotected}} Please create this pages with the following content:
/*
* The file is used by [[tswiki:GeoHack]] and applies effects to [[Template:GeoTemplate]].
*/
/* basic function library */
function appendCSS(text) {
var s = document.createElement('style');
s.type = 'text/css';
s.rel = 'stylesheet';
if (s.styleSheet) s.styleSheet.cssText = text //IE
else s.appendChild(document.createTextNode(text + '')) //Safari sometimes borks on null
document.getElementsByTagName('head')[0].appendChild(s);
}
window.onload = function() {
/* Add row hover effect */
appendCSS(".directory tr:hover {background:#fdc !important;}")
}
— Dispenser 14:08, 20 July 2009 (UTC)
Done —
TheDJ (
talk •
contribs)
10:14, 26 July 2009 (UTC)
{{
editprotected}}
/* Click tracker to see which services are most used */
var tracker = "http://toolserver.org/~dispenser/ghct";
function addTrackers(){
var anchors = document.getElementById('mw_content').getElementsByTagName('A');
for(var i=0; anchorsi!=null; i++){
anchorsi].onmousedown = function(){if(document.images){(new Image).src=tracker,'/',(this.textContent||this.innerText||"NA").replace(/\W/g,'').toLowerCase(),'/',this.href.replace(/[\w+]+:\/*([0-9A-Za-z.\-]*).*/,"$1")].join("");return true;};
}
}
}
window.onload = function() {
addTrackers();
Per Template talk:GeoTemplate#Please please please... we would like to have this code added. — Dispenser 02:39, 27 September 2009 (UTC)
{{
editprotected}}
var iframeurl = 'http://stable.toolserver.org/wma/iframe.html';
var wma_class_R = /\bWMA:(\S+)/;
function addWikiMiniAtlas() {
var arrElements = document.getElementById('mw_content').getElementsByTagName('DIV');
var mapparams, container;
for(var i=0; (container=arrElementsi]); i++){
mapparams = container.className.match(wma_class_R);
if(mapparams){
iframe = document.createElement('iframe');
iframe.frameBorder = 0;
iframe.scrolling = 'no';
iframe.src = iframeurl + '?' + mapparams1];
iframe.style.width = mapparams1].split('_')[2+'px';
iframe.style.height = mapparams1].split('_')[3+'px';
while(container.firstChild)
container.removeChild(container.firstChild);
container.appendChild(iframe); // set attributes before insertion - IE6
container.style.display = '';
}
}
}
addWikiMiniAtlas();
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)
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 tools:~para/temp/GeoHack-shuffle.js. Should we add this or something like it? -- Para ( talk) 19:31, 14 October 2009 (UTC)
Per [1], 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)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
Redirect 301 /~dschwen/wma/ //wma.wmflabs.org/
in ~/public_html/.htaccess) so all the old links wouldn't break. —
Dispenser
18:47, 9 June 2014 (UTC)
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)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change //maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png
to //maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png
to enable maps with retina resolution. —
TheDJ (
talk •
contribs)
19:20, 23 March 2020 (UTC)
There are apparently two bugs using GeoHack.js with Google Chrome under Linux. Please see Template talk:GeoTemplate#Map jumps upon first zoom click for details. -- Redrose64 🌹 ( talk) 08:58, 14 March 2023 (UTC)
See Template_talk:GeoTemplate/Archive_14#Add_a_"make_fullscreen"_button_to_Wikimedia_Maps_map. The RedBurn ( ϕ) 10:08, 12 May 2023 (UTC)
{{ editprotected}} Please create this pages with the following content:
/*
* The file is used by [[tswiki:GeoHack]] and applies effects to [[Template:GeoTemplate]].
*/
/* basic function library */
function appendCSS(text) {
var s = document.createElement('style');
s.type = 'text/css';
s.rel = 'stylesheet';
if (s.styleSheet) s.styleSheet.cssText = text //IE
else s.appendChild(document.createTextNode(text + '')) //Safari sometimes borks on null
document.getElementsByTagName('head')[0].appendChild(s);
}
window.onload = function() {
/* Add row hover effect */
appendCSS(".directory tr:hover {background:#fdc !important;}")
}
— Dispenser 14:08, 20 July 2009 (UTC)
Done —
TheDJ (
talk •
contribs)
10:14, 26 July 2009 (UTC)
{{
editprotected}}
/* Click tracker to see which services are most used */
var tracker = "http://toolserver.org/~dispenser/ghct";
function addTrackers(){
var anchors = document.getElementById('mw_content').getElementsByTagName('A');
for(var i=0; anchorsi!=null; i++){
anchorsi].onmousedown = function(){if(document.images){(new Image).src=tracker,'/',(this.textContent||this.innerText||"NA").replace(/\W/g,'').toLowerCase(),'/',this.href.replace(/[\w+]+:\/*([0-9A-Za-z.\-]*).*/,"$1")].join("");return true;};
}
}
}
window.onload = function() {
addTrackers();
Per Template talk:GeoTemplate#Please please please... we would like to have this code added. — Dispenser 02:39, 27 September 2009 (UTC)
{{
editprotected}}
var iframeurl = 'http://stable.toolserver.org/wma/iframe.html';
var wma_class_R = /\bWMA:(\S+)/;
function addWikiMiniAtlas() {
var arrElements = document.getElementById('mw_content').getElementsByTagName('DIV');
var mapparams, container;
for(var i=0; (container=arrElementsi]); i++){
mapparams = container.className.match(wma_class_R);
if(mapparams){
iframe = document.createElement('iframe');
iframe.frameBorder = 0;
iframe.scrolling = 'no';
iframe.src = iframeurl + '?' + mapparams1];
iframe.style.width = mapparams1].split('_')[2+'px';
iframe.style.height = mapparams1].split('_')[3+'px';
while(container.firstChild)
container.removeChild(container.firstChild);
container.appendChild(iframe); // set attributes before insertion - IE6
container.style.display = '';
}
}
}
addWikiMiniAtlas();
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)
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 tools:~para/temp/GeoHack-shuffle.js. Should we add this or something like it? -- Para ( talk) 19:31, 14 October 2009 (UTC)
Per [1], 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)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
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)
Redirect 301 /~dschwen/wma/ //wma.wmflabs.org/
in ~/public_html/.htaccess) so all the old links wouldn't break. —
Dispenser
18:47, 9 June 2014 (UTC)
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)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please change //maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png
to //maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png
to enable maps with retina resolution. —
TheDJ (
talk •
contribs)
19:20, 23 March 2020 (UTC)
There are apparently two bugs using GeoHack.js with Google Chrome under Linux. Please see Template talk:GeoTemplate#Map jumps upon first zoom click for details. -- Redrose64 🌹 ( talk) 08:58, 14 March 2023 (UTC)
See Template_talk:GeoTemplate/Archive_14#Add_a_"make_fullscreen"_button_to_Wikimedia_Maps_map. The RedBurn ( ϕ) 10:08, 12 May 2023 (UTC)