Template talk:Infobox settlement

Two maps conveying the same information in infobox
Is there a way to remove the pushpin map in Milwaukee while keeping the switchable map above it? Because that's switchable, it shows the same information to readers and greatly extends the infobox. Ed [talk] [OMT] 21:23, 20 May 2024 (UTC)
 * Well, if you really want to do that, you can simply remove the pushpin_map parameter (and the two following parameters) in the infobox. You could get some pushback from other editors, though. Deor (talk) 21:33, 20 May 2024 (UTC)
 * The problem is that leads to the first map showing all its parameters, instead of remaining switchable. :-) Ed [talk] [OMT] 00:18, 21 May 2024 (UTC)
 * I see two switchable maps at that link. What exactly do you want to see? – Jonesey95 (talk) 00:44, 21 May 2024 (UTC)
 * Apologies, I meant to link to a diff.
 * I think I've figured out the issue–it may be something to do with article caches. When I removed pushpin second map again, I once again saw the first map go from switchable to showing four separate maps. But after purging the cache, the article appeared normal again. I tested and had the same thing happen at Detroit, including the cache purge fix. Funky. Apologies for taking up y'all's time! Ed [talk] [OMT] 03:04, 21 May 2024 (UTC)

Edit request 1 June 2024
Description of suggested change:
 * Would it be possible to add 'police' and 'fire' fields after the government section please? I'm sure this is a pretty universal field for most settlements and tagging it on the bottom in the blank fields with GDP etc. looks a little odd.

Dgp4004 (talk) 23:17, 1 June 2024 (UTC)


 * That stuff belongs in the "Government" section of the article. There is already too much infobox bloat. •  Sbmeirow  •  Talk  • 03:26, 2 June 2024 (UTC)
 * Please suggest the change and get consensus for it before activating an edit request. Johnuniq (talk) 03:36, 2 June 2024 (UTC)

Oversized maps
User:RAGentry has been adding oversized maps to hundreds of US city articles. My concern is that this makes the infobox unnecessarily wide (the default size is 250 px). At Berryville, Texas, for example, there are no photos in the infobox, so no need for an oversized map. The input of others would be appreciated. Magnolia677 (talk) 15:52, 2 June 2024 (UTC)

In my defense, 250 is only a default and not prescribed, and there are plenty of articles which use 280 as the size of their infobox. 280 makes the maps easier to see and understand and ensures that the entire shape fits into the map. The idea of "oversized" is subjective, considering it is only a 30 pixel difference. Is it really that big of an issue? RAGentry  (talk)   (contributions)  16:03, 2 June 2024 (UTC)


 * Also, I note that on the main page of this template, Template:Infobox settlement, one of the example infoboxes is 275px wide, while the other is 290px wide. These are both wider than the default of 250px. That both examples are wider than 250px seems to me to suggest that expanding beyond the default of 250px is definitely acceptable, especially if the circumstances support it (such as increased readability of interactive map thumbnails), and especially if they are not being increased beyond 290px wide, which is the width of one of the example infoboxes in the documentation of this template. I would suggest that the examples of an infobox in its documentation provide more weight to the acceptable widths of a template than the default width in the template parameters. RAGentry   (talk)   (contributions)  16:14, 2 June 2024 (UTC)


 * In general, the size fields shouldn't exist at all to all wikimedia to auto size the images according to user preference settings or default settings, except to shrink photos in infoboxes. Large fixed sizes are a problem on small devices such as smartphones, especially in infoboxes.  Almost always, I delete those fields from the infobox, and I recommend you to do the same.  •  Sbmeirow  •  Talk  • 21:35, 2 June 2024 (UTC)


 * That's a good point; I see how having no fixed size could be beneficial. The problem with this is that in the case of interactive maps, the infobox is ultimately going to be widened by the frame width set in the Maplink template. Removing these creates a rectangular map (300px wide by 200px high) rather than a square map, which is the norm for interactive maps on city articles. It also makes the infobox 300px wide, which might be offensive to some people. What do you think might be a good workaround for this? Also, where in preferences can the images be auto-sized? &mdash; RAGentry   (talk)   (contributions)  22:13, 2 June 2024 (UTC)
 * Where does it say square maps "is the norm for interactive maps on city articles"? At Template:Maplink, the infobox example is rectangular, and the template specifically states "additional parameters are available to customise the displayed map", such as width and height. Magnolia677 (talk) 22:43, 2 June 2024 (UTC)
 * Norms just refer to something that is standard, not necessarily something that is written in as policy. I mentioned it to explain why I chose to use square maps, referring to the trend seen in articles such as Erie, Pennsylvania, Harrisburg, Pennsylvania, San Francisco, and others. Of course, it is possible and likely that there are others that do not match this trend, but I was using square maps because it is what I saw in other interactive maps on city articles. The example in a template documentation is not a requirement, and that there are additional parameters available to customise the displayed map seems to suggest that it is not a requirement for it to be rectangular. &mdash; RAGentry   (talk)   (contributions)  23:45, 2 June 2024 (UTC)
 * My slight mistake, preferences has a setting for thumbnail photos in the article, it appears to not affect the infobox. In general, many infoboxes are already too dang big in community articles, and increasing the size of photos or maps makes the problem much much worse.  Remember that a user can click on a photo or map to see a full size version of it, thus solving the size problem.  Please do not increase the size of maps or images in infoboxes.  •  Sbmeirow  •  Talk  • 22:40, 2 June 2024 (UTC)
 * Ok, I will not increase the size of maps or images in infoboxes. &mdash; RAGentry   (talk)   (contributions)  23:45, 2 June 2024 (UTC)

