Module talk:Mapframe

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

@Evad37: For bnwiki, i want to add bengali parameter but at same time i don't want to remove english parameter. How can i add this {{{title|{{{শিরোনাম|}}}}}} in lua? (this isn't working)--আফতাব (talk) 16:50, 26 May 2018 (UTC)

Its not yet possible without heavily modifying the module code. But storing alternate parameter names in a table is a good idea, I just need to make a helper function so the lua code knows what to do with them. - Evad37 [talk] 01:19, 27 May 2018 (UTC)
@আফতাব:  Done here [1], you can make a similar edit on bnwiki and then it should work - Evad37 [talk]
@Evad37: Thanks. --আফতাব (talk) 17:55, 27 May 2018 (UTC)
Hi @Evad37: just let you know that coord parameter does not support aliases. coord = { "coord", "anything" }, (line 20) gives error. --আফতাব (talk) 18:50, 29 May 2018 (UTC)
@আফতাব: Fixed here with this edit - Evad37 [talk] 02:25, 30 May 2018 (UTC)

Sandbox error??[edit]

There seems to be an error at The Simpsons house in Module:Mapframe/sandbox. That should not be happening, not just the error but in particular the transclusion of the sandbox, as the sandbox or a template or module is normally an unprotected page that anyone can edit, and that editors are encouraged to try things out in even if they break things. Any code in there therefore is especially vulnerable and should not be used in articles, especially in templates that are already used in a large number of articles. Pinging Evad37 who seems to be the one working on this.--JohnBlackburnewordsdeeds 02:32, 31 July 2018 (UTC)

Thanks for alerting me. I've turned off the mapframe in that article with |mapframe=no, and fixed the code that was loading the sandbox version of the module by mistake (in Module:Infobox mapframe). The error itself comes from this module not being prepared for the coordinates property on a Wikidata item being set to 'no value'. I'm looking into fixing this now. - Evad37 [talk] 02:54, 31 July 2018 (UTC)
@JohnBlackburne: Fixed, and requested protection for Infobox mapframe at WP:RFPP - Evad37 [talk] 03:31, 31 July 2018 (UTC)
Thanks. I noticed your changes already to the Simpsons house article. An interesting test case as there can’t be many other articles for wholly fictional buildings.--JohnBlackburnewordsdeeds 03:35, 31 July 2018 (UTC)

Error using decimal format[edit]

Using DD format: 37.7891838, -122.4033522
Using DMS: 37° 47′ 21.06″ N, 122° 24′ 12.07″ W

@Evad37: or someone else watching this module: Could you take at look at this? There currently seems to be an error when computing the latitude using the decimal format. In this example right here, when entering 37.7891838, -122.4033522 (the coordinates for the Wikimedia Foundation headquarters), the map currently displays instead 37.8212, -122.4033. The DMS equivalent seems fine. Thanks. Zzyzx11 (talk) 05:51, 28 August 2018 (UTC)

@Zzyzx11: Fixed - Evad37 [talk] 06:15, 28 August 2018 (UTC)
it is displaying +dec_lat when the input is a -dec_lat, Japan instead of Mitagong Dave Rave (talk) 08:23, 12 November 2018 (UTC)

Bug - Can't click to expand map from articles[edit]

For articles where the Wikimedia map is placed, I can't click the dashed square button to expand the map, zoom around, or pan. I also noticed that I can't click the blue links to Wikimedia or to OpenStreetMap from these maps. I checked this using Firefox and Chrome. However, if I were to edit the article/section in which the mapframe map appears, I hit preview to preview my edit/null edit and I can expand the map and click the links. —Mr. Matté (Talk/Contrib) 16:29, 23 April 2019 (UTC)

See phab:/T221439. --Lam-ang (talk) 17:29, 24 April 2019 (UTC)
Thanks for the link; the bug has been fixed. —Mr. Matté (Talk/Contrib) 16:57, 25 April 2019 (UTC)

Too few points returned when using Wikidata[edit]

