Template talk:Location map

From Wikipedia, the free encyclopedia

This template takes in latitute and longitude, should we get it to include the template Coor d which also takes in latitute and longtitude and seems to be the ultimate top-level template for the location of places. This would ensure that anything that reads the geographic location of articles would then pick up anything using this map. See WikiProject Geographical coordinates for more details. --MarkS (talk) 19:55, 26 June 2006 (UTC)

Contents

[edit] Thanks

Thanks so much to everyone who contributed to this template. It was such a relief when I found this one. I had been thinking on how to create this for sometime while working on a bot that creates Indian towns and cities. I was able to plug-in this template and get the bot running. Thanks again, Ganeshk (talk) 21:03, 26 June 2006 (UTC)

See Mumbai for an example. - Ganeshk (talk) 21:04, 26 June 2006 (UTC)

[edit] Is it possible

...or would it be possible to have more than one city on these maps? --estavisti 19:52, 9 July 2006 (UTC)

It's not possible at the moment, but it could be done. One serious problem would be overlapping of names, which would create a need to micromanage the position of names. That would be likely to break across browsers. Zocky | picture popups 19:32, 13 July 2006 (UTC)
Another note: The way this is implemented now, all the smart bits are in this template, and subtemplates just return the requested data. We could make pretty much any other template that uses that data - i.e. the same place on several maps, several places on the same map, superimposition of other things than labels, etc., without breaking or influencing this one in any way. Zocky | picture popups 19:37, 13 July 2006 (UTC)
It is possible. See Template:Location map start. -- Ganeshk (talk) 14:58, 26 October 2006 (UTC)

[edit] Hungary Map

Could somebody create a location map for Hungary (according o Croatia map)? thx. --Neoneo13 13:01, 22 September 2006 (UTC)

[edit] Position parameter

Would it be a good idea to add Top and Bottom values to the position parameter (position=top and position=bottom)? Currently it allows for right and left. On a multiple location map, having just two options means the map is very cluttered. Top and bottom values will give more usage options. -- Ganeshk (talk) 23:29, 26 October 2006 (UTC)

I have added top and bottom params. Can someone please check if it looks okay. -- Ganeshk (talk) 06:31, 9 November 2006 (UTC)

[edit] Alt text

Should we add an alt-text to the image? If there is a caption, it would be simply {{{caption}}}, otherwise, e.g. "Map of location within {{{1}}}". -- User:Docu

[edit] A few suggestions

Excellent work on this. You've made life a lot easier for many people. Are you familiar with the {{Lageplan}} template from the German wiki? They made this for their German town infobox and I brought it over to the English wiki for use in the English version of this infobox: {{Infobox German Location}} - at the time I did not know about the Location map.

The Lageplan template has now also been modified for use in {{Infobox Town GR}} for Greek locations.

Lageplan has a few nice features that Location map does not. On this page I have put up two versions of the infobox used for Frankfurt, one using Lageplan, the other with Location map. I would gladly change the template to use Location map if a few changes were made:

  • Border: Is there any way to turn off the image border? It is alright for some cases but, as you can see, not for this one
  • Error: Instead of shifting the dot off the edge of the map if the co-ordinate values are either not given or out of range, would it be neater to have some sort of error display? In Lageplan, a second map can be displayed (DE: Image:Missing Map of Germany.png, GR: Image:Prefectures Greece nocoord.png). So either the addition of a second error image or the overlaying of a question mark image would look better.
  • Dot size: (a minor issue) Can the size of the dot be adjustable?
  • Floating text: (another minor issue) Can the float text be modifiable? Also, Lageplan makes it possible for the dot to also have float text of its own

Keep up the good work. - 52 Pickup 09:35, 24 January 2007 (UTC)

[edit] Russia and Canada

a "normal" map of Russia
a "normal" map of Russia

There's not yet a template for Russia or Canada (countries near the North Pole). There are some difficulties to solve. The images are distorted by orthogonal projection. In dewiki we discuss a possible hint to use "normal" maps.

The image on the right side looks like using polar coordinates:

The formulas for the coordinates we need are
x=x_middle - r*(90-lon)*cos(k*lat)
y=y_middle + r*(90-lon)*sin(k*lat)
x_middle and y_middle are the coordinates of the North pole in the picture.
r and k we have to check in the picture.

What do you think? Is that the right way? Any ideas? --Obersachse 17:36, 6 February 2007 (UTC)