A small bug/edit request
Greetings and felicitations. In the La Habra, California infobox there is a carriage return between the estimate and the estimated population note. This is consistent between (Mac) Firefox and Safari in desktop mode, though it does not appear in iOS Safari. I'm hoping that someone can find and fix the problem, please. —DocWatson42 (talk) 05:36, 13 June 2024 (UTC)
 * I don't think this is a bug on the template side, the code is


 * Which puts the "as of" directly before the footnotes with no extra space, so it's likely a wrapping thing. Primefac (talk) 22:20, 13 June 2024 (UTC)
 * Okay—thank you. ^_^ DocWatson42 (talk) 01:51, 14 June 2024 (UTC)

Conversion error
I've encountered a strange error in the area fields and I can't think what's causing it.

In KM2, area total can be larger than area land. But once converted into sq mi, area land becomes larger than area total. You can see this in action at Borough of Halton.

I can only think it must be something hard coded in the conversion, perhaps a rounding error? It doesn't occur when using Template:Convert. Perhaps someone more knowledgeable than me will know what might be behind it please. Dgp4004 (talk) 16:40, 14 June 2024 (UTC)


 * Having experimented a little, it seems to be a problem very specific to the figure of 90km2.
 * 89km2 converts correctly to 34 sq mi.
 * 91km2 converts correctly to 35 sq mi.
 * But 90km2 concerts incorrectly to 30 sq mi.
 * Very bizarre. Dgp4004 (talk) 16:51, 14 June 2024 (UTC)
 * Likewise, I have noticed that the template is inaccurately converting 5,181 km2 to 2,000 sq mi on the Powys page. It should be 2,003 sq mi.
 * Would it not make sense to use template:convert in the infobox rather than the formulas used presently which don't seem to work?
 * Dgp4004 (talk) 08:53, 16 June 2024 (UTC)
 * Probably; this template is old and likely had much of its features written/created before convert was as good or widely-used as it is now. Primefac (talk) 15:40, 16 June 2024 (UTC)
 * Dgp4004 (talk) 08:53, 16 June 2024 (UTC)
 * Probably; this template is old and likely had much of its features written/created before convert was as good or widely-used as it is now. Primefac (talk) 15:40, 16 June 2024 (UTC)

A few comments here: — hike395 (talk) 02:40, 18 June 2024 (UTC)
 * 5181 km2 should convert to 2000.3 mi2, not 2003. The template is behaving correctly in this case.
 * The value 90 km2 is ambiguous: it's unclear whether it has one or two significant figures. The template assumes it has one significant figure, hence does the conversion like  → 90 km2. There's currently no way to specify significant figures to the template.
 * convert has a more clever way of determining rounding, so it does the conversion more like you expect:  → 9000 km2. You may not consider this correct, however, since it only preserves 2 significant figures.
 * Probably the right thing to do is to substitute convinfobox for Infobox settlement/areadisp. I'll experiment with this in the sandbox.
 * Sadly, convinfobox only accepts up to 3 units, while Infobox settlement/areadisp can handle 5. Infobox settlement/areadisp also correctly sets the order of the displayed units according to country, while convinfobox always puts the specified unit first.
 * This can all be fixed if we port convinfobox over to Lua, which will take some amount of work. — hike395 (talk) 02:48, 18 June 2024 (UTC)
 * Thank you so much for looking into it—I wouldn't know where to start! Dgp4004 (talk) 07:27, 18 June 2024 (UTC)

Edit request 17 June 2024
Description of suggested change:
 * Please replace the manual conversion formulas in this template with Template:Convert as unfortunately the existing set up is producing errors (please see Template talk:Infobox settlement above). Probably not a quick edit I'm afraid, sorry to make big work.

Dgp4004 (talk) 17:19, 17 June 2024 (UTC)


 * I think the area formulas are actually held in this sub-template: Template:Infobox settlement/areadisp. Would this request be better submitted there or is this sufficient please?
 * Dgp4004 (talk) 17:25, 17 June 2024 (UTC)
 * Red information icon with gradient background.svg Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. – Jonesey95 (talk) 23:16, 17 June 2024 (UTC)
 * I would if I understood it. But it's fiendishly complex sadly. Dgp4004 (talk) 23:20, 17 June 2024 (UTC)