Topic on Help talk:Extension:Kartographer

How would an infobox add support for this extension

11
Summary by Daylen

On the English Wikipedia, there is w:en:Template:Infobox mapframe which automatically fetches coordinates from Wikidata, and shapes/lines from OSM if available.

Daylen (talkcontribs)

The English Wikipedia building infobox template (https://en.wikipedia.org/wiki/Template:Infobox_building) does not currently support kartographer maps. What changes need to be done in order for the maps to load without an error message, seen below.

Lua error in Module:Location_map at line 501: "?'\"`UNIQ--maplink-00000004-QINU`\"'?" is not a valid name for a location map definition.

Backtrace:

  1. [C]: in function "error"
  2. Module:Location_map:18: in function "getMapParams"
  3. Module:Location_map:501: in function "chunk"
  4. mw.lua:511: ?
  5. [C]: ?
  6. [C]: in function "getExpandedArgument"
  7. mw.lua:169: ?
  8. Module:Infobox:373: in function "preprocessArgs"
  9. Module:Infobox:420: in function "chunk"
  10. mw.lua:511: ?
  11. [C]: ?
JMatazzoni (WMF) (talkcontribs)

Hi @Daylen. I can't answer your question, but I can give you some examples of info boxes that use mapframe maps.

  1. https://en.wikipedia.org/wiki/New_York_State_Route_895
  2. https://ko.wikipedia.org/wiki/%EC%98%A4%EB%82%98%EB%A6%AC%EB%AA%AC_%EC%97%AD
  3. https://it.wikipedia.org/wiki/Stadio_Giuseppe_Meazza
  4. https://et.wikipedia.org/wiki/Tallinn
  5. https://bn.wikipedia.org/wiki/%E0%A6%87%E0%A6%89%E0%A6%A8%E0%A6%BF%E0%A6%AD%E0%A6%BE%E0%A6%B0%E0%A7%8D%E0%A6%B8%E0%A6%BF%E0%A6%9F%E0%A6%BF_%E0%A6%85%E0%A6%AC_%E0%A6%95%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A6%B2%E0%A6%BF%E0%A6%AB%E0%A7%8B%E0%A6%B0%E0%A7%8D%E0%A6%A8%E0%A6%BF%E0%A6%AF%E0%A6%BC%E0%A6%BE,_%E0%A6%AC%E0%A6%BE%E0%A6%B0%E0%A7%8D%E0%A6%95%E0%A6%B2%E0%A7%87

If you get it working, please show what you came up with!

Evad37 (talkcontribs)
JMatazzoni (WMF) (talkcontribs)

Thanks @Evad37. The function looks like it is working well in these templates. Do you know why English Wikipedia hasn't adopted mapframe more enthusiastically? At present en.wiki has fewer than 2,000 mapframe maps—compared to tens of thousands on some other wikis (and more than 160k on ca.wiki) . Is it, for example, because en.wiki users developed more effective workarounds prior to our recent mapframe release? Or a lack of information? Or is there something else that is causing deployment there to go slowly?

Daylen (talkcontribs)

@JMatazzoni (WMF) My insights from editing on the English Wikipedia for a few years is that en.wiki seems to move more cautiously compared to other Wikimedia projects. I would mostly attribute this to a more established community of editors who are fine with the status-quo. You could say the same thing about Flow talk pages, Wikidata infoboxes, and VisualEditor. All are examples of technologies that en.wiki hadn't made default. At the moment, these maps are opt-in only, as they still have some major flaws (like not being app accessible). Once these changes have been addressed, it will likely be changed to opt-out. Until that time, it is being rolled out on an article by article basis.

Evad37 (talkcontribs)

@JMatazzoni (WMF): I think a part of it has been the lack of any obvious way to easily add maps en-masse to articles (at least prior to {{Infobobox mapframe}} existing). You can't just go round with AWB and quickly/easily add <mapframe>...</mapframe> tags -- there might not be any data on Wikidata or any linked features on OSM; plus coordinates and zoom have to be specified for each use, otherwise the static thumbnail map just shows northern Africa and southern Europe (and/or a very low zoom level) when the page is saved (phab:T193455). Of course, it doesn't help that there are whole classes of articles where OSM data just can't be used (phab:T156433), and even for cases where it can be used, you may have to wait 24 or so hours for any new/updated OSM data to show up (phab:T137939).

{{Infobobox mapframe}} fixes some of this, enough to be used in an automated way just by looking at the transcluding page's Wikidata item... but it is relatively new and will take time to become more widely used. Particularly in widely-used and protected templates, where non-trivial changes require discussion. As more and more templates start using {{infobobox mapframe}}, the number of mapframe maps should increase quite a bit. Particularly if used in more of an "opt-out" rather than "opt-in" way.

Plus there's the restriction on Commons only accepting public domain/CC0 geoJSON data (phab:T179440) (though there is a workaround for CC-BY-SA compatible geoJSON, as that can be stored as wikitext and transcluded).

Another reason for the slow adoption would be a lack of any urgency, as existing image-based map alternatives work are basically "good enough", and have widespread usage across many infoboxes.

And finally, maybe just a lack of coordination between editors interested in maps, with such editors perhaps more interested in their own few favourite articles/topic areas rather than spreading mapframes across the site as a whole.

Geraki (talkcontribs)
Daylen (talkcontribs)

@Geraki The English Wikipedia doesn't use Wikidata for infobox data. That is why (I would assume) all the extra code is required on enwiki.

Evad37 (talkcontribs)

@Geraki: That is an option, but there are benefits to using {{infobox mapframe}}. This template will also show shapes and lines, if they are defined on OSM, and can hide the marker image in such cases (since it isn't really appropriate for e.g. roads which don't exist at a single point). It can also automatically calculate an appropriate zoom level if given a length or area. And it allows for a more standardised mapframe experience between infoboxes by specifying default frame width, height, and colours. Plus it is easier for less technically-capable editors to use, since they don't have to know the exact JSON/syntax for the tags, since its just a template that takes parameters.

@Daylen: That's not actually correct, there's plenty of infoboxes at w:en:Category:Templates using data from Wikidata; see also the various RfC conclusions. As I explained above and on w:en:Template talk:Infobox building, it does fetch coordinates from Wikidata.

Daylen (talkcontribs)

I was referring to the fact that the elwiki link included above used Wikidata exclusively for the infobox. As such, extra code is required on enwiki, due to consensus against using Wikidata as the automatic provider of all infobox data, from a Village Pump discussion.

Geraki (talkcontribs)

@Daylen I am sorry for my post not being clear: If you check the code you will see that the use of Wikidata is not mandatory. It is used only if there are no local parameters set. {{infobox building|latidude=40|longitude=23}} would use these values instead of Wikidata. In fact if you remove the WD feature the code would be more simple.

@Evad37 I don't dispute that {{infobox mapframe}} has a lot of features. The question was how to display maps using another infobox (building), in this case not with bad results since a building is not the same with road (it is ok to display it with a pushpin). Editors who use it don't have to deal with any tag syntax. Eventually, something like infobox mapframe will come in place, but it needs things to settle and a lot of study (Wikidata modules have differences across Wikipedias).

Reply to "How would an infobox add support for this extension"