Module talk:Location map/Archive 4
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 | Archive 6 | → | Archive 10 |
Map does not work properly in IE
There are problems with the display of the map in IE 8. I noticed it first at Mona, Puerto Rico, but it seems universal. Sometimes the map shows, other times there is just a blank space. It is possibly related to the problem at Talk:Rùm#Map_is_broken. It needs looking at. 81.129.128.147 (talk) 13:38, 2 January 2010 (UTC).
- Update: actually, I'm not sure if the problem is universal with this template. As well as Mona, Puerto Rico, it breaks with Alicante, Enniskillen and Golden Gate Bridge, which are just a few found at random, but some other articles look OK. The behaviour does not seem entirely consistent, so it's a little hard to tell. 81.129.128.147 (talk) 14:05, 2 January 2010 (UTC).
- It's probably an IE problem. My Firefox hasn't that problem. --Obersachse (talk) 13:56, 2 January 2010 (UTC)
- Yes, quite probably. Still needs fixing though, since the majority of us use IE! 81.129.128.147 (talk) 14:05, 2 January 2010 (UTC).
- See also Wikipedia:Village_pump_(technical)/Archive_69#Scottish_island_infobox_map. —Preceding unsigned comment added by 86.146.46.169 (talk) 00:13, 8 January 2010 (UTC)
- If anyone figures this out, there's a similar-sounding problem at Template_talk:West_Bank#Map is broken in IE. As far as I can see, it doesn't call on this template, but the root cause might ultimately be the same. I'm not sure. 86.146.46.169 (talk) 00:26, 8 January 2010 (UTC).
- I remember that IE is notorious for botching up the stacking order when it comes to relatively positioned elements (see also the z-index bugs in earlier IE versions). Perhaps IE8 has issues with stacking order of relatively positioned elements as well (we aren't using an explicit z-index here, but that means it's z-index:auto of course). But I don't have Windows, so I cannot test. —TheDJ (talk • contribs) 22:12, 9 January 2010 (UTC)
- See also Template talk:Climate chart#Problems in IE 8 for another similar problem. There seems to be a whole raft of such problems affecting dynamically generated graphical content. 86.134.55.215 (talk) 00:12, 2 February 2010 (UTC).
- Yeah, well, bl**dy Microsoft. When did they last write software that actually worked per spec? 23 years ago (MS-DOS 3.3), that's when. --Redrose64 (talk) 00:44, 2 February 2010 (UTC)
- In my experience MS software is on average no more buggy than anyone else's, and a lot better than some. For some reason, people just like bashing them all the time. 86.136.194.75 (talk) 14:39, 2 February 2010 (UTC).
- Either way, as far as a website is concerned, the implementation is the standard, at least if the implementer represents a significant share of the market.
- I've been disappointed at the limited response at Wikipedia:Village pump (technical), including at WP:VPT/Archive 69#Layered images often not displaying in IE8. There's a current IE8 thread at WP:VPT#Image display problems on which I've commented, though it now seems that the originator may have a different problem.
- But while responding there, I noticed that I'm no longer having a problem. Yay! (I'm still using Navigation Popups and Monobook.)
- We've speculated at VPT that there may have been an unannounced fix included with the January 2010 IE security update. Unless you are still getting the problem after having installed the update?
- — Richardguk (talk) 15:05, 2 February 2010 (UTC)
- In my experience MS software is on average no more buggy than anyone else's, and a lot better than some. For some reason, people just like bashing them all the time. 86.136.194.75 (talk) 14:39, 2 February 2010 (UTC).
- Yeah, well, bl**dy Microsoft. When did they last write software that actually worked per spec? 23 years ago (MS-DOS 3.3), that's when. --Redrose64 (talk) 00:44, 2 February 2010 (UTC)
Russia
![](http://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Russia_conic_location_map.svg/220px-Russia_conic_location_map.svg.png)
Does anyone think that Russian template should use this image (upper one) instead? As a citizen of Russia myself, I'm much more pleased with this representation of Russia than the equirectangular projection, and apparently so do members of Russian, German, French and some other Wikipedias. I tried to make a new template by copy-pasting the code from those templates, but it seems like English wiki does not recognize it. --NineInchRuiner (talk) 14:06, 8 January 2010 (UTC)
- Overall, this map does indeed look much nicer, but it is missing the boundaries of the federal subjects and is, thus, quite useless for the purposes served by the location maps. If a map is produced in this projection that includes the federal subject boundaries, then it would be much more helpful.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 14:48, January 8, 2010 (UTC)
- It seems that map below might be done in the same projection, though position is slightly turned anticlockwise and the scale is slightly bigger. I believe it can be investigated with some external application (Photoshop, etc.), and if correct, it will be possible to paste boundaries onto the first map. What do you think? --NineInchRuiner (talk) 15:39, 8 January 2010 (UTC)
- User:NordNordWest as one of the most active members of the german project Kartenwerkstatt is quite busy, that's why I don't dare to ask him about adding the inner borders. --Obersachse (talk) 16:35, 8 January 2010 (UTC)
- Would it be feasible to simply replace the current equirectangular map with File:Map of Russia.svg and tweak the template accordingly?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:40, January 8, 2010 (UTC)
- You may try Template:Location map Russia2 and Template:Location map Russia3. No guarantee. --Obersachse (talk) 17:04, 8 January 2010 (UTC)
- Would it be feasible to simply replace the current equirectangular map with File:Map of Russia.svg and tweak the template accordingly?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:40, January 8, 2010 (UTC)
- User:NordNordWest as one of the most active members of the german project Kartenwerkstatt is quite busy, that's why I don't dare to ask him about adding the inner borders. --Obersachse (talk) 16:35, 8 January 2010 (UTC)
- It seems that map below might be done in the same projection, though position is slightly turned anticlockwise and the scale is slightly bigger. I believe it can be investigated with some external application (Photoshop, etc.), and if correct, it will be possible to paste boundaries onto the first map. What do you think? --NineInchRuiner (talk) 15:39, 8 January 2010 (UTC)
Is there a new template that works as a locator for a non-equirectangular projection? I would love to have something like this implemented for Alaska, so our locator map doesn't look so ridiculous. Calliopejen1 (talk) 21:54, 2 February 2010 (UTC)
See Template:Location map Russia1. This template and other with y, x pareameters work with Template:Location map2. For example: Template:Location map China1, Template:Location map Canada1--Амба (talk) 21:56, 15 July 2010 (UTC)
Map name field
I don't know if it's ever been discussed before but the name
fields in some maps are not very useful. For example {{Location map USA}} gives "USA". While correct, IMHO that is not to useful in a sentence. For example "The location of xyz in USA" is not the way it should read. I think the name
should produce "the USA" so that a sentence would read "the location of xyz in the USA". There are other nations have the same problem. For example, the United Kingdom and the United Arab Emirates. All opinions welcome. –droll [chat] 03:09, 8 February 2010 (UTC)
Multiple markers
I'm interested in creating a placename distribution map for an article I'm writing. This would involve placing more than 300 markers on a map. Is this something that would be possible using a template, or is the only option to create an image offline and import it as a jpeg?
Catfish Jim and the soapdish (talk) 13:36, 11 February 2010 (UTC)
- Done some more poking about.
{{location map+}}
together with{{location map~}}
might be the ones to suit your requirement; see Battle of Bosworth Field#Background or Middlesex#Former postal county for examples - note that{{location map+}}
is used as a wrapper for multiple uses of the{{location map~}}
template. --Redrose64 (talk) 13:52, 11 February 2010 (UTC)
- This might keep me busy :)
– Fife;
– Angus;
– Perthshire
- Cheers! Catfish Jim and the soapdish (talk) 15:09, 11 February 2010 (UTC)
- To see what happens if you pack the dots too closely, see User:Mjroots/sandbox#Windmills map 1. --Redrose64 (talk) 15:34, 11 February 2010 (UTC)
- Cheers! Catfish Jim and the soapdish (talk) 15:09, 11 February 2010 (UTC)
That looks okay for my purposes, I mainly want to add them to illustrate density rather than having specific locations determinable, so I've also taken out the labels... looks pretty good so far. Catfish Jim and the soapdish (talk) 16:31, 11 February 2010 (UTC)
- With so many markers, would it not be more appropriate to create an SVG image showing all the markers (and any labels), perhaps also incorporating the underlying map? Otherwise, the servers and browsers might both struggle. I don't know how familiar you are with editing SVG files, but it might be worth the effort to prevent the article from becoming frustratingly slow to render. — Richardguk (talk) 01:33, 12 February 2010 (UTC)
- Noted similar comments at Wikipedia:Village pump (technical)/Archive 132#Template for creating distribution map where it seems this question originated and from where it never quite moved! But older versions of Excel producing poor quality graphics. SVG, on the other hand, scales better (in theory at least) at different image sizes, and it may be that you could work out how to edit the SVG code manually to place each marker (since SVG itself uses coordinates to position elements) without even needing to use an SVG graphics editor program. — Richardguk (talk) 01:58, 12 February 2010 (UTC)
Lines instead of points
Template:Location map-line can be used for meridians and parallels. Thanks to ru:user:Kalan. --Obersachse (talk) 18:01, 20 February 2010 (UTC)
Lat and lon dms parameters require decimal values
Location map - as advertised | Infobox Settlement | Location map - using decimal |
---|---|---|
{{Location map|Missouri|label=Kansas City |lat_deg=39|lat_min=06|lat_sed=00| lon_deg=-94|lon_min=34|lon_sec=48| }} |
{{Infobox Settlement | official_name = Kansas City| pushpin_map = Missouri | latd = 39| latm = 06| lats = 00| latNS = N | longd = 94| longm = 34| longs = 48| longEW = W }} |
{{Location map|Missouri|label=Kansas City |lat_deg=39|lat_min=06|lat_sed=00| lon_deg=-94.58| }} |
{{Location map|Missouri|label=Kansas City |lat_deg=39|lat_min=06|lat_sed=00| lon_deg=-94|lon_min=34|lon_sec=48| }} Note: Must enter negative lon_deg number, or the dot is moved over 180 degrees |
{{Infobox Settlement | official_name = Kansas City| pushpin_map = Missouri | latd = 39| latm = 06| lats = 00| latNS = N | longd = 94| longm = 34| longs = 48| longEW = W }} |
{{Location map|Missouri|label=Kansas City |lat_deg=39|lat_min=06|lat_sed=00| lon_deg=-94.58| }} |
--The Three Headed Knight (talk) 15:04, 16 April 2010 (UTC)
- See right, please observe spelling mistakes in your version:
|lat_sed=
. If you amend these to|lat_sec=
, it should work. Please also note that the negative longitude fiddle is not required if you specify|lon_dir=W
:{{Location map|Missouri|label=Kansas City |lat_deg=39|lat_min=06|lat_sec=00|lat_dir=N |lon_deg=94|lon_min=34|lon_sec=48|lon_dir=W }}
- --Redrose64 (talk) 15:24, 16 April 2010 (UTC)
Location map of Kiribati
Could someone make this location map, i have some problems with coordinates. The relevant map is File:Kiribati location map.svg. Thnx in advance--Ex13 (talk) 19:24, 20 April 2010 (UTC)
Thnks for help, but see this for Tabuaeran, and see on de:Tabuaeran:
--Ex13 (talk) 07:00, 21 April 2010 (UTC)
- Please have a look how I did at Tabuaeran. Instead of -|x| you must write +y, where y=360-|x|. Not -159.3644, but 360-159.3644=200.6356 --Obersachse (talk) 15:00, 21 April 2010 (UTC)
- Thnks :)--Ex13 (talk) 12:29, 22 April 2010 (UTC)
Default marker size
So a couple of weeks ago user user:Aleksandr Grigoryev changed Location map marker size from 8 to 5px with no explanation. I tried to revert but he did it again, to 4px. History. I asked him if there was any discussion on the subjuect but he seems be ingnoring me while still replying to other people (meaning he's not away or anything). What should I do and what you people think the size of marker should be?--NineInchRuiner (talk) 11:36, 27 April 2010 (UTC)
- 9 px is my favorite size. --Obersachse (talk) 17:54, 27 April 2010 (UTC)
Smaller is better. 6px I think is about right.
- try contacting him on his discussion page.--Lena Dyrdal Andersen (talk) 20:18, 30 May 2010 (UTC)
Looking for a new map
For lighthouses we need a location map of the Chesapeake Bay including major tributaries and showing both Virginia and Maryland state borders. Is there someone who could make this up or point me to where to go or instructions for doing it myself? Mangoe (talk) 03:13, 2 May 2010 (UTC)
Padding
The template needs a bit of padding so that text does not butt right up to the edge of the map. It should be a variable. -- Alan Liefting (talk) - 10:13, 12 May 2010 (UTC)
- Which text? The label or the caption? Plastikspork ―Œ(talk) 20:36, 15 July 2010 (UTC)
Map correction
Could somebody who knows how to do it fix Template:Location map Australia Victoria so that the bluelinked "Victoria" links to Victoria (Australia) instead of to the disambiguation page Victoria? I've tried a couple of times but my edits don't seem to be having the desired effect. Thanks. Bearcat (talk) 02:36, 29 May 2010 (UTC)
- I've changed the code from
name = Victoria
- to
name = Victoria (Australia){{!}}Victoria
- which seems to have done the trick. There's a complicated interrelationship between several templates but from the article pages I've checked after purging the amended template, there don't seem to be any side effects.
- — Richardguk (talk) 03:50, 29 May 2010 (UTC)
Label position
The label positioning seems a bit of a hack right now. Is there a better way than assuming a label width of around 6.5em? Is there some alternative way to allow for variable label width without resorting to str len functions? Plastikspork ―Œ(talk) 20:38, 15 July 2010 (UTC)
- In my experience, no. This is another example of why we need StringFunctions. –droll [chat] 03:13, 16 July 2010 (UTC)
Forked
FYI, I didn't see any discussion, but this template has now been forked: Template:Location map2. It is currently being replaced in many infobox templates. I'm not sure how I missed the discussion of this change. It would seem better to just improve this template, rather than fork it. Plastikspork ―Œ(talk) 14:16, 17 July 2010 (UTC)
Now about Template:Infobox dam. Template:Location map Canada gives large error. And Template:Location map do not work with Template:Location map Canada1. This is You edit: http://en.wikipedia.org/w/index.php?title=Revelstoke_Dam&action=historysubmit&diff=373985052&oldid=368326205 --Амба (talk) 16:58, 17 July 2010 (UTC)
Template:Location map2 include templates Latitude and Longitude. They are no protected. If You decided for replacing code of existing Template:Location map with code of Template:Location map2, protect templates Latitude and Longitude.--Амба (talk) 16:23, 17 July 2010 (UTC)
- Okay, I think there were some misunderstandings. As far as I can tell the new templates have a few new features (1) Automatic positioning of the label if the point is close to the border at the right of the template, (2) The ability to select relief maps, and (3) Support for edcp location maps for very large regions and/or regions far from the equator (like Africa, Russia, Canada). I believe this would be a great addition to WP. We should certainly merge these changes here if possible, if there is support to do so, since the name
{{Location map2}}
is not very obvious to the end user. Also, I would imagine that {{Location map Africa1}} and {{Location map Russia1}} aren't the best names either. Can we merge these with {{Location map Africa}} and {{Location map Russia}}? Should we support both the current and edcp using a "type=" option? Thanks for all your help, and please if anyone else has any input, please discuss here. For example, should the edcp maps be the default? Thanks! Plastikspork ―Œ(talk) 18:26, 18 July 2010 (UTC)
- I support the code changing. The english Wikipedia should have the same possibilities to use edcp maps as the german or russian. They prefer edcp maps, making them default. So should we. The type option is not needed because we have the AlternativeMap parameter. --Obersachse (talk) 21:08, 18 July 2010 (UTC)
- I can't merge {{Location map Russia}} and {{Location map Russia1}} now.
- We can move or rename this templates or change, for example {{Location map Africa}}<->{{Location map Africa1}} (if it need) or another name (I do not know).--Амба (talk) 23:53, 18 July 2010 (UTC)
- We support both the current and edcp without using a "type=" option. The main parameter is {{{1}}}=(Russia, Russia1). In other templates location map = (Russia, Russia1). If there is parameter |x= in location map template ({{Location map Russia1}}), then edcp. If there is no parameter |x= , then standard algorithm. Polar maps is not supported now (may be later).--Амба (talk) 00:26, 19 July 2010 (UTC)
- For example, see fr:Modèle:Géolocalisation/Japon2, ru:Шаблон:ПозКарта Япония2, uk:Шаблон:Карта розташування Японія2--Амба (talk) 01:48, 19 July 2010 (UTC)
- Okay, since there seem to be no objections, I start merging the code. I will make a few minor adjustments, but it should be basically what was suggested by Амба. Thanks for your help! Plastikspork ―Œ(talk) 22:30, 26 July 2010 (UTC)
Updates
Okay, I have merged the changes as discussed in the thread above. I don't believe this will break anything and adds support for non-rectangular projections (e.g., edcp location maps). It also adds new default label positioning logic to try to move labels left when near the right edge of the map. I am hopeful that we will finally have {{Location map Antarctica}} working. For those interested in the details, this is the way it works. A location map is passed the lat/long (decimal) coordinates and asked to return the x and y position of the marker in the form of an expression which can be evaluated by the "expr" parser function. This means that the subtemplates are no longer brainless, but have some knowledge of the mathematical formulae used in the projection. If the location map template is one of the old versions, that does not return such an expression, then it falls back on the old code, and asks for the coordinates of the top/bottom/left/right edges of the map. I would say with this we could potentially ax {{Location map skew}} as well. I will work on updating the documentation when I have a chance. But for now, hopefully nothing broke, and the old behaviour should still work as it did before the update. Plastikspork ―Œ(talk) 22:49, 26 July 2010 (UTC)
- You broke this template almost everywhere. Could you guys use a sandbox, maybe? Choyoołʼįįhí:Seb az86556 > haneʼ 19:01, 30 July 2010 (UTC)
- Can you provide a link? I don't think it was changes to this template that broke stuff, it was changes to {{Location map China}}, {{Location map Russia}}, ... which caused problems with {{Location map~}}. This problem should be fixed now as far as I can tell. Please correct me if I am wrong, and let us know what specifically broke so we can fix it. Thank you. Plastikspork ―Œ(talk) 14:43, 31 July 2010 (UTC)
- List_of_World_Heritage_Sites_in_Russia is broken... Uwe Dedering (talk) 21:17, 1 August 2010 (UTC)
- The specific problem there is that
{{Location map Russia|top}}
,{{Location map Russia|bottom}}
,{{Location map Russia|left}}
and{{Location map Russia|right}}
do not return any values. --Redrose64 (talk) 21:46, 1 August 2010 (UTC)- Please correct me if I am mistaken but the image referred to does not use equirectangular projection and so it needs the coordinates of the origin. Notice that neither the latitudinal nor the longitudinal lines are parallel. I doubt that a map using equirectangular projection of such a vast area would be practical. I haven't kept up with the recent modifications to this template but {{Location map skew}} does not do well with every projection thrown at it. The idea of including some formula in the map template might be an approach that would work but I don't know if this is possible. The formula would be required to calculate only a rough estimate of the correct placement. It would be best if the formulas were reviewed by somebody with experience in numerical methods. Sorry if this seems esoteric. –droll [chat] 01:14, 2 August 2010 (UTC)
- In which world do you live? de:WP, fr:WP and ru:WP use all kinds of projections. The formulas calculate the exact placement. Uwe Dedering (talk) 20:24, 2 August 2010 (UTC)
- Please correct me if I am mistaken but the image referred to does not use equirectangular projection and so it needs the coordinates of the origin. Notice that neither the latitudinal nor the longitudinal lines are parallel. I doubt that a map using equirectangular projection of such a vast area would be practical. I haven't kept up with the recent modifications to this template but {{Location map skew}} does not do well with every projection thrown at it. The idea of including some formula in the map template might be an approach that would work but I don't know if this is possible. The formula would be required to calculate only a rough estimate of the correct placement. It would be best if the formulas were reviewed by somebody with experience in numerical methods. Sorry if this seems esoteric. –droll [chat] 01:14, 2 August 2010 (UTC)
- I substituted "Location map Russia" with "Location map Russia (equirectangular)" and the error was gone. --Obersachse (talk) 17:32, 2 August 2010 (UTC)
- The specific problem there is that
- List_of_World_Heritage_Sites_in_Russia is broken... Uwe Dedering (talk) 21:17, 1 August 2010 (UTC)
- Can you provide a link? I don't think it was changes to this template that broke stuff, it was changes to {{Location map China}}, {{Location map Russia}}, ... which caused problems with {{Location map~}}. This problem should be fixed now as far as I can tell. Please correct me if I am wrong, and let us know what specifically broke so we can fix it. Thank you. Plastikspork ―Œ(talk) 14:43, 31 July 2010 (UTC)
Request - Polygonal Highlighting
I would like to be able to create a location map where I upload an SVG of a country with administrative borders in standard colors, make a location map template with geographic references, then feed it a parameter telling it to highlight (set fill to red) the topmost polygon located at a given longitude/latitude. With this, a single standard SVG map could be used for an entire country of state/province articles. I don't know much about WP template scripting, but would this be possible? Lesqual (talk) 04:36, 15 August 2010 (UTC)
- Everything is possible, but something is very complicated ;-)
- Your proposion has a big plus (only one map), but is very very difficult to realize. I'd like to propose another way. The minus of my proposion is, we have to use a set of maps, each map with a different state/province colored. But it's much more simpler to use with the help of the AlternativeMap parameter. For an example see Template:Location map Estonia Pärnu County. --Obersachse (talk) 05:54, 15 August 2010 (UTC)
Bug in calling location map with negative decimal longitude when map crosses 180
In calling {{Location map Alaska}} from {{Infobox mountain}}, we attempt to use negative (west) decimal longitude:
{{Location map |Alaska | label = Mount Cleveland | lat = 52.8222 | long = -169.945 | float = center | caption = | border = none | alt = | mark = Fire.svg | marksize = 8 | width = 272 | position = left }}
However, this does not produce a mark:
If I call it with a positive (East) decimal longitude, greater than 180, the mark shows up:
{{Location map |Alaska | label = Mount Cleveland | lat = 52.8222 | long = 190.055 | float = center | caption = | border = none | alt = | mark = Fire.svg | marksize = 8 | width = 272 | position = left }}
I think this is a bug in this template: can someone track it down and fix it? Thanks! —hike395 (talk) 06:38, 6 September 2010 (UTC)
- The russian article ru:Кливленд (вулкан) shows the right position. May be our {{Location map Alaska}} is wrong? There are other borders as in the russian equivalent ru:Шаблон:ПозКарта США Аляска. --Obersachse (talk) 15:58, 6 September 2010 (UTC)
- I've changed the borders in Location map Alaska template and now it seems to work. --Obersachse (talk) 16:01, 6 September 2010 (UTC)
- I don't think that the problem is truly fixed: now positions in the eastern hemisphere will not work. For example:
{{Location map |Alaska | label = Arbitrary location | lat = 60 | long = 175 | float = center | caption = | border = none | alt = | mark = Fire.svg | marksize = 8 | width = 272 | position = }}
- produces
- The Russian article uses dms to describe the location: it doesn't use the
{{{lat}}}
and{{{long}}}
parameters directly. I believe that is where the problem lies. —hike395 (talk) 16:08, 6 September 2010 (UTC)- No, the problem isn't the direct usage. See ru:Обсуждение:Кливленд (вулкан).
- The Russian template has exactly the same bug as what I'm showing, above: Alaskan locations in the Western hemisphere have markers, ones in the Eastern hemisphere do not. See ru:Обсуждение участника:Hike395/Test. —hike395 (talk) 22:45, 6 September 2010 (UTC)
- This should now be fixed. I changed the code in the Alaska location map to use the new syntax which doesn't rely on the crosses180 parameter. Plastikspork ―Œ(talk) 07:50, 26 September 2010 (UTC)
- The Russian template has exactly the same bug as what I'm showing, above: Alaskan locations in the Western hemisphere have markers, ones in the Eastern hemisphere do not. See ru:Обсуждение участника:Hike395/Test. —hike395 (talk) 22:45, 6 September 2010 (UTC)
- No, the problem isn't the direct usage. See ru:Обсуждение:Кливленд (вулкан).
- The Russian article uses dms to describe the location: it doesn't use the