Module talk:Location map/Archive 1

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Archive 1 Archive 2

Coor d

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)

I agree, especially as "coor" family are about to be updated, for ease of data entry and to output the Geo microformat. Andy Mabbett 13:43, 31 March 2007 (UTC)


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)

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)
The issue of multiple names might be resolved by overlaying numbers, not dots, and including a key in the image caption. Andy Mabbett 13:45, 31 March 2007 (UTC)

Hungary Map

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

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)

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

Alt text should convey the information in the image, not merely say what the image is about. For example "Great Barr is in the North of Birmingham" is more meaningful to someone who is not viewing the map, than "map showing location of Great Barr in Birmingham". Andy Mabbett 13:47, 31 March 2007 (UTC)
You forgot to convey the information that the image is a locator map. -- User:Docu

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)

Russia and Canada

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)

So... ... I guess we're out of luck for the Canada map? I've already used the Russia map - thanks. But I can't even find the right projection for the Canada map. I would make it myself if i could. *sad* -Theanphibian (talkcontribs) 03:27, 23 August 2007 (UTC)

Have you tried Image:Canada (geolocalisation).svg? From the description, it seems like it might be appropriate. --bdesham  03:53, 23 August 2007 (UTC)
No good, that's the problem - it's the wrong kind of projection. There's no way to apply the location map template to that map and have the positions accurately reflect the coordinates. When I have a list of coordinates for places I want to map, it's kind of a damper on that thought. -Theanphibian (talkcontribs) 22:09, 23 August 2007 (UTC)

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)

Why does the floating to the right not work anymore ?

Borobudur is located in Indonesia
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)

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)
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 is located in Southampton
Eastleigh within Greater Southampton (pos=right)
Eastleigh is located in Southampton
Eastleigh within Greater Southampton (pos=left)
Eastleigh is located in Southampton
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 . (Caniago 15:36, 24 March 2007 (UTC))

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)

YesY 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)

Decimal values

Why are decimal values deprecated? Andy Mabbett 23:45, 30 March 2007 (UTC)

They are just not recommended because it is easier to input coordinates in dms format. — Kalan 06:22, 31 March 2007 (UTC)
Surely that's a value judgement? I find it easier to use decimal values. Andy Mabbett 10:50, 31 March 2007 (UTC)
Me too. If there's no technical reason why they shouldn't be used, they shouldn't be listed as depreciated. One of the beauties of this template is that it can handle both. Flexibility is good. Waggers 12:38, 31 March 2007 (UTC)
I've marked them as not recommended (this could be more native to humans), you can edit Template:Location map/doc as it needed. In russian Wikipedia we commonly use dms{NS/WE} format. — Kalan 08:07, 1 April 2007 (UTC)
I think no one wants to forbid decimal values. Unification is better to handle for templates and interwiki-cooperation. We in german Wikipedia also do prefer the dms format. I think it makes sense to call the decimal format "not recommended". Who wants to use it - please use. But dms is preferred. --Obersachse 08:22, 1 April 2007 (UTC)
"dms is preferred." - I dispute that that is the case, unless you're referring to your personal preference. Andy Mabbett 18:15, 1 April 2007 (UTC)

Template:Location map Mexico

Hello all
I just tried to create a location map for Mexico, but it seems to be slightly off (see my discussion here). Can someone with experience do me a favor and check the calibration on the map? Perhaps I am not using the right map; I don't know. It is only use in two articles: Mexicali and Sabinas, Coahuila. Thanks, —MJCdetroit 16:30, 9 April 2007 (UTC)

Are you sure the map is in orthographic projection? --Obersachse 19:37, 9 April 2007 (UTC)

No, maybe that's why it's slightly off. This was blank map from the commons. —MJCdetroit 19:53, 9 April 2007 (UTC)

In a lapse of reason, I originally wrote that maps should be in orthographic projection. Actually, they should be in equirectangular projection. Sorry for the confusion. Zocky | picture popups 13:22, 22 May 2007 (UTC)

No problem. The map has been deleted anyway. —MJCdetroit 15:32, 23 May 2007 (UTC)

China Map

Can someone create a Location Map for China? Or teach me how, or show me where are the instructions to doing so? Thanks. Hanfresco 08:03, 4 June 2007 (UTC)

I'll try it. --Obersachse 15:14, 4 June 2007 (UTC)
Done for Obersachse ;) --Koryakov Yuri 18:21, 4 June 2007 (UTC)
Template:Location map China. Please report bugs to me. (But I hope, there aren't any :-) --Obersachse 18:41, 4 June 2007 (UTC)
What do you use for source for these images? Personally I have been searching for equirectangular maps of Sweden and Latvia and not found any. I am able to create the maps if I just have a proper source map to use. Thanks in advance. :) --Morten Barklund [ talk / contribs ] 12:50, 16 June 2007 (UTC)
I've created it on my own from DCW data processed with ESRI ArcView GIS, exported in AI format and then cropped, colored, etc. in CorelDraw. I'm not quite understand what you mean by "I am able to create the maps" then. If you really need Latvia and Sweden I can build them in ArcView and export in format you're able to use (placeable WMF, Windows Metafile, bmp, ai, eps, cgm, jpg, cdr). --Koryakov Yuri 15:15, 16 June 2007 (UTC)
We do need Latvia and Sweden, but it'd be nice if we'd be able to make the maps ourselves :-) --HenrikRomby 16. jun 2007, 17:30 (CEST)
I understand the process and math behind the creation and I know the tools to use, but I miss the data to create them. But if it is okay with you, we might as well ask you, when we need the maps. The primary thing, that would be good to have, would be maps, that looked alike. For all countries, display the country in one colour, the internal primary geopolitical division borders (states, regions or the like) in another, country border in a third, neighbouring countries in a fourth and finally water in a fifth. The ultimate thing for me would be if you had a map of the whole world preprocessed in AI format, that I could simply use, and then when I need a certain country not in the correct colour scheme already, I would create it from this file – and then scale the country properly to make it look it's best. I would then try to export in SVG format for optimal rendering if possible. Thanks in advance :) --Morten Barklund [ talk / contribs ] 19:45, 16 June 2007 (UTC)
Yuri's maps usually look like this. I think, that will be okay. Won't it? --Obersachse 21:29, 16 June 2007 (UTC)
First of all, DCW data is freely available at, I hope you know (but unfortunately without Administrative boundaries). So if you've got some map-making ESRI application you can create them yourselves. If not, I could do it myself, but it's unreasonable to export the whole world to AI since it wouldn't look nice because of limited resolution. So I can export it by portions with size of say China or USA. And also map of World with bad resolution which could be used as base. And then I can send all this anywhere by e-mail and you will do with it anything come into your head :) --Koryakov Yuri 21:40, 16 June 2007 (UTC)
That would be absolutely wonderful. We will then make sure to upload relevant results to commons. Thanks. Please contact me via Special:Emailuser/Barklund :) --Morten Barklund [ talk / contribs ] 22:06, 16 June 2007 (UTC)