I think this module should return more geopoints for a given object when using Wikidata as point source. Talking about usage via Template:Maplink. If you look at Interstate 70 in Pennsylvania and zoom the map a bit then the route is very simplified and does not trace the original very good. Can something be done with this? See the example here below. It is interesting that the WIWOSM tool does not seem to have such problems on the same object (see example here) and maybe renders even faster. So where is the problem? PS: ping User:Evad37 --Kozuch (talk) 10:07, 21 June 2019 (UTC)

This is a known bug with maplink/mapframe: phab:T155919. Nothing much we can do on-wiki, unfortunately. - Evad37 [talk] 01:23, 25 June 2019 (UTC)

Bug - does not ignore wd coordinates (P625) for type=line[edit]

@Evad37: I think I identified a bug - the module does not ignore wikidata's "coordinate location" property (P625) for type=line which results in broken both the thumbnail map and the big map. I opened a ticket on Phabricator: T227402. My findings are simply when there is no P625 on wikidata the thumbnails/map/zooming etc. works ok. But when there is P625 these are broken, but I only tested type=line which is the only type that interests me. Can you fix it please? Thanks! --Kozuch (talk) 10:03, 27 July 2019 (UTC)

@Kozuch: I've fixed it in the sandbox:
Map
{{Maplink/sandbox|frame=yes|id=Q515443|type=line}}
Can you check if the sandbox version works with some of the other maps you've been working on? - Evad37 [talk] 07:38, 3 August 2019 (UTC)
@Evad37: I set up a testing page at this link. The problem on simple line objects like D52 motorway (Czech Republic) or interstates sections within states is fixed. For type=shape this seems also fixed (Pinelands National Reserve, Wharton State Forest). I recently discovered that type=line also works for type=shape (on some pages) as I do not want the infill on type=shape as the map inside is darker and can not be seen both in thumbnail and full screen map. Interestingly the fix works for Austria when type=line is used but it does not for Pinelands National Reserve and Wharton State Forest with type=line - do you know what is the issue? Also a long Interstate 5 does not work - I think this is because the master relation on OSM (https://www.openstreetmap.org/relation/2329642) has sub-relations and that simply does not work with Mapframe/Kartographer (but WIWOSM can show master relation! - I would appreciate that to work here too). I think you can push the Module from sandbox to production if you want. The "new" issues I raised (I will update the bug) are kind of additional in the context of the original bug. If you move it to production I can at least use what is working now and not need to use my module clone. --Kozuch (talk) 11:29, 3 August 2019 (UTC)
I just found Template:Maplink/testcases - looks like the new sandbox version fixed many more of the test examples. Nice to see such progress.--Kozuch (talk) 12:03, 3 August 2019 (UTC)
 Updated the live module. As I wrote on Phabricator, not working with sub-relations is phab:T156433, and I'm not sure what's up with type=line not working when type=shape does – that may be another new bug. - Evad37 [talk] 09:28, 4 August 2019 (UTC)

Interstate 45[edit]

@Evad37: Can you look at these two revisions? I removed the lat/lon/zoom to have automatic values, now full screen is blank with red dot.

old

https://en.wikipedia.org/w/index.php?title=Interstate_45&oldid=908452334

new

https://en.wikipedia.org/w/index.php?title=Interstate_45&oldid=909332789

Interestingly outside the article the template works. --Kozuch (talk) 18:58, 4 August 2019 (UTC)

So raw data collides with wikidata somehow - see numbers 1-4 at my page: https://en.wikipedia.org/w/index.php?title=User:Kozuch/Bug&oldid=909333983 Since the data from wikidata are over-simplified I now try to keep the raw data in articles but want auto lat/lon + auto zoom.

--Kozuch (talk) 19:11, 4 August 2019 (UTC)

Same problem at:

--Kozuch (talk) 19:21, 4 August 2019 (UTC)

type=spape-inverse bug[edit]

Manhattan. --Kozuch (talk) 15:25, 13 August 2019 (UTC)