mic_none

Module talk:Routemap Source: en.wikipedia.org/wiki/Module_talk:Routemap

Add city border between stops?

[edit]

Is it possible to add some sort of symbol for a city border between two stops? Attached here is a copy-paste of the line 15 in the article Trams in Helsinki. I'd like to add a city border between the stops "Ravitie" and "Talin siirt.puutarha". Is this possible? JIP | Talk 15:03, 27 October 2024 (UTC)

The dark arts of {{routemap}} are a mystery to me but what you want does seem possible, see {{Oxford area RDT}}. Maybe you can raid it? --𝕁𝕄𝔽 (talk) 15:26, 27 October 2024 (UTC)[reply]
Template:Oxford area RDT (which is one of mine) draws the boundary using icons selected from those in c:Category:BSicon/hub, overlaid on regular icons for stations, junctions, etc. --Redrose64 🌹 (talk) 23:01, 27 October 2024 (UTC)[reply]
I've updated the template to show one possible technique for doing this. Mackensen (talk) 15:28, 27 October 2024 (UTC)[reply]
@JIP: You want one of the icons in c:Category:BSicon/railway/set u/border. Useddenim (talk) 17:13, 11 February 2025 (UTC)[reply]

Visual errors

[edit]

The first row of the collapsed sections at Template:Athens Metro Line 4 RDT and Template:Omsk Metro RDT doesn't seem to replace the first row when I click [show]. For example in the former, "Petroupoli" should replace "Planned phase D" when expanded. What is causing the visual glitch? --Minoa (talk) 07:30, 3 January 2025 (UTC)[reply]

@Minoa: Please give an example of another RDT where the "[show]" link does what you wnat it to do here. Then we can try to compare the code. --Redrose64 🦌 (talk) 19:49, 3 January 2025 (UTC)[reply]
Hello, a further investigation into the templates reveal that the templates work properly in the Vector 2022 refresh, but not in Vector classic, which I still actively use. For example, compare [1] (refresh) and [2] (classic) --Minoa (talk) 20:04, 3 January 2025 (UTC)[reply]
Then it looks like it's the site javascript for the mw- class, and nothing to do with RDTs. --Redrose64 🦌 (talk) 23:55, 3 January 2025 (UTC)[reply]

Need help with aligning sections

[edit]

Hi. I am clearly not proficient enough to know how to align sections on a template. I flipped the orientation of Template:Confederation Line to west to east since that appears to be the convention for routemaps, but in doing so, I was unable to get the segments to properly line up how they did prior to me flipping the diagram's orientation. Could someone with more experience help go in and fix it? Much appreciated. OrdinaryScarlett (talk) 12:09, 11 January 2025 (UTC)[reply]

@OrdinaryScarlett: Unfortunately I have no idea. They seem to always be distorted either in the template or in the article. Because of that, I avoid them at all costs. The best solutions I can think of, assuming this is not fixed, is to remove the section(s) entirely or try to ignore it. Sorry I could not be of more help! Hotdog with ketchup (talk) 21:14, 11 January 2025 (UTC)[reply]
No worries! OrdinaryScarlett (talk) 07:28, 14 January 2025 (UTC)[reply]

Adding a new set color

[edit]

I've just been doing some maintenance work over at Commons on a new BSicon color, emerald. Could someone with template editor privileges please update your routemap to include | emerald = 006400 | ex_emerald = 64A064. Thanks for your help. VanIsaac, GHTV contrabout 01:04, 17 February 2025 (UTC)[reply]

Is there consensus for this color value? I see a lot of back and forth. Pinging Useddenim, who participated in that discussion. – Jonesey95 (talk) 01:49, 17 February 2025 (UTC)[reply]
Well, as you can see at Commons:Category:BSicon/railway/set emerald, they've already been created, and haven't been changed in the ensuing month and a half on the basis of the discussion. VanIsaac, GHTV contrabout 03:37, 17 February 2025 (UTC)[reply]
My takeaway from the discussion was "Yes, we could use a darker shade of green, but  emerald  is too close to the existing   set f  ." I was going to delete emerald and suggest  Brunswick  as an alternative, but just haven't got to it yet. Useddenim (talk) 03:44, 17 February 2025 (UTC)[reply]
@Jonesey95: See c:Talk:BSicon/Colors#Proposed new color. Useddenim (talk) 19:19, 20 February 2025 (UTC)[reply]
I have said that I already read that discussion and saw a lot of back and forth, and I do not see any new comments since 4 January. Please be explicit about your request, if you have one. That discussion and the above discussion are both confusing to me. – Jonesey95 (talk) 19:28, 20 February 2025 (UTC)[reply]

Dark mode-compatibility

[edit]

Hi, first of all, apologies if this isn't the right place to pose this question/suggestion. I would also like to thank the community for its efforts in maintaining this library; I find the possibilities stunning.

I tend to use dark mode wherever possible, and while looking at this diagram, I noticed a weird white square in the "Guadalete river" line. After looking into it, I think it's caused by the mask   (MASKr) icon, which was set to light gray, and I was expecting the background to be of that color.

I wondered if there was a way to change the SVG fill of masks or other overlapping icons with a hard-coded background depending on the user's skin. According to Recommendations for night mode compatibility on Wikimedia wikis#Apply filters to dark images with transparent background, the CSS class skin-invert should be used, and I think it could be included in line 39 of the Routemap module like so:

["cell-overlapicon-fmt"] = '<div class="RMic" style="%s">[[File:BSicon_%s.svg|x20px|link=%s|alt=|%s|class=skin-invert]]</div>',

I tested this with the diagram I linked before with a positive result. However, I'm not confident it won't break other things, as I'm unfamiliar with the Routemap inner workings. Thank you, cheers, Swaare (talk) 12:49, 25 February 2025 (UTC)[reply]

Edit: I've just noticed this affects other icons as well, rendered with a white background or just virtually invisible like the Airport icon in the "Aeropuerto de Jerez" line. Swaare (talk) 12:54, 25 February 2025 (UTC)[reply]

@Swaare: The alternative would be to have RDTs always display with the  light grey  background. Useddenim (talk) 00:07, 26 February 2025 (UTC)[reply]

Template categorisation

[edit]

Hi Useddenim, when creating new templates such as Template:Anzac Avenue they should not be placed in content categories per WP:CAT#T. AusLondonder (talk) 11:15, 10 October 2024 (UTC)[reply]

Also, with some of these templates such as Template:Sunshine Motorway, I am unable to remove them from Category:Highways in Queensland. Is that part of the template's design? AusLondonder (talk) 11:19, 10 October 2024 (UTC)[reply]
@AusLondonder: This has come up in the past, and the consensus has been that Route diagram templates are a special case because in general they do contain supplementary content (similar to photos and other images). Their insertion into specific categories is a semi-automatic function, documented at Template:Road-routemap#Optional parameters.
I hope my reply is helpful. Useddenim (talk) 11:17, 22 January 2025 (UTC)[reply]

Improvement

[edit]

I have three suggestions for improving this module. I initially attempted to enhance it myself but had to pause due to its complexity.

  • Would it be better to move the i18n table into a configuration submodule? Also, should the odata table be placed in a subpage and accessed via the mw.loadData method?
  • I noticed that the current approach to generating tables involves concatenating wikitext directly, which appears unstructured. Would it be more appropriate to use the mw.html.create method to construct the table in a cleaner, more maintainable way?

I have a question:

  • Who is/are the author(s) of this module? Were they two Russian Wikipedians (According to Chinese WP)?
Hzt0208042508415531 tw (talk) 06:57, 26 June 2025 (UTC)[reply]

Template-protected edit request on 28 June 2025 Comment

[edit]

Redundant items:

["row-linfo3-fmt"] = '

%s

', ["row-rinfo3-fmt"] = '

%s

', Hzt0208042508415531 tw (talk) 08:26, 28 June 2025 (UTC)[reply]

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate.. taavi (talk!) 14:05, 28 June 2025 (UTC)[reply]
@Taavi: It's a module, not an article, so {{subst:ETp|xy}} isn't ideal - {{subst:ETp|sand}} would be better. This displays as follows:
 Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. --Redrose64 🌹 (talk) 22:12, 28 June 2025 (UTC)[reply]