Talk:GeoHack

Google Maps
Is there a reason why Google Maps is much more highlighted than the other competitors?? --84.44.177.118 18:00, 11 October 2009 (UTC)
 * On English Wikipedia (Discussion) they thought it was too hard to find it in the list. I had suggested other ways of highlighting it but they opted for the simplest solution.  There was some debate over using Google Maps or OpenStreetMaps (CC license).  Dispenser 13:36, 12 October 2009 (UTC)
 * We have to get rid of this proprietary Google sh*t. I see no reason why to have a big "View this location in Google Maps" headline at the top of the English GeoHack page... OSM or other free mapping project should have such a headline there!!!--Kozuch 17:34, 14 September 2010 (UTC)
 * It was added by netbook users who found it too cumbersome to scroll down. I suspect there is a bais towards the top of the page, as evidenced by the high click rate of acme.  Note, that Google Maps is four times more popular than its nearest competitor Bing.  And for street maps, it is 20 times more popular than OpenStreetMaps (using the new top links number).    Dispenser 01:10, 8 October 2010 (UTC)

#ob_start('ob_gzhandler');
I'm having trouble with this part of geohack.php


 * 1) include "../common.php" ;
 * 2) ob_start('ob_gzhandler');

This causes the following error.

PHP Warning: ob_start [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/content/x/x/x/xxx/html/GeoHack/geohack.php on line 10

This is self explanatory, but is there a way to eliminate the use of ob_gzhandler from Geohack? This line doesn't allow the use of zlib.output_compression or ZEND. Great, Geohack gets compressed, but not the rest of the wiki.--Cojoilustrado 18:46, 24 December 2009 (UTC)
 * This issue was solved. Geohack requires allow_url_fopen ON. We had it off as per Mediwiki's security recommendation. --Cojoilustrado 20:07, 24 December 2009 (UTC)
 * Sorry, something else. We kept getting this message:

output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/content/c/o/j/cojoilustrado/html/GeoHack/geohack.php on line 10

We # the ob_gzhandler mention in Geohack and it went away. Only God knows what else we broke now :( --Cojoilustrado 20:38, 24 December 2009 (UTC)


 * It is the "one liner" to enable gzip compression, your server may not support mod_gzip interface. See How to enable gzip compression with Php. Dispenser 19:56, 31 December 2009 (UTC)

enwiki GeoTemplate edits unnoticed
This edit has not propagated from w:en:Template:GeoTemplate to http://toolserver.org/~geohack/geohack.php after 4½ days.

Also, there is an unanswered suggestion at w:en:Template talk:GeoTemplate from June 2010.

— Richardguk 00:54, 22 August 2010 (UTC)
 * Seems like there is quite a delay in propagating... maybe it is even done manually. Unfortunatelly no docs mention it. --Kozuch 06:48, 15 September 2010 (UTC)


 * The delay is on Wikimedia Foundation's side, their squid servers are not properly flushing after an edit. Although, it was better before the fix for the vector roll-out.  Dispenser 01:14, 8 October 2010 (UTC)

transcluding enwiki mainpage
I just discovered that http://toolserver.org/~geohack/geohack.php appears to be somehow transcluding the main page of enwiki. Please look into this. --70.36.159.31 22:24, 23 August 2010 (UTC)
 * Never mind. The problem has gone away. --70.36.159.31 22:30, 23 August 2010 (UTC)

Localization of OpenStreetMap page
Hello, how can I get a localized version of the project=osm page displayed. E.g. if I got to I'd like to have a different template (in French) called. I tried http://meta.wikimedia.org/wiki/Template:GeoTemplate/osm/fr but it does not seem to work. Thanks. Nakor 21:02, 29 September 2010 (UTC)


 * We initially intended the sub-pages to be used for other planets. The   implementation probably wasn't as well thought out as it should have been.  I'll give the code a closer look.   Dispenser 02:15, 8 October 2010 (UTC)

Ordnance Survey
Re the resource used by en:template:OS coord (and similar on several other wikis) which is currently at toolserver.org/~rhaworth/os/coor_g.php. Since it is written in PHP, I would like to move it to /~geohack/ and modify it so that it includes geohack.php instead of redirecting to it.

Could you please: a) point me to the current source code for geohack.php and the other modules and b) advise me of the installation procedure. &mdash; RHaworth 13:27, 16 February 2011 (UTC)


 * The geohack.php source code is in the SVN repository and instructions on this page. I can either commit it myself or file a JIRA request to add you as a maintainer after which you could commit it you're self.  But please have a clear plan for eventual integration.   Dispenser 19:54, 22 February 2011 (UTC)