I made a russian map using equirectangular projection. --Obersachse 15:13, 5 March 2007 (UTC)
Could you point to it, please? Thanks.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 15:47, 5 March 2007 (UTC)
Template:Location map Russia. There's an example too. --Obersachse 23:28, 6 March 2007 (UTC)
Great! A couple of suggestions, though: can another map be created which would have the same colors as current locator maps for Russian federal subjects (example, and can it be updated to show the January 2007 borders (i.e., taking into consideration Perm and Krasnoyarsk Krai mergers)? Thanks!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 14:17, 7 March 2007 (UTC)
Ask User:Koryakov Yuri, please. --Obersachse 00:06, 18 March 2007 (UTC)

[edit] The problem of maps crossing the +/- 180 meridian

is solved in ruwiki and dewiki by inserting a new parameter crosses180. See e.g. de:Uelen. Thanks to ru:User:Kalan. --Obersachse 00:03, 18 March 2007 (UTC)

[edit] Why does the floating to the right not work anymore ?

Borobudur (Indonesia)
Borobudur
Borobudur
Borobudur location on Indonesia map.

I see in the text they are not working anymore, and also for example this:

{{Location map|Indonesia|lat=-7.608|long=110.20|float=right|caption=Borobudur location on Indonesia map.|label=Borobudur|width=300}}

And also why does the label in Indonesia map not show up also ? The difference is only that our map uses SVG rather than PNG image. Is it a problem in labelling? Any idea?? — Indon (reply) — 08:47, 23 March 2007 (UTC)

Kalan made some changes to the template - I believe he was trying to fix the problem with maps that cross the 180° meridian. In doing so he broke the float functionality. I've now reverted those changes to restore the float function, as it was screwing up the formatting of a lot of articles. Waggers 09:40, 23 March 2007 (UTC)
Hmm. In Russian version (that I've copied here) it was all ok. — Kalan 11:01, 23 March 2007 (UTC)
Anyway, it works in ruWiki, see ru:Уэлен. — Kalan 11:12, 23 March 2007 (UTC)
He, this was a problem with your code, you should write float instead of "float". Now I'll try to fix it. — Kalan 11:17, 23 March 2007 (UTC)
Now it does not work and the label is gone. — Indon (reply) — 11:25, 23 March 2007 (UTC)
Yes, Kalan has been trying to fix it but apparently to no avail. I've rolled back to the working version again, as he really shouldn't use the live version for testing. Waggers 12:51, 23 March 2007 (UTC)
Hooff, I don't know how to fix it. #switch doesn't work, text from older revision gives the same result (?!). Anyway, when a bot will replate deprecated |lat and |long, it could also change |float="left" and |float="right" to correct values. — Kalan 12:52, 23 March 2007 (UTC)
Ok, thanks very much for trying. Waggers 13:00, 23 March 2007 (UTC)
The "working version" doesn't work. See the examples for Western Hemisphere and Country that crosses 180° meridian. --Obersachse 13:11, 23 March 2007 (UTC)
The "working version" hasn't worked in that respect for a while and that's been documented. But breaking the float functionality to fix the 180° meridian problem doesn't really solve much. What we have is a straight choice between a template that floats but doesn't work for maps that cross the 180° meridian and a template that doesn't float but does work for those maps. Given that the 180° meridian problem is fairly well known, surely it's better to stick with the bug we know about until we can solve it without creating a new bug elsewhere in the template. Waggers 13:30, 23 March 2007 (UTC)
Please test Template:Location map/Temp. I think the problem is solved now. Will You? --Obersachse 13:36, 23 March 2007 (UTC)
I think Kalan has made the change to the actual template now. Seems to work this time! Well done to everyone involved. Waggers 13:41, 23 March 2007 (UTC)
Very fine! --Obersachse 19:20, 23 March 2007 (UTC)

[edit] Missing label

(unindent) Now, last question. The floating is working, but the label is now missing. Is there incompatibility with SVG images, because it appears label shown up with PNG images? — Indon (reply) — 10:14, 24 March 2007 (UTC)

Can You give an example (link)? --Obersachse 13:57, 24 March 2007 (UTC)
Nose (Smile)
Nose
Nose
Nose location on the smiley (svg)
Nose (Smiley2)
Nose
Nose
Nose location on the smiley (png)
Ehrm. — Kalan 14:28, 24 March 2007 (UTC)
Strange. The label is still working fine on {{Location map|Southampton ...}} templates. Waggers 14:36, 24 March 2007 (UTC)


Indeed. --Obersachse 14:57, 24 March 2007 (UTC)
Eastleigh (Southampton)
Eastleigh
Eastleigh
Eastleigh within Greater Southampton (pos=right)
Eastleigh (Southampton)
Eastleigh
Eastleigh
Eastleigh within Greater Southampton (pos=left)
Eastleigh (Southampton)
Eastleigh
Eastleigh
Eastleigh within Greater Southampton (pos=(default))

{{Location map|Southampton |label=Eastleigh |position=right |lat=50.966667 |long=-1.35 |caption=[[Eastleigh]] within [[Greater Southampton]] |float=right }}

It was the missing position attribute. --Obersachse 15:15, 24 March 2007 (UTC)
I've rolled back the changes made by Kalan again. Apart from the problems mentioned by Indon, the changes also caused problems with how the map_caption field was positioned in Template:Infobox City (see Padang, Indonesia for an example) - it has been moved to the left of the Location map instead of below (the correct position). Please do not make further changes to this template until these problems are fixed - please use a sandbox instead of experimenting with this template . (MichaelJLowe 15:36, 24 March 2007 (UTC))

[edit] Problems with images and borders

I reverted here as this caused a border to appear around images on ~3,000 articles used in template:Infobox UK place. I couldn't work out what the specific change was that caused it. MRSCTalk 05:15, 27 March 2007 (UTC)

Fixed. Please notice me before any further revertion because older versions have problems with marker positioning that are much more important than border troubles. I watch my talk page through RSS, so I get a notification every 5 minutes. — Kalan 13:21, 27 March 2007 (UTC)