Jump to content

Template talk:GeoTemplate/Archive 2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3Archive 4Archive 5

GeoHack page deletion

Hi Magnus, I just noticed that your incredibly useful GeoHack tool page seems to have been deleted, and protected to prevent recreation. Is it being replaced, or is it to be no more? I've contacted the admin too. --Leigh 10:34, 23 November 2006 (UTC)

Update - it appears to have been restored. --Leigh 12:29, 23 November 2006 (UTC)

Problems

Hello, I attempted to click on the coor template in Novocherkassk and Primorsk, Leningrad Oblast (among many others) and you page did not recognize coors. Formerly the links worked alright. Could you explain what's going on? Thanks, Ghirla -трёп- 11:13, 24 November 2006 (UTC)

I fixed Novocherkassk; see my edit. Don't leave blank params for seconds in {{coor dm}}. Omit the params complately. Use seconds only in coor dms. jnestorius(talk) 01:07, 25 November 2006 (UTC)
Previously it worked just fine. Now hundreds coor templates need "fixing"! --Ghirla -трёп- 08:31, 27 November 2006 (UTC)

Unreadable page layout

File:GeoHack in Safari.png

What the heck? The Map sources/GeoHack page is now completely unreadable and unusable in the latest version of Safari (2.0.4). A picture is worth a thousand words. Michael Z. 2006-12-01 17:01 Z

Well, that sucks. —Tokek 06:23, 2 December 2006 (UTC)
Would you try to fix Safari or Template:TOCright? Removing TOCright, just breaks the layout of this page. -- User:Docu
Works and worked well in Konqueror... So blame Apple ;-) --PSIplus Ψ 22:15, 2 December 2006 (UTC)
Well, removing TOCright fixes the page for Safari. Please provide the browser name or a screenshot of the "broken" page so I know what you're talking about. --Tokek 13:04, 11 December 2006 (UTC)

Please check if my test page gets corrupted on Safari browser. I don't have Apple/Safari. --Pasixxxx 17:03, 16 December 2006 (UTC)

Some observations:

  • The layout bug only occurs at tools.wikimedia.de, not at en.wikipedia.org
  • The normal TOC doesn't cause problems, but TOCRight does
  • My guess is that en.wikipedia.org uses some JavaScript files that are missing at tools.wikimedia.de that fixes the layout problem for Safari. I couldn't find CSS differences last time I checked.

Tokek 12:12, 18 December 2006 (UTC)

On second thought, the NOTOC solution is not that bad. Although left TOC doesn't cause problems like right TOC, having no TOC is good because it brings the Yahoo! and Google! maps closer to the top. —Tokek 13:30, 19 December 2006 (UTC)

What about using the "dirty" method by adding <div style="float:right;margin:10px;">__TOC__</div> to the top, wouldn't that prevent the missing-js-issue? --PSIplus Ψ 22:02, 20 December 2006 (UTC)
So... I applied my version of TOC, and it seems to work quite well... Tested it on many Browsers and Plattforms (namely: Win32 IE6/7 Firefox, GNU/Linux Konqueror Firefox Opera wine/ie6) and it works pretty well... I'm unsure about Safari, so please test it! But while this method worked before on another page for safari, I'm optimistic that this finally resolves the issue. --PSIplus Ψ 18:41, 22 December 2006 (UTC)
Good, it solved the problem. I tried it using BrowserCamp and it looks good. --PSIplus Ψ 18:45, 22 December 2006 (UTC)
I didn't know a site like BrowsrCamp existed... Didn't look good when I passed this address though. This address (for editing) is different from the final destination where the Template:Coor links takes the user to (which is why the preview feature can't work). —Tokek 04:09, 23 December 2006 (UTC)
What the... LOL! Cool! I'll "fix" it :-) --PSIplus Ψ 12:52, 23 December 2006 (UTC)
Hah! It's done! :-D ... It's a table-based layout, quite easy, quite dirty, quite working... After all: Coult to take a look at my suggestion and tell me what you think about it? ... Have Fun! --PSIplus Ψ 13:08, 23 December 2006 (UTC)
Indeed, it's working! That's a pretty neat table trick.—Tokek 00:45, 25 December 2006 (UTC)

OS Getamap

.... doesn't seem to work. Could someone check it to see whether it's just me or whether it generally isn't working... e.g. TQ387888.

Actually, accessing via the OS site itself isn't working either so it's probably not a problem with this page, but if someone could test it anyway for me that'd be great...

Ta! C2r 17:35, 2 December 2006 (UTC)

Passing the 'Type' parameter?

It seems that there is a parameter named 'type' which is passed from geographic pages into the geohack.php script, but which then is translated into an assumed scale (eg type:country beomes scale:10000000). Am I correct in believing that the 'type:' is then *not* passed through and thus not made accessible? Take for example a small island nation such as Dominica. Obviously a scale of 10,000,000 is entirely inappropriate. However, given a lat-long and type:country, one's map site could do a point-in-polygon query and thus appropriately set the extent and scale as well as extracting the proper geographic feature. Similarly, I have noticed that on country pages (e.g. France and Spain) geographic coordinates for a country's capital also pass the type:country parameter where perhaps they should pass type:city instead? Thanks, Middleforkmaps 16:44, 7 December 2006 (UTC)

Parsing Other Coordinate formats

Would it be easy to modify this script to allow it to parse this format of coordinates:

29.871264,31.216381

when passed to the get string? If I do a search on Google Maps for a valid lat/long coordinate separated by a comma, it parses it fine, but this script doesn't seem to understand the coordinates without a north/south east/west designation.

google map example --Dvmorris 10:43, 11 December 2006 (UTC)

Poor usability

This page is definitely poor from a usability standpoint and should be overhauled. What is the point in listing really every geohack page on the planet, without even diffentiating between more useful and less useful links? There is no point in showing more than 6 links at the most. Maybe there should be a first and a second layer of this page. The first layer for the non-techie users, who might not even speak English, which displays the above mentioned "6 links", and a link from this page to a second page which list "all" this services. That would be infinitely more useful than this. Please, can we not change this? Thanks for consideration, Greetings, Longbow4u 17:52, 15 December 2006 (UTC)

You are probably right. For example, YouTube doesn't provide a list of video players for each video. Having two map links could cover personal preference for about 99% of the population. Special needs for special places can be covered via adding links directly to those articles' External links section, which is probably a better navigation solution anyway. Wikipedia is not a directory (WP:NOT). —Tokek 13:22, 19 December 2006 (UTC)
You are right, page needs big cleanup. In addition many links are using same photo or map layers (from GE or NASA for example) --Jklamo 10:53, 21 December 2006 (UTC)

How to offset coordinates

is there anyway to offset a coordinate by adding or subtracting, for e.g to generate

minx=71.820000&miny=17.960000&maxx=73.820000&maxy=19.960000

from 18.96 and 72.82 by adding and subtracting 1 for each -- PlaneMad|YakYak 20:45, 22 December 2006 (UTC)

Any help please? -- PlaneMad|YakYak 12:26, 28 December 2006 (UTC)

GeoHack Improvement

I got a fine idea for the GeoHack-Tool: Add the ability to specify a lang-parameter in query-string. Therefor, allow localised Versions of the GeoTool for the different wikipedias. That would make the tool even more interesting by allowing localised versions, for example a german one, witch moves the central european relevant geo-links to the top.

While more and more language-versions of wp grow faster and faster, and even the marked for map-tools is growing, the geohack would be overloaded sooner or later. If you like, I would make the programming for this, as well as creating and maintaining the translated and localised german-speaking version. I think this would be very nice :-) --PSIplus Ψ 19:02, 22 December 2006 (UTC)