Please file a request to add me as a maintainer but, initially, I shall ask you or someone else to approve any changes before I commit them. RHaworth 21:13, 22 February 2011 (UTC)

Links to Wikivoyage
Coordinates on English Wikivoyage are currently linking coordinates to GeoHack. Works fine but the link created in the title is back to the Wikipedia page. Is there a possibly of changing this so it point back to the calling page on Wikivoyage? Either the page is smart enough to recognise where the call came from or an additional parameter to state which wiki project.--Traveler100 10:04, 11 January 2013 (UTC)

&amp;nbsp; in the title-parameter of the URL of the GeoHack
A &amp;nbsp;-entity placed within the text that's put into the title-parameter in the URL of the GeoHack is not changed into a non-braking space by the GeoHack (like one would expect an entity would be) but is written as text (&amp;nbsp;) in the headline of the delivered GeoHack-page. If one klicks a link to any other language, the headline gets cut of before the &amp;nbsp; and stays cut of no matter to which language you klick afterwards. It would be very helpful if GeoHack wouldn't cut of anything but keep the title as it is. Beyond this, the advantages and disadvantages of replacing the &amp;nbsp;-entity by a non-breaking space should be discussed and calculated.

By the way: The link to jira:GeoHack (bug tracker) in the See also-section of the GeoHack-page is still directed to Toolserver and thus probably outdated (or shall it be newly created at the place the link directs to (mediawiki.org/w/index.php?title=Toolserver:Jira:GeoHack&action=edit&redlink=1)?). The Jira-link in the box on this talkpage is also rotten but with a different result. --X:: black ::X (talk) 14:09, 29 March 2017 (UTC), updated --X:: black ::X (talk) 14:35, 29 March 2017 (UTC), updated 21:44, 14 April 2018 (UTC)


 * Indeed I have no idea what's the recommended issue tracker, and we should find out. Maybe it's https://bitbucket.org/magnusmanske/geohack/issues, given Magnus is one of the maintainers listed on https://tools.wmflabs.org/?list . --Nemo 14:20, 29 March 2017 (UTC)

Language change doesn't work
Links in the 'Languages' block lead to 404 pages. Taking for example https://tools.wmflabs.org/geohack/geohack.php?params=60___N_30___E, instead of https://tools.wmflabs.org/geohack/ru/60___N_30___E the url linked should be https://tools.wmflabs.org/geohack/geohack.php?params=60___N_30___E&language=ru. Ain92 (talk) 11:14, 5 June 2017 (UTC) (The links to the GeoHack produced by the w:en:Template:Coord usually don't necessarily need the paramter title, as long as the coordinates refer to the thing the article is about (an not only to a part of this thing or something else) because they also use the parameter  that contains the article title of wikipedia. The parameter   is used as fallback, if there is no parameter  .) --X:: black ::X (talk) 09:23, 15 June 2017 (UTC), updated 09:31, 15 June 2017 (UTC) and 23:42, 9 February 2018 (UTC)
 * As far as I can see, the links to the languages in GeoHack produce an falsely structured and thus invalid URL if there is no titel given to the page of Geohack. This problem should be solved but I can't do that. As a workaround to this problem you may do the following: Enter the parameter  into the URL https://tools.wmflabs.org/geohack/geohack.php?params=60_N_30_E&title=. By this parameter you may also give the page a titel, for example the titel "example": https://tools.wmflabs.org/geohack/geohack.php?params=60_N_30_E&title=example; a space in the title must be entered as  -character into the URL (characters not allowed in a URI have to be URL-encoded).

Difference between {pagename}, {pagenamee} and {pagename_gmaps} / between {title} and {titlee}
In section "Replacement variables" subsection "Coordinate title" it says " {pagename} - Underscore page name, as given by the pagename or determined by the HTTP referrer. &#91;…&#93; {pagename_gmaps} - work around for google maps, will be replaced by {pagenamee} ". What does this work around look like? How does it work? What is the difference between {pagename} and {pagename_gmaps} ?

{pagenamee} is mentioned in a way indicating that it would be still to come but in w:en:Template:GeoTemplate it is already in use. What is the difference between {pagenamee} an {pagename_gmaps} and what is the difference between {pagenamee} an {pagename} ?

In w:en:Template:GeoTemplate also the replacement variable {titlee} is used. What is the difference between {title} and {titlee} ? --X:: black ::X (talk) 11:23, 14 June 2017 (UTC)

