Jump to content
Wikipedia The Free Encyclopedia

Template talk:Infobox road

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Template:Infobox road is permanently protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.

Any contributor may edit the template's sandbox . Functionality of the template can be checked using test cases .


If you set up a country to use this template, be sure to add it to this page.
Articles for deletion This template was nominated for deletion. Please review the prior discussions if you are considering re-nomination:
This template does not require a rating on Wikipedia's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject icon This template is within the scope of WikiProject Infoboxes , a collaborative effort to improve the coverage of Infoboxes on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.InfoboxesWikipedia:WikiProject InfoboxesTemplate:WikiProject InfoboxesInfoboxes
WikiProject icon This template is within the scope of WikiProject Highways , a collaborative effort to improve the coverage of highways on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.HighwaysWikipedia:WikiProject HighwaysTemplate:WikiProject HighwaysHighways

Archives

This page has archives. Topics inactive for 60 days are automatically archived 1 or more at a time by Lowercase sigmabot III if there are more than 6.

default mapframe visuals

[edit ]

As I've been working on a mapframe inside infobox road, I noticed how {{maplink-road }} is basically a workaround for that. But anyway, it also has some default style changes from the default mapframe that should probably be discussed.

For example, it has had this edit since late 2022, where @BMACS1002 said: US Roads style guide specifies darker red for stroke color, and the greater Highway project recognises this standard

But I can't find that in Wikipedia:WikiProject U.S. Roads/Standards#Maps, and the linked Wikipedia:Manual of Style/Road junction lists also doesn't seem to mention a dark red. Wikipedia:WikiProject Highways#Maps and images likewise doesn't seem to talk about this.

I see a number of red lines in Wikipedia:WikiProject Maps#Topographic maps, but also black and white and yellow ones, and no single default. --Joy (talk) 07:28, 4 October 2025 (UTC) [reply ]

Wikipedia:WikiProject U.S. Roads/Maps task force BMACS 1002 14:53, 4 October 2025 (UTC) [reply ]
Ah, thanks. I see this change was made also in late 2022 in this edit by @Fredddie. The only discussion about that seems to be Wikipedia talk:WikiProject U.S. Roads/Maps task force/Archive 2#Business route interactive map line color, but that was about red-green color blindness and using blue for the secondary color, not about shades of red.
The reason I noticed this darker red is also visual - because it seems to blend too much into the background that often has a lot of shades of orange in the base tile context. The 'legacy' bright red default stands out more and is used everywhere else. --Joy (talk) 18:55, 4 October 2025 (UTC) [reply ]

mapframe-line/shape defaults here

[edit ]

So I removed mapframe-point=off which was meant so facilitate rendering of lines. But I also don't know if maybe some roads have shape relations?

It seems safe to set mapframe-line=yes here, right? I am somewhat afraid of setting mapframe-shape=yes default, though.

@Hike395 any idea? --Joy (talk) 08:23, 8 November 2025 (UTC) [reply ]

Road maps seem broken

[edit ]

To whom it may concern, the maps in the infoboxes of roads such as A308 road, A3055 road etc. all seem broken, possibly pointing to coordinates 0,0 in the Atlantic. ITookSomePhotos (talk) 20:25, 6 November 2025 (UTC) [reply ]

@ITookSomePhotos: Ah, the null island problem. It's normally transient. Try again later. --Redrose64 🌹 (talk) 21:18, 6 November 2025 (UTC) [reply ]
Map
This should display A308 road, but it displays Null Island
The problem is also visible in the map on the right, which is using the same markup as generated by the infobox on A308 road. I think it's supposed to fetch and display coordinates from d:Q4649119, but it doesn't. @Redrose64 I haven't seen this before, do you know why or when it happens? Matma Rex talk 14:17, 7 November 2025 (UTC) [reply ]
I'm not an expert, I don't even like mapframe - I much prefer our pushpin maps that we used happily for years. I'm just the poor schmuck who keeps noticing complaints like the one above and who also happens to have Template talk:Infobox UK place#Mapframe on my watchlist. --Redrose64 🌹 (talk) 14:35, 7 November 2025 (UTC) [reply ]
The problem is with this line:
| mapframe-point = none
at Template:Infobox road. I remove that at Template:Infobox road/sandbox and the problem resoved. So please apply the sandbox. Thanks, Hooman Mallahzadeh (talk) 15:35, 7 November 2025 (UTC) [reply ]
I corrected OnByDefault problem with this edit. So please apply sandbox. Hooman Mallahzadeh (talk) 16:02, 7 November 2025 (UTC) [reply ]
I've reverted this part, thanks. In parallel we were just talking about that mapframe-point thing at Template talk:Infobox mapframe, it's not a safe default in an infobox. --Joy (talk) 08:11, 8 November 2025 (UTC) [reply ]

Problematic statement

[edit ]

In articles like A308 road and A3055 road that their Wikidata item don't have P15, these statements return "true":

{{#if:{{wikidata|property|P15}}|no|yes}}

or

{{#if:{{#property:P15|from={{{qid|}}}}}|no|yes}}

But I don't know why? Please note that the length of Wikidata string for P15 is zero by this statement:

{{#invoke:String|len|{{#property:P15|from={{{qid|}}}}}}}

Please inspect, Thanks, Hooman Mallahzadeh (talk) 05:43, 8 November 2025 (UTC) [reply ]

@Joy Hi, What is your idea? I think the above problem is really critical and should be resolved as soon as possible because many Wikipedia articles have the same issue. I propose to create a new phabricator task with very high priority regarding "if statement" and "Wikidata return vlaue". I can't understand why this "if" returns "true"? Hooman Mallahzadeh (talk) 08:01, 8 November 2025 (UTC) [reply ]
Can we move this part to Template talk:Infobox road please? It seems far more intricate than the other bugfix, this probably warrants further investigation. --Joy (talk) 08:12, 8 November 2025 (UTC) [reply ]
Ok, I tested that in A308 road article
{{#if:{{wikidata|property|P16}}|no|yes}}
returns "no" but
{{#if:{{wikidata|property|P15}}|no|yes}}
returns "true". So this issue is relevant to Template:Infobox road. You are right! Please move it. Thanks for your response. Hooman Mallahzadeh (talk) 08:19, 8 November 2025 (UTC) [reply ]
moved at request of Joy and Hooman Mallahzadeh. Please continue below. --Redrose64 🌹 (talk) 09:33, 8 November 2025 (UTC) [reply ]
Hmm, so you're saying a lookup of d:Property:P16 which is "transport network" works apparently fine (it fails as it should), but a lookup of our d:Property:P15 which is "route map" is succeeding even when d:Q4649119 shows no such route map property?
The check that I had used was this: {{#property:P15|from={{{qid|}}}}} which we can render here:
-><-
That seems fine - it fails, as it should.
Let's test it within #if ({{#if:{{#property:P15|from=Q4649119}}|if says true|if says false}}):
->if says false<-
Can you clarify what you mean more exactly, then? --Joy (talk) 13:33, 8 November 2025 (UTC) [reply ]
The problem is with this line at Template:Infobox road surprisingly returns "true":
 | onByDefault = {{#if:{{{map|}}}{{{map_custom|}}}{{#property:P15|from={{{qid|}}}}}|no|yes}}
Even though the output of {{#property:P15|from={{{qid|}}}}} when is inserted at article A308 road is "null", the surprising event is that if statement returns "true", i.e. "if null" returns "true". I don't know why?
Please add this lines to the first of article A308 road to test the issue.
AA{{#property:P15|from={{{qid|}}}}}BB{{#if:{{wikidata|property|P15}}|no|yes}}
Thanks again, Hooman Mallahzadeh (talk) 14:50, 8 November 2025 (UTC) [reply ]
I'm not sure what you mean. I tried these two:
AA{{#property:P15}}BB{{#if:{{wikidata|property|P15}}|check is true|check is false}}CC
AA{{#property:P15|from=Q4649119}}BB{{#if:{{wikidata|property|P15|Q4649119}}|check is true|check is false}}CC
And then the preview of both of those returned:
AABBcheck is falseCC
Which seems to be accurate.
The meaning of the onDefault check is to see if there's any other map available. On that article, there is no map parameter to the infobox, no map_custom, and the Wikidata entry doesn't have P15. So with nothing there, it tells mapframe to go on by default - to give it a shot.
Infobox mapframe in turn checks for coordinates, WD P625 (coordinate location), P402 (OSM relation ID), etc, and renders whatever it can find.
In this case, right now it finds P625, and renders that. (This part used to be broken yesterday.)
It's not great, but it's better than nothing. --Joy (talk) 15:22, 8 November 2025 (UTC) [reply ]
You are right! That was my mistake. Sorry. :) But showing point for roads does not seem reasonable, better than nothing.Hooman Mallahzadeh (talk) 15:34, 8 November 2025 (UTC) [reply ]

Discussion of default rendering of shapes/lines in Template:Infobox mapframe

[edit ]

We're discussing how to handle the rendering of shapes/lines in Template:Infobox mapframe, given that OSM data is unreliable. This will likely affect this template. You're welcome to join in the discussion. — hike395 (talk) 09:49, 8 November 2025 (UTC) [reply ]

"Route map: "

[edit ]

Why do articles like M25 motorway or Interstate 275 (Michigan) have (in desktop view) at the top right the text "Route map:" and then a blank line before the infobox starts? Seems to add no value at all. At California State Route 1 the hatnote text even comes between the "route map" and the infobox. Are there articles where it actually serves a purpose? Fram (talk) 11:46, 8 December 2025 (UTC) [reply ]

I don't see any such blank line (logged out, Brave browser on Mac OS). Feel free to upload a screen shot from a logged-out browser on your computer. In any event, I don't think this infobox is causing the Route map wording and globe with pop-down map to appear. In California State Route 1, it is still there if I remove the infobox in Preview. I believe that it is generated by {{Attached KML/California State Route 1 }}, which is called from {{Attached KML }} in the footer. The talk page for that template would be a good place to address your concerns. – Jonesey95 (talk) 20:21, 9 December 2025 (UTC) [reply ]
You're right, it is caused by the Attached KML template, not by the infobox! Fram (talk) 16:34, 10 December 2025 (UTC) [reply ]

Edit request

[edit ]
This edit request has been answered. Set the |answered= parameter to no to reactivate your request.

Please add a separate category for tracking shield errors for Template:Infobox road/shieldmain.--~2025-43018-05 (talk) 03:54, 29 December 2025 (UTC) [reply ]

@~2025-43018-05: First, there is no such page as Template:Infobox road/shieldmain. Second, you don't state what constitutes a "shield error". Third, I don't see that there has been any discussion on the need to add such a category. Therefore, Not done for now: please establish a consensus for this alteration before creating an edit request. --Redrose64 🦌 (talk) 13:24, 29 December 2025 (UTC) [reply ]

AltStyle によって変換されたページ (->オリジナル) /