Okay, I created a patch implementing this:

--- geohack.php 2006-12-22 20:03:23.000000000 +0100
+++ geohack.php 2006-12-22 20:18:53.000000000 +0100
@@ -10,12 +10,35 @@
 include "geo_param.php" ;
 include "mapsources.php" ;

-# Read template
-do {
-       $page = @file_get_contents ( 'http://en.wikipedia.org/wiki/User:Magnus_Manske/GeoTemplate' ) ;
-} while ( false === $page ) ;
+/* Localised template URLs */
+$t_i18n=array
+(
+  "en"=>array
+  (
+    "template"=>"http://en.wikipedia.org/wiki/User:Magnus_Manske/GeoTemplate",
+    "page"=>"http://en.wikipedia.org/w",
+    "style"=>"http://en.wikipedia.org/skins-1.5/monobook/main.css"
+  ),
+  "de"=>array
+  (
+    "template"=>"http://de.wikipedia.org/wiki/Benutzer:PSIplus/GeoTemplate",
+    "page"=>"http://de.wikipedia.org/w",
+    "style"=>"http://de.wikipedia.org/skins-1.5/monobook/main.css"
+  ),
+);
+
+$lang=$_GET["lang"];
+if(!$t_i18n[$lang]) $lang="en";
+$x_i18n=&$t_i18n[$lang];
+
+/* Read template */
+do
+{
+  $page=@file_get_contents($x_i18n["template"]);
+}
+while(false===$page);

-$page = str_replace ( ' href="/w' , ' href="http://en.wikipedia.org/w' , $page ) ;
+$page=str_replace(' href="/w',$x_i18n["page"],$page);

 # Separate content
 $page = array_pop ( explode ( '<!-- start content -->' , $page , 2 ) ) ;
@@ -43,7 +66,7 @@

 # Output
 print "<html><head>" ;
-print '<link rel="stylesheet" type="text/css" media="screen" href="http://en.wikipedia.org/skins-1.5/monobook/main.css" >' ;
+print '<link rel="stylesheet" type="text/css" media="screen" href="'.htmlentities($x_i18n["style"]).'" >' ;
 print '</head><body style="margin-left:5px; margin-right:5px;">' ;
 #print get_common_header ( "geohack.php" ) ;
 print '

I wrote it, haven't had a chance to test it, that should make it... I created a Version of the GeoTemplate in my user-page (but haven't translated it yet) ... Just tell me if you want to use this and I begin to translate :-) --PSIplus Ψ 19:28, 22 December 2006 (UTC)

Who do I have to bribe for something to happen here? ;-) --PSIplus Ψ 19:48, 2 January 2007 (UTC)

What about a new extension (Special:GeoHack) ?

You should submit this to bugzilla   <STyx 18:55, 4 January 2007 (UTC)