Ordnance Survey grid references
Conversion from latitude and longitude to grid reference appears to be incorrect, as the grid reference points to a location north-west of the coordinates. Compare https://tools.wmflabs.org/geohack/geohack.php?pagename=Grade_II*_listed_buildings_in_Calderdale&params=53.724428_N_-1.860731_E_region:GB_type:landmark&title=Town+Hall with https://tools.wmflabs.org/os/coor_g/?pagename=Grade_II*_listed_buildings_in_Calderdale&params=SE0928725345_region%3AGB_scale%3A25000 - this can be seen on sites linked from the first page that use the grid reference in the URL, particularly streetmap.co.uk - the second page works correctly, converting from grid reference to latitude and longitude. Peter James (talk) 22:37, 7 September 2017 (UTC)

Google Earth Webclient not supported
Can you please add support for the Web Version of Google Earth?

earth.google.com/web/

No Support in other language
Please look here Wikipedia:Fragen zur Wikipedia#GeoHack in anderer Sprachversion --2003:DE:716:5A27:D4C2:3465:2BDE:80F2 11:44, 15 April 2018 (UTC)
 * This problem is solved, see w:de:Wikipedia:Fragen_zur_Wikipedia/Archiv/2018/Woche_15. --X black X (talk) 11:39, 29 April 2018 (UTC)

Map on GeoHack
Hello! GeoHack shows Crimea only Russia, but it's wrong. On OSM to Crimea shown as Russia and Ukraine. Screenshot https://pp.userapi.com/c844618/v844618710/5cc6f/MycMVmRghnM.jpg Will this problem be solved?--AlexKozur (talk) 19:12, 29 May 2018 (UTC)

Coordidnate variables
Is it possible to integrate things like https://github.com/klokantech/epsg.io so that it can supply coordinate of input in more different formats? C933103 (talk) 14:30, 31 August 2018 (UTC)

Taiwan Government NLSC: best maps of Taiwan
Here are some of the best maps of Taiwan. E.g., https://maps.nlsc.gov.tw/T09/mapshow.action?lat=24.189486&lon=120.875246&zoom=18 You have to see their docs for the current URL spec. Jidanni (talk) 03:03, 6 October 2018 (UTC)

Use outside the Wikimedia house
Is there documentation on how one could use this or underlying code on a different project altogether outside the Wikimedia assets? I'm thinking of https://www.werelate.org/ which uses version 1.7.1. Thanks for the referral. --Ceyockey (talk) 01:32, 29 August 2019 (UTC)

Fix for incorrect conversion to Ordnance Survey
I have a fix for the incorrect conversion of lat/long to Ordnance Survey grid ref in Geohack, and have tested it on my own client. (Thanks to en:User:RHaworth and de:Benutzer:Telford for actually making the code). How do I check the fix into geohack? Generating a pull request on bitbucket does not seem to work. Would the maintainers (en:User:Dispenser? en:User:Magnus Manske?) like a code drop of some sort? --- Hike395 (talk) 10:32, 9 October 2019 (UTC)


 * Created a Bitbucket issue for GeoHack per instructions on Magnus Manske's talk page. &#8212; hike395 (talk) 18:31, 23 November 2019 (UTC)

Language question
How to get the corresponding language to the pagename, thus the referrer wikis language? "language" and "CONTENTLANG" seem to mainly follow in sligthly different ways the clicks on the language bar left. For coordinates this doesn't matter, but how can tools retain the right wiki in relation to the localized pagename? Even more confusing if the wiki has no own template and uses the english one, how to keep the link to the origin wiki? Thank you! --DB111 (talk) 10:24, 12 October 2019 (UTC)
 * Possible answer: Wikis without own template should set "language" parameter anyway, so this could be used. Working neither, is trying to load a non-existing GeoHack.js in this language. --DB111 (talk) 13:15, 13 October 2019 (UTC)
 * Example: Open this article, click on the coordinates and you are on GeoHack. How to get then the origin wiki ("te")? --DB111 (talk) 15:56, 14 October 2019 (UTC)

"Roscosmos Geoportal" in GeoHack does not work
For example GeoHack for en:Moscow Wikipedia article is. Link for "Roscosmos Geoportal Map" is and for "Roscosmos Geoportal Satellite" is. Both "Roscosmos Geoportal" links do not work. LimaMario (talk) 19:35, 15 December 2019 (UTC)

Translation for sr.wikipedia.org
Why is not translation of the map textual notes such as "Hold Ctrl or ? and hover over a link to read an article summary" applied for sr.wikipedia? I guess translations have been already entered at the proper place. --5.43.82.5 01:45, 4 March 2020 (UTC)