Module talk:Mapframe/Archive 1
This is an archive of past discussions about Module:Mapframe. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 |
Data page names
I am not sure its a good idea to promote identical names in Data and here. Lets try to keep the data a bit organized by storing it in a "fake subpage" - e.g. Data:naturalearth.com/something.map ? So basically the template should probably not have a default at all? --Yurik (talk) 05:00, 24 December 2016 (UTC)
Singular points
Can the maplink
template be adjusted to show singular points (using Wikidata IDs) and latitude/longitude coordinates? There are quite a few article pages that are using template:maplink but they're showing maps that don't make any sense, because they are singular points. Easy examples are: National Museum of Australia and National Institute of Dramatic Art--they both show a (map) link but it goes to a map in the ocean. :( DTankersley (WMF) (talk) 19:38, 13 October 2017 (UTC)
- I was the one that added those maps. Checking now, my experience is that maps that use
shape
work correctly but those that useshape-inverse
display the target area correctly but with the map zoomed all the way out. I can confirm that this regression also affects the native <mapframe> and <maplink> functions. I've filed https://phabricator.wikimedia.org/T178370. Gareth (talk) 12:06, 17 October 2017 (UTC)
- I was the one that added those maps. Checking now, my experience is that maps that use
- @DTankersley (WMF): I switched National Museum of Australia to use
|type=shape
instead ofshape-inverse
and then it worked for me, and National Institute of Dramatic Art already works for me. They aren't points, by the way, but polygon shapes on OpenStreetMap that have been tagged with the relevant Wikidata IDs – specifically https://www.openstreetmap.org/relation/5613553 and https://www.openstreetmap.org/way/45558386 - Evad37 [talk] 23:37, 13 October 2017 (UTC)- Thanks, I just checked out Sydney Park and it was the same...using
shape-inverse
. Evad37, is there a way to add in a Wikidata id that isn't a shape but a point? Or, just a lat/lng? Thanks, DTankersley (WMF) (talk) 01:10, 14 October 2017 (UTC)- @DTankersley (WMF): I tried to implement this in the sandbox (see the bottom of Template:Maplink/testcases) – but I can't get the marker images to show, making it pretty useless. For the moment it looks like we'll have to stick with {{Coord}} and WP:WikiMiniAtlas. - Evad37 [talk] 03:14, 14 October 2017 (UTC)
- Thanks for confirming what I saw as well, Evad37, because that's the same error I was getting when I tried using a point or lat/lng in the
maplink
template. :( Unfortunately, this makes it hard to get more usage of maps on articles if the average editor can't easily add a link. DTankersley (WMF) (talk) 13:17, 15 October 2017 (UTC)- I've added in a phabricator ticket to see if adding in the ability to use a Wikidata Qid for a single point and using a lat/lng can be added to the Template:Maplink and Template:Mapbox templates: https://phabricator.wikimedia.org/T178321. Maybe one of our fantastic community volunteers can help out! :) Thanks, DTankersley (WMF) (talk) 18:28, 16 October 2017 (UTC)
- Thanks for confirming what I saw as well, Evad37, because that's the same error I was getting when I tried using a point or lat/lng in the
- @DTankersley (WMF): I tried to implement this in the sandbox (see the bottom of Template:Maplink/testcases) – but I can't get the marker images to show, making it pretty useless. For the moment it looks like we'll have to stick with {{Coord}} and WP:WikiMiniAtlas. - Evad37 [talk] 03:14, 14 October 2017 (UTC)
- Thanks, I just checked out Sydney Park and it was the same...using
RFC notice
An RFC is going on at Wikipedia:Wikidata/2018 Infobox RfC, for consensus on Wikidata usage in Wikipedia. Capankajsmilyo(Talk | Infobox assistance) 16:39, 2 May 2018 (UTC)
Using mapframes / maplink nicely in taxoboxes
I tried using the above at Bugun liocichla - which is a species known from (how nice) just three point locations. Now it would be nice to have simple round spot markers without shadows and it would be nice not to have to set the width and height parameters but to use the taxobox/infobox settings. Would all this be easy to have? Shyamal (talk) 09:12, 2 May 2018 (UTC)
- @Shyamal: If you use this template instead of using the tag directly, then a default width and height (currently 300/200) is used unless otherwise specified. At the moment this template can only handle a single feature, but I'm rewriting it as a Lua module that should be able to display multiple features. As mw:Maps/Icons are the only icons currently available, the closest you can get to "simple round spot" would be the small sized marker.
- @Shyamal: As an alternative, {{OSM Location map}} (implemented below) does allow round markers (but hasn't yet got the internationalised place names implemented). To allow the three dots to be resolved, in the example below I have increased the zoom and added a smaller locator map. Like Maplink it can't auto-resize to fit the infobox, but centring it will help the appearance. RobinLeicester (talk) 23:54, 23 May 2018 (UTC)
- @RobinLeicester: thank you, that definitely looks better but I had to put in a div to avoid breaking the box. Shyamal (talk) 10:10, 25 May 2018 (UTC)
bnwiki
@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)
- Hi @Evad37: just let you know that
- @Evad37: Thanks. --আফতাব (talk) 17:55, 27 May 2018 (UTC)
Sandbox error??
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
@Evad37: {{coord|32|S|116|E}}
works but {{Coord|57|18|22|N|4|27|32|E}}
doesn't.
{{Maplink|frame=yes|type=point|coord={{coord|32|S|116|E}}|title=Point|description=Description of point}}
→
but
{{Maplink|frame=yes|type=point|coord={{Coord|57|18|22|N|4|27|32|E}}|title=Point|description=Description of point}}
→
--আফতাব (talk) 22:46, 26 May 2018 (UTC)
- @Aftabuzzaman: Fixed. Sorry for the long delay. - Evad37 [talk] 02:28, 15 August 2018 (UTC)
Multiple separate OSM relations with the same wikidata tag
Is there a way to refer to separate OSM relations using separate rendering styles when they both have the same Wikidata tag? For example, to have completed sections of a road render in red, and incomplete sections to render in blue, when the two segments have different route relations, but with only one Wikidata tag for the road. Is this possible with the current system? Roadsguy (talk) 01:20, 15 August 2018 (UTC)
- No, the maps can only use a Wikidata id to refer to an OSM relation. Different items would be required to refer to different OSM relations, but such items (referring to only part of a thing) would quite possibly fail d:Wikidata:Notability. - Evad37 [talk] 01:43, 15 August 2018 (UTC)
- Note that you can use GeoJSON data instead of OSM, as long as the data's licencing is CC-BY-SA compatible – see Wikipedia:Map data and related discussion at Template talk:Infobox road#Mapframe maps. - Evad37 [talk] 02:35, 15 August 2018 (UTC)
- Hmm, that's too bad. Is the Maplink feature being maintained by anyone in particular? How might I go about suggesting that? Referring to OSM relations individually would allow for a lot of versatility in certain applications. Roadsguy (talk) 03:02, 15 August 2018 (UTC)
- mw:Wikimedia Maps and mw:Help talk:Extension:Kartographer would be the main on-wiki pages, you can also file bugs/feature requests on Phabricator (see existing maps tasks) - Evad37 [talk] 03:26, 15 August 2018 (UTC)
- @Roadsguy: OSM relations are a bit brittle though. They aren't really made to be permanently identifiers, which technology like this wants. There is also no feature work being planned for wikimedia maps for the foreseeable future. —TheDJ (talk • contribs) 08:15, 15 August 2018 (UTC)
- mw:Wikimedia Maps and mw:Help talk:Extension:Kartographer would be the main on-wiki pages, you can also file bugs/feature requests on Phabricator (see existing maps tasks) - Evad37 [talk] 03:26, 15 August 2018 (UTC)
- Hmm, that's too bad. Is the Maplink feature being maintained by anyone in particular? How might I go about suggesting that? Referring to OSM relations individually would allow for a lot of versatility in certain applications. Roadsguy (talk) 03:02, 15 August 2018 (UTC)
- Something might be possible with
<mapframe>
and a wikidata query using Sparql (see GeoShapes_via_Wikidata_Query). A map of highwsys in Kerala is constructed from numerous OSM items in the List of state highways in Kerala article. Unfortunately, I can't explain how this works. Jts1882 | talk 06:30, 15 August 2018 (UTC)- That query actually just specifies multiple Wikidata items, specifically items which are highways (have instance of (P31): highway (Q269949)) and are in India (have country (P17): India (Q668)) and are state highways (have transport network (P16): list of state highways in Kerala (Q6640541)). It still won't allowing for different styling for different sections of a single road. - Evad37 [talk] 07:40, 15 August 2018 (UTC)
Performance problem (?)
New York State Route 22, a featured article, is currently in Category:Pages with script errors due to The time allocated for running scripts has expired. errors, six of which appear at the end. Looking at the page source I see this for the template etc. usage:
Transclusion expansion time report (%,ms,calls,template) 100.00% 10679.829 1 -total 87.82% 9378.499 1 Template:Infobox_road 87.50% 9345.154 1 Template:Infobox 85.65% 9146.937 1 Template:Maplink 5.11% 545.769 2 Template:Reflist 3.71% 396.299 73 Template:NYint 1.86% 198.436 83 Template:Jct 1.25% 133.426 24 Template:Cite_map 1.00% 106.684 12 Template:Fix 0.87% 93.282 47 Template:Convert
Almost all of the time is due to this template (ignore the infoboxes, which include it so also have a high cost). I don’t see why as the template does not seem as it should be expensive, and is widely used so any problems would have shown up already. Perhaps there is something about this article that causes particular problems for it.--JohnBlackburnewordsdeeds 13:53, 7 October 2018 (UTC)
- OK, I can see one reason it might be expensive. It is not just drawing a map but drawing the road. The KML for it is here: Wikipedia:Map data/Wikipedia KML/New York State Route 22 and that is a lot of data. Pinging Fredddie who created that data and might have some ideas why it is so expensive.--JohnBlackburnewordsdeeds 13:58, 7 October 2018 (UTC)
- @JohnBlackburne: I copied the data over to commons:Data:New York State Route 22.map. Could you run those numbers again? My thinking is that now that the map is being drawn on the Commons side, performance on the ENWP should be better. I could be entirely wrong, but hey, it's worth a shot. –Fredddie™ 14:15, 7 October 2018 (UTC)
- The article problem now seems fixed – it’s not just reduced the cost but eliminated it as best I can tell. The commons page takes a few seconds to render but I guess that’s not a problem. I have no experience of this sort of map, but whatever you did seems to have resolved it.--JohnBlackburnewordsdeeds 14:26, 7 October 2018 (UTC)
- @JohnBlackburne: I copied the data over to commons:Data:New York State Route 22.map. Could you run those numbers again? My thinking is that now that the map is being drawn on the Commons side, performance on the ENWP should be better. I could be entirely wrong, but hey, it's worth a shot. –Fredddie™ 14:15, 7 October 2018 (UTC)
Error using decimal format
@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)
Multipoint shapes from OSM
Wind farms are essentially a collection of point features (each wind turbine tower). Open Street Map has a node for each turbine. I have created a few OSM Relation entities consisting of the collection of all the towers in the farm, with attributes that apply to the farm as a whole (power output, wikidata ID etc). Is it possible to render this OSM multipoint relation in Wikipedia? An example is Snowtown Wind Farm. If this cannot work as currently set up, is there a better way of doing it, and what should that look like (in Wikipedia, Wikidata and OSM)? --Scott Davis Talk 01:26, 22 November 2018 (UTC)
Inconsistent behavior of when using inverse-shape
Today I noticed that when you enlarge the interactive map on Washington, D.C., it doesn't show the shape at all.
If you copy the code ({{maplink|frame=yes|plain=y|frame-width=285|frame-height=285|zoom=8|id=Q61|type=shape-inverse}}) somewhere else (see right), it's getting worse there: it doesn't even show the shape in the frame. Keep in mind I kept the id=
part, so it's supposed to work.
Part 2
I can't seem to reproduce this bug with other data, but found another inconsistency:
- {{maplink|type=shape-inverse|id=Q1094308|text=Inverted shape (no frame)}}
- Inverted shape (no frame)
- {{maplink|frame=yes|type=shape-inverse|id=Q1094308|text=Inverted shape (has frame)}}
As you can see I have two exactly same maplink, but only the second one has frame.
- When you click the first one (link), the enlarged interactive map zooms out all the way to global;
- When you click on the second one (frame), however, the enlarged interactive maps zooms in to the area selected (better behavior) The frame itself still shows global, though. --fireattack (talk) 20:18, 1 February 2019 (UTC)
Map kills iOS Wikipedia app
This is great in Chrome desktop. While trying to implement it myself I discovered that it crashes the Wikipedia app on iOS. Steps to repro:
- In the article e.g. New York City in the app, tap Quick Facts to open the infobox.
- Scroll down the "Interactive map" and tap it. The screen flickers white then returns to its previous state.
- Tap the map again. The screen goes almost completely white.
- Can no longer interact with the Wikipedia app, and it has to be force killed.
--Cornellier (talk) 14:12, 19 February 2019 (UTC)
Where to report problem with the Wikimedia map?
Sorry if this is the wrong place to report this.
It seems that the island Åland, more than 1,500 km2, is missing on the Wikimedia map used by the Maplink template, see Map 1. Some roads and places are displayed when you zoom in, but the "layer" for land is completely missing, see Map 2. Compare this to OpenStreetMap. --Larske (talk) 06:14, 18 February 2019 (UTC)
- @Larske: Errors that appear on Wikimedia maps, but not OSM maps, can be reported on Phabricator (you can log in with you Wikipedia account). See mw:How to report a bug for instructions (for the tags, use Maps) - Evad37 [talk] 23:40, 19 February 2019 (UTC)
- Thanks, I will do that. --Larske (talk) 23:53, 19 February 2019 (UTC)
- At least another European island, Kronshtadt, is also missing from the map.--eh bien mon prince (talk) 20:58, 1 March 2019 (UTC)
Crossing the 180th meridian
Shapes that cross the antimeridian seem to be consistently sliced into two (see the transcluded map of Chukotka Autonomous Okrug for an example of this).--eh bien mon prince (talk) 11:08, 9 March 2019 (UTC)
- And when opened to full screen, the eastern part of entity is not marked. 77.183.233.64 (talk) 08:38, 11 March 2019 (UTC)
- There's a bug report for this at phab:T144777 - Evad37 [talk] 09:41, 11 March 2019 (UTC)
Hello. Can someone help me figure out what is causing this error? I can't seem to figure it out... Basically, I'm trying to instate these functions, but I don't know which part is causing the errors:
- If coordinates are not set locally, it should fetch from wikidata
- If coordinates are set locally, wikidata values should be ignored
- If
|location_map = no
the display of location map (i.e. mapframe) should be suppressed (all other values are to be ignored) - If no coordinates are set locally nor on wikidata, the display of location map (i.e. mapframe) should be suppressed, and the respective caption parameter should not be displayed.
Thanks in advance! Rehman 13:53, 9 March 2019 (UTC)
- @Rehman: It sounds like what you want is {{Infobox mapframe}}, but with an override for when coordinates are specified locally. It shouldn't be too hard to add that option to {{Infobox mapframe}}. - Evad37 [talk] 01:19, 10 March 2019 (UTC)
- Evad: Yes exactly, it is missing the local override option. I'm unable to add myself as Lua is not something I'm good at. Would you be able to add that feature please? Rehman 01:51, 10 March 2019 (UTC)
- @Rehman: Done - Evad37 [talk] 02:06, 10 March 2019 (UTC)
- Thanks a lot Evad37, that was bothering me for a while! :) Rehman 06:34, 10 March 2019 (UTC)
- Evad37, do you also see articles such as Mampuri Wind Farms with a blank location map? The map displays well in edit-preview though... Articles with the region set seems to be working.... Rehman 06:44, 10 March 2019 (UTC)
- Sometimes a WP:NULL edit is required to make the maps work, which I've just done for Mampuri Wind Farms. Maps behaving a bit differently in preview mode is a known issue, there's a bug report for it somewhere on Phabricator - Evad37 [talk] 08:07, 10 March 2019 (UTC)
- @Rehman: Done - Evad37 [talk] 02:06, 10 March 2019 (UTC)
- Evad: Yes exactly, it is missing the local override option. I'm unable to add myself as Lua is not something I'm good at. Would you be able to add that feature please? Rehman 01:51, 10 March 2019 (UTC)
- Thank you. Rehman 15:37, 12 March 2019 (UTC)
geoshapes not being displayed
Some geoshapes selected through the query function of this template are not being displayed, even though the Wikidata item is correctly linked to the OSM relation and the item shows up on the Wikidata query itself. Antropovsky District is but one example of this (notice how it is not shown on the location map). I can't figure out the cause of this, and would be grateful for any help.--eh bien mon prince (talk) 19:27, 8 March 2019 (UTC)
- In fact, even calling {{maplink}} directly doesn't help (see transclusion to the right).--eh bien mon prince (talk) 19:31, 8 March 2019 (UTC)
- @eh bien mon prince: The shape is showing up for me in this maplink transclusion. Not sure why you didn't see it – perhaps a caching issue? It can take some time (up to 24 hours I think) for changes to map relations/features to show up on wikimedia maps. (Also, note that in order to be displayed on maps it's actually the OSM relation/feature that has to be tagged with the wikidata QID – the link to OSM from the wikidata item is merely for convenience.) One other thing you can try is using
<mapframe>...</mapframe>
tags directly per mw:Help:Extension:Kartographer#GeoShapes via Wikidata Query – if it doesn't work like that, then the problem is with the MediaWiki extension. Or if it does work, then we can try to figure out why it doesn't work with this template. - Evad37 [talk] 00:54, 9 March 2019 (UTC)- Thanks for the reply. I tried to clear the cache, and open this page on different browsers (Firefox/Chrome), and I still cannot see the shape. If you go to Antropovsky District, do you see the district highlighted in red within the location map? Curiously enough, trying to use
<mapframe>...</mapframe>
directly fails to display anything at all, at least in this sandbox attempt.--eh bien mon prince (talk) 11:01, 9 March 2019 (UTC) - Not showing for me here - I see a world map in saved view, and a zoomed in in edit-preview. On Antropovsky District neither, where additionally the area north of it is not marked as part of Kostroma Oblast. Sandbox shows nothing. 77.183.233.64 (talk) 08:46, 11 March 2019 (UTC)
- → This is what I see for Antropovsky District, the mapframe map seems to be working as expected. Not sure what's happening with the sandbox, that's showing up blank for me too. - Evad37 [talk] 09:34, 11 March 2019 (UTC)
- Not showing for me on the above map, too. -- Luitzen (talk) 19:24, 21 March 2019 (UTC)
- Thanks for the reply. I tried to clear the cache, and open this page on different browsers (Firefox/Chrome), and I still cannot see the shape. If you go to Antropovsky District, do you see the district highlighted in red within the location map? Curiously enough, trying to use
- @eh bien mon prince: The shape is showing up for me in this maplink transclusion. Not sure why you didn't see it – perhaps a caching issue? It can take some time (up to 24 hours I think) for changes to map relations/features to show up on wikimedia maps. (Also, note that in order to be displayed on maps it's actually the OSM relation/feature that has to be tagged with the wikidata QID – the link to OSM from the wikidata item is merely for convenience.) One other thing you can try is using
Zoom buttons
Hi. Is it just me, or has the in-article zoom buttons disappeared from the maps? I remember a +
and -
on the top-left corner of mapframes, but now they are gone. Strangely, the buttons are still there in the edit-preview mode. See here for example. Rehman 03:55, 15 March 2019 (UTC)
- On Wikipedia, and most wikis other than Wikivoyage, the emdeded thumbnail is a static map, and the full screen map needs to be opened before the map can be zoomed or panned – per mw:Help:Extension:Kartographer#Getting started. That preview mode shows an interactive map is a bug, phab:T203863. Further explanation can be found in the comments on phab:T202793 - Evad37 [talk] 23:36, 15 March 2019 (UTC)
- Thanks User:Evad37. I could swear I saw the zoom buttons in normal live mode a few months back... Strange. I guess these limitations were put in place to reduce stress on the servers? I noticed the "full" version is live on Meta and Wikidata (example: Lakvijaya Power Station (Q6479997)), so it is technically possible. Rehman 01:31, 16 March 2019 (UTC)
- So what I thought was the bug is a deliberate choice and the bug is edit mode showing the documented behaviour? The description at mw:Help:Extension:Kartographer describes interactive maps embedded on the page and makes one expect an embedded interactive map, as you see in editor mode or on the test wikipedia. Why and when was it chosen to disable this behaviour? It's annoying and makes these maps less desirable. I thought the behaviour had changed and was a bug that would be resolved when the newer software on the test wiki became active. Jts1882 | talk 08:23, 16 March 2019 (UTC)
- "annoying and makes these maps less desirable" - completely agree. Rehman 14:10, 25 March 2019 (UTC)
- Jts1882, I'm not entirely positive, but the reason that we have static images, as I remember it from that time it was launched, was partly for performance reasons (it's a lot of dynamic content to deliver etc. especially on mobile) as well as to have the ability to present some content for people who disabled javascript, for printing etc. The edit mode is registered as a bug, but there too it is actually a performance issue (static rendering is expensive, so doing it for a single user reduces the performance of the preview action too much.)
- My personal question is.. why NOT click the mapframe to open fullscreen ? Why would you use a stamp sized frame to interact with a map ? —TheDJ (talk • contribs) 14:56, 25 March 2019 (UTC)
- To keep everything on the same page. Sometimes it is useful to be able to move in the map while comparing with an adjacent information (in infobox or table). To be honest, I can't remember exactly why it struck me as so irritating, just that I remember it that way. I was also surprised by the behaviour as it deviated from the documentation (now changed) and from the behaviour I was seeing while developing a module using the maps. I must have being doing nearly everything in preview mode as I didn't notice the different behaviour on the published page until months later (or was the behaviour changed after it was introduced). In general I think it is possible to find an alternative static image map that is better than the map provided in mapframe, with the interactive nature of the latter making the difference. If it needs to be expanded to get the benefits, the advantage is lessened in some cases. Well, if it is a performance issue, then that must be how it is. It is good to know the reason, so thanks for the explanation. Jts1882 | talk 15:28, 25 March 2019 (UTC)
Maps don't load on initial page load
Something I've noticed lately is that quite often, map previews won't load on the initial page load. Specifically, maps embedded in {{Infobox road}}
. For instance, the map I created for Interstate 64 in Indiana will not load for me in the infobox. If I click where the map should be, the map will load and I can see what's supposed to be there, when I close the full screen map, there is nothing in the infobox. I'm not sure what the problem is or if it's just on my end. –Fredddie™ 20:19, 23 March 2019 (UTC)
- @Fredddie: I've noticed that often a WP:NULL edit is required to make the thumbnail map display, after a mapframe map is first added to the page or is edited. Or sometimes several null edits. It's probably something like a job queue for generating the static thumbnail images being busy, or getting stuck, or something. Anyway, at the moment the thumbnail map in Interstate 64 in Indiana is displaying for me. - Evad37 [talk] 23:58, 23 March 2019 (UTC)
- Evad37, if you look in the browser console, you get "error 404 https://maps.wikimedia.org/img/osm-intl,7,38.236,-86.916,290x250.png?lang=en&domain=en.wikipedia.org&title=Interstate+64+in+Indiana&groups=_e148a7b8906462f909c54753cb49d72a80a0d758". Opening the image gives "GroupId not available". I suspect this has something to do with the problems with PHP7.2 being tested, which is phab:T214984. —TheDJ (talk • contribs) 14:17, 24 March 2019 (UTC)
- I did enable the PHP7 beta feature, so that may be part of it as well. –Fredddie™ 13:35, 21 April 2019 (UTC)
- Evad37, if you look in the browser console, you get "error 404 https://maps.wikimedia.org/img/osm-intl,7,38.236,-86.916,290x250.png?lang=en&domain=en.wikipedia.org&title=Interstate+64+in+Indiana&groups=_e148a7b8906462f909c54753cb49d72a80a0d758". Opening the image gives "GroupId not available". I suspect this has something to do with the problems with PHP7.2 being tested, which is phab:T214984. —TheDJ (talk • contribs) 14:17, 24 March 2019 (UTC)
Map rendering as a static image, with full screen button not working
Hi all, I've been trying to create a maplink template to show rail lines in Melbourne, you can see the map on my user page or here: https://en.wikipedia.org/wiki/Railways_in_Melbourne#Infrastructure The interactive map works well on previewing edits, but when I publish it renders as a static image. This isn't a huge issue except the full-screen button seems to not work either, and is just a static unclickable image too. Does anyone know why this is happening? Did I mess up the template or is the map just too complex? Thanks. Gracchus250 (talk) 02:54, 20 April 2019 (UTC)
- The mapframe maps do behave differently in preview and in the published main namespace. The interactive element in the non-expanded map is disabled (because it is resource heavy, iirc), so the static image is normal, although disappointing. But the inactive full-screen button isn't usual. Have you tried reducing the number of elements in the map, say with just one line? [edit: not this] Jts1882 | talk 13:05, 20 April 2019 (UTC)
- It seems to me that the interactive element of the map has been disabled in most namespaces (main, user). They seem to still work in template namespace, but not when transluded to the main namespace. Jts1882 | talk 17:15, 20 April 2019 (UTC)
- @Gracchus250:. The interactive maps appear to have been disabled. Some maps I created in the past in template space still work interactively in template space but not when transcluded. New maps in template space also don't work. Moreover, edits to functioning maps seem to disable them. I can't find anything to explain the chenged policy, although I assume it must be the computer overhead. Jts1882 | talk 09:52, 21 April 2019 (UTC)
- Thanks for your help, my different tests have found a similar thing: maps sometimes working interactively on preview but changing on publish. Removing elements doesn't seem to work, though I might test this again. The behaviour does seem to be a bit inconsistent. I don't mind if it's a static image it's just a huge shame if the expand button doesn't work, because that negates the whole point of the map. Hopefully it's just a bug and not a policy change. Do you know if there's anyone to report this to? Thanks Gracchus250 (talk) 11:07, 21 April 2019 (UTC)
The bug have already been reported at https://phabricator.wikimedia.org/T221439 C933103 (talk) 15:19, 21 April 2019 (UTC)
- Ah, thank-you. It's good to know this is a temporary issue rather than another performances related restriction on the interactive functionality. Jts1882 | talk 15:53, 21 April 2019 (UTC)
- It's still not resolved here on English Wikipedia, but the maps seem to be expanding again on Wikimedia. Jts1882 | talk 06:57, 25 April 2019 (UTC)
Bug - Can't click to expand map from articles
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)
Not getting the hang of this - help please
There's an OSM feature - https://www.openstreetmap.org/way/96977452 - which has a wikidata QId of Q63322683. Can I / how can I get a maplink showing this shape? My puny attempts - such as {{maplink|frame=yes|type=shape|id=Q63322683}} - are not working. I'd like, ideally, to be able to provide a set of maps to illustrate Alfred Heaver#Heaver developments. Grateful for any help; thx. --Tagishsimon (talk) 03:18, 25 April 2019 (UTC)
- @Tagishsimon: It can take a day or so for OSM changes to become available here, per mw:Help:Extension:Kartographer/OSM - Evad37 [talk] 05:17, 25 April 2019 (UTC)
- Okay, thanks Evad37. I'll be patient :) --Tagishsimon (talk) 09:11, 25 April 2019 (UTC)
Not getting hang part 2
Sorry to be a bother again. Patience solved the above issue. Could anyone tell me where this one is falling down? OSM relation is 7715239 and the wikidata QId is Q42791306. All data is 12 months or so old. Thanks --Tagishsimon (talk) 23:48, 26 April 2019 (UTC)
- For relations, only those with type multipolygon, route, or boundary will display on maps. This is a known issue, phab:T156433, which unfortunately the developers are unlikely to fix anytime soon. - Evad37 [talk] 00:35, 27 April 2019 (UTC)
- Thanks Evad37. Much appreciated. --Tagishsimon (talk) 01:03, 27 April 2019 (UTC)
Looking at this article right now one sees only a box icon where the map should be in the infobox. Someone happened to do a GA review on 25 April and at that point the map did appear. So I'm thinking the problem is not local to the article, but in the templates. That is, the breakage is external to the article? Help? Shenme (talk) 04:05, 24 May 2019 (UTC)
- In discussing with Bsoyka I just noticed something that has me freaked out. The map does not display when bringing up the article. But then, click edit, then click "Show Preview" without having changed anything. For me, the map displays in preview! To me, that implies strange interactions and timing with respect to Javascript imports. Youch! Shenme (talk) 05:37, 24 May 2019 (UTC)
- @Shenme: I think this might be an issue on your end. I've checked with my PC and phone (both running Chrome) and everything seems to be in working order (with the expansion button appearing in the top right and the expanded view able to scroll around). SounderBruce 05:57, 24 May 2019 (UTC)
- Always a possibility, which is why I checked after disabling AdblockPlus and NoScript in Chrome 74, and then tried Microsoft Edge, with same results. Now have tried my Win10 with MS IE, FireFox 66, and updated to FireFox 67, and FireFox developer edition 64, and updated to 68. And partner's separate PC running Win7 FireFox 66, updated to FireFox 67, Chrome 74. All with same results, just a boxy icon. And logged in and not logged in. I will be very interested in the answer to all this. Shenme (talk) 06:34, 24 May 2019 (UTC)
- I also only saw the box. This blank map issue comes up time to time with mapframe for some reason, but is usually temporary. I did a null edit and the map is now visible for me. Jts1882 | talk 06:53, 24 May 2019 (UTC)
Hmm, still happening to me (no map) today, trying different browsers and clearing cache, etc. Even tried a "?action=purge". Haven't tried a reboot... :) Shenme (talk) 20:42, 31 May 2019 (UTC)
Interstate 75 - bug with display
Interstate 75 is displaying error messages of "The time allocated for running scripts has expired." I have traced the error to the maplink template. The code currently in the article is {{maplink|frame=yes|plain=yes|frame-align=center|frame-width=290|frame-height=240|frame-lat=37.00|frame-long=-84.29|zoom=3|type=line|raw={{Wikipedia:Map data/Wikipedia KML/Interstate 75}}}}
, which renders thus: but after Fredddie's changes, it now looks like this:
I don't know the KML format enough to debug. Can somebody take a look at this and assist? Again, it was working until recently, but old versions of the page aren't rendering correctly, so all I can think of is a change to this template broke it? —C.Fred (talk) 18:12, 31 May 2019 (UTC) revised 00:23, 1 June 2019 (UTC)
- It's not the template per se, it's the amount of data the template is trying to process. I have moved the data over to Commons at commons:Data:Interstate 75.map and changed the instance on the I-75 page, so it now displays. –Fredddie™ 20:33, 31 May 2019 (UTC)
- I wondered if that was the case, because the road is so long with so many curves. Thank you for fixing it! —C.Fred (talk) 00:23, 1 June 2019 (UTC)
Automatic zoom for highlighted areas not working
I added the template to Pinelands National Reserve. When I delete zoom parameter from the template, I guess it should fall back to some kind of default or automatic zoom. But what happens is only a blank white map is shown with a red dot in the middle. Is this a bug?--Kozuch (talk) 12:18, 15 June 2019 (UTC)
Too few points returned when using Wikidata
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
@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:
{{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)
FM 812
I think I'm having a problem similar to User:Shenme (in above section #Washington State Route 99) on Farm to Market Road 812 in that the road line is visible in preview but not on the saved page. But only this article and not any others where I've recently added maps. ―cobaltcigs 11:25, 2 August 2019 (UTC)
FM 734 | FM 812 |
Problem seems reproducible in above right map (try preview vs. saved page) which seems to imply something other than a caching issue with the FM 812 article itself. Please advise if I've done something different/wrong on the corresponding relation #2538184 vs. #2534475 over on OSM. ―cobaltcigs 11:40, 2 August 2019 (UTC)
- The map in Farm to Market Road 812 is displaying for me on the saved page, but not in the above map (as of now). The difference between preview and the saved page would be because preview uses dynamic thumbnails (you can drag the map around with your mouse, and change zoom levels), whereas the saved page uses a static thumbnail image... so it could very well be a caching-related issue. Sometimes WP:NULL edits (or other subsequent edits) can help. - Evad37 [talk] 02:12, 3 August 2019 (UTC)
Seems to be working now, despite not having been edited. ―cobaltcigs 10:55, 4 August 2019 (UTC)
- A new version of Module:Mapframe was pushed to production few hours ago which may have fixed your issue.--Kozuch (talk) 11:00, 4 August 2019 (UTC)
Discussion on addition of this template to articles
See Wikipedia:Administrators'_noticeboard/Incidents#OpenStreetMap_advertising?. Nemo 18:14, 28 July 2019 (UTC)
- This seems to have been moved a few times, and is now at Wikipedia:Village pump (proposals)#OpenStreetMap. ―cobaltcigs 23:09, 5 August 2019 (UTC)
Bug problem?
Hello, can someone explain to me what actually happen to this map as seen from the article infobox of Bintulu, George Town, Iskandar Puteri, Johor Bahru, Kota Kinabalu, Kuala Terengganu, Miri, Sandakan, Sibu and Tawau? Thank you. Night Lanternhalo? 08:08, 16 August 2019 (UTC)
- I can tell you what is happenning but not why. The map is not picking up the correct coordinates. I've added the coordinates to the maplink template in the infobox of Bintulu and the map displays correctly. The coordinates at Wikidata seem correct so I can't explain why the default is getting the wrong coordinates. Jts1882 | talk 10:27, 16 August 2019 (UTC)
- I see.. I also wondered if someone changed something in Wikidata but can't see something different in the history log. Anyway, thanks for the fix in Bintulu! Night Lanternhalo? 10:32, 16 August 2019 (UTC)
Basemap bug
I don't know to whom or where to file a bug report, but Lake Huron is gone. –Fredddie™ 02:14, 27 August 2019 (UTC)
Interstate 45
@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)
- @Kozuch: Fixed with [2] - Evad37 [talk] 09:53, 18 October 2019 (UTC)
type=spape-inverse bug
Manhattan. --Kozuch (talk) 15:25, 13 August 2019 (UTC)
This seems like phab:T178370 and/or phab:T160889 - Evad37 [talk] 10:03, 18 October 2019 (UTC)
Support for fill-opacity
@Evad37:Can support for |fill-opacity=
be added for geoshape and geomask. I think the following code should do it, applying opacity only when fill is explicitly set.
-- insert after line 20 opacity = "fill-opacity",
--insert after line 277 local opacity = getParameterValue(contentArgs, 'opacity') if opacity then data.properties['fill-opacity'] = tonumber(opacity) end
It works on the infobox at London using, but I'm reluctant to make the change myself as I don't have a comperhensive set of examples to test generally. I don't see why it should cause problems elsewhere, but I'm not familiar enough with the module use to be sure. Jts1882 | talk 06:47, 27 September 2019 (UTC)
- @Jts1882: Done [3], you can now use
|fill-opacity=
. I also added support for|stroke-opacity=
. - Evad37 [talk] 11:46, 18 October 2019 (UTC)- Thank-you. Jts1882 | talk 11:59, 18 October 2019 (UTC)
Support for marker-size
I just added support for |marker-size=
with valid values of "small", "medium" or "large". it doesn't look like I broke anything, but let me know if I did. Frietjes (talk) 14:46, 24 October 2019 (UTC)
- @Frietjes: The module now refers to
L10n.defaults.markerSize
on line 254, but markerSize wasn't added to the L10n.defaults table (lines 98-106), so it evaluates tonil
. I think that probably wasn't your intention, but in any case, the code would be clearer if either a default markerSize was added to the L10n.defaults table, or ifnil
was used directly rather than a non-existent table key. - Evad37 [talk] 15:23, 24 October 2019 (UTC)- @Evad37: that was my intention, since the default was to not set that value, but we can explicitly set the default value to nil if you like that better. Frietjes (talk) 19:03, 24 October 2019 (UTC)
Timeout errors
Minnesota State Highway 65 is currently showing numerous "The time allocated for running scripts has expired" errors. They are due to the following line in the infobox:
|map={{maplink|frame=yes|plain=yes|frame-align=center|frame-width=290|frame-height=240|type=line|raw={{Wikipedia:Map data/Wikipedia KML/Minnesota State Highway 65}}}}
That sets raw
from Wikipedia:Map data/Wikipedia KML/Minnesota State Highway 65 which is 88 kilobytes.
I have seen this error in other articles before. I don't recall the details but I don't think anything was done to fix them. Instead, it looks as if some caching made the articles work once the server was sufficiently idle to allow it to successfully render the page (that's a guess). @Evad37: You have done a lot of work on Module:Mapframe. Do you know what the fundamental problem is? @Sable232: You tried to fix the error and may be interested in this discussion. Johnuniq (talk) 08:46, 22 January 2020 (UTC)
- I think 88kb is too big for the Lua to handle – it is significantly larger than several map data pages I chose semi-randomly from Special:PrefixIndex/Wikipedia:Map_data/. The module isn't actually doing that much with the raw data – just triming whitespace and control characters (which can break the map if present), and at the end the constructed
<mapframe>...</mapframe>
tag is preprocessed so the map is shown in the article. This last step is what seems to be taking up the time, according to the parser profiling information shown when previewing [4] - Evad37 [talk] 13:30, 22 January 2020 (UTC) - Expanding the maplink template via Special:ExpandTemplates got rid of the script timeout error, but is hardly ideal since now there's 88kb of map data in the article. - Evad37 [talk] 13:36, 22 January 2020 (UTC)
- Pinging map data page creator @420Traveler: so they are aware of this issue - Evad37 [talk] 13:42, 22 January 2020 (UTC)
- Thanks, that is a good edit you made at the article (diff)—it fixed the problem and it inserted a good comment and edit summary which specify the source of the map data. If this situation becomes common (as mentioned, I've seen it before), one ugly workaround would be to automate what you did. The trick would be to make a subpage of Wikipedia:Map data/Wikipedia KML/Minnesota State Highway 65 (
/mapframe
or/expanded
?) with the expanded mapframe wikitext) and transclude that into the article. I don't know a way to automate Special:ExpandTemplates but the idea would be that a two-step process would be needed to update the map: edit the map data then do something clever to quickly use ExpandTemplates to update the subpage. Johnuniq (talk) 04:20, 23 January 2020 (UTC)
- Thanks, that is a good edit you made at the article (diff)—it fixed the problem and it inserted a good comment and edit summary which specify the source of the map data. If this situation becomes common (as mentioned, I've seen it before), one ugly workaround would be to automate what you did. The trick would be to make a subpage of Wikipedia:Map data/Wikipedia KML/Minnesota State Highway 65 (
Two more articles have the same problem:
- Arizona State Route 88 • Wikipedia:Map data/Wikipedia KML/Arizona State Route 88
- Minnesota State Highway 60 • Wikipedia:Map data/Wikipedia KML/Minnesota State Highway 60
I'm listing these (and will list any others) merely to document the problem. Johnuniq (talk) 06:44, 24 January 2020 (UTC)
- Both are currently working for me, though the Lua time usage is quite high – 8.633s and 9.030s out of the 10s limit. - Evad37 [talk] 08:39, 24 January 2020 (UTC)
- OK. I monitor articles that appear in Category:Pages with script errors and the pages I mentioned were in that category, but are no longer there. I suspect that a certain amount of Lua work on a busy server may exceed 10 seconds and so give the error, while a not-busy server would do the same amount of work in under 10 seconds, and that fixes the problem. Johnuniq (talk) 08:55, 24 January 2020 (UTC)
Map with markers shows incorrect name for one Marker
In the full screen rendering title(popup) for type44 (yellow) and type4 (red) display same. Type4 should display Inkollu. Arjunaraoc (talk) 23:11, 21 July 2019 (UTC) https://phabricator.wikimedia.org/T228608 bug logged.Arjunaraoc (talk) 06:33, 22 July 2019 (UTC)
- This must be a bug in the Mapframe script. type4=point is showing the title44= text-value. Is there someone with knowledge/access to the Lua (?) to sort this out? RobinLeicester (talk) 13:42, 11 February 2020 (UTC)
- @RobinLeicester and Evad37: The code doesn't seem to be handling the parameter suffixes properly. So
|type4=
is picking up the place name from|title44=
. The code is too complex for me. My best guess is the string match on line 172 of Module:Mapframe is not strict enough, but I don't know how to fix it. Jts1882 | talk 15:43, 11 February 2020 (UTC)- @Arjunaraoc, RobinLeicester, and Jts1882: Fixed [5]. It was that line, though why it only affected a few parameters like
|title4=
and|title44=
, and not others, is beyond me. - Evad37 [talk] 02:26, 12 February 2020 (UTC)- @Evad37: Thanks for fixing. --Arjunaraoc (talk) 06:37, 12 February 2020 (UTC)
- @Evad37: I think its because of the way the parameters are stored in tables. The code works if the parameters are in the correct order (4 gets 4 before 44), but the args are not always in the order they are placed in the template. Most are but a few get scrambled for some reason. It might be something to do with metatables (whatever they are). Jts1882 | talk 09:37, 12 February 2020 (UTC)
- Great work with the fix. Maplink appears to now be a static image, so you have to click through to full screen see any names. Is that the longterm plan? RobinLeicester (talk) 17:12, 13 February 2020 (UTC)
- @RobinLeicester: As far as I know, yes; see phab:T202793 for background - Evad37 [talk] 23:56, 13 February 2020 (UTC)
- Great work with the fix. Maplink appears to now be a static image, so you have to click through to full screen see any names. Is that the longterm plan? RobinLeicester (talk) 17:12, 13 February 2020 (UTC)
- @Arjunaraoc, RobinLeicester, and Jts1882: Fixed [5]. It was that line, though why it only affected a few parameters like
- @RobinLeicester and Evad37: The code doesn't seem to be handling the parameter suffixes properly. So
Hi, may I request some help in working the Mapframe utility! I have been experimenting with Mapframe in the hope of using it for generating many maps for the highway articles for Newfoundland and Labrador. I have created an article identifying a route called the Straight Shore. I would be so grateful if someone could show me how to create these maps and highlight the route. HJKeats (talk) 13:35, 20 February 2020 (UTC)
- HJKeats, To get a road to show on a mapframe map requires several elements to all be in place. The line of the road is supplied by OpenStreetMap, and there also needs to be a 'wikidata tag' installed within OpenStreetMap, with the Q number matching a wikidata element to the map element. In the case of the 330, there is a wikipedia page for Newfoundland and Labrador Route 330 which has Q number, (Q7017896) and also your Straight Shore, which has been allocated Q85803624. Since the OpenStreetMap splits route 330 into 2 sections, and didn't have the Q numbers entered for either stretch, I have now edited the tags to give the western section the Q7017896 tag, and the the shoreline section the Q85803624 tag. In a few days the tag values will get transferred across in some way, and because you have already added the Q number in the id parameter, you should find that the shoreline section of road will appear on your map. If you wanted a map with both 330 sections showing, it is possible to put a list of Q values into the id parameter, separated with commas. If you are going to be producing more such maps, you will want to get to grips with using www.openstreetmap.org so that you can find the section of road, and add its Q value tag. (more details at www.mediawiki.org/wiki/Help:Extension:Kartographer/OSM
- What I don't know about, and someone else may be able to comment on this, is how the system behaves if there are lots of short sections of road in OSM, which are all really only one wikipedia article. Can they be joined together within OSM?, or all be given the same Q number tag, and will they all get mapped if that is done. Anyone any offers on this point? RobinLeicester (talk) 00:21, 25 February 2020 (UTC)
- @RobinLeicester: All the individual roadways (the individual components, not any existing relations) need to be grouped into a single relation, which is then tagged with a wikidata Q number - see mw:Help:Extension:Kartographer/OSM#How_to_get_a_single_object_from_multiple_lines - Evad37 [talk] 03:28, 25 February 2020 (UTC)
Help with code
Hello. Can someone help me a raw wikidata maplink code for all mountains in Sri Lanka that are over 500m in elevation? I cannot seem to get it right. The data on wikidata is incomplete, and is something I am working on. Thank you! Rehman 06:52, 11 March 2020 (UTC)
- @Rehman: Displaying coordinates based on a Wikidata query is not currently possible with mapframe maps – the feature request for this is phab:T188291. I can help with the query, which can be viewed on the Wikidata Query Service as a table or a map: Link to query - Evad37 [talk] 09:36, 11 March 2020 (UTC)
#Mountains in Sri Lanka with elevation > 500m SELECT ?item ?label ?coord WHERE { ?item wdt:P31 wd:Q8502 . # instance of (P31): mountain (Q8502) ?item wdt:P2044 ?elev filter(?elev > 500) . # elevation (P2044) > 500m ?item wdt:P17 wd:Q854 . # country (P17): Sri Lanka (Q854) ?item wdt:P625 ?coord . # coordinates SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?item rdfs:label ?label } }
- Thank you, Evad37! I've tried testing 3 points manually at User:Rehman/sandbox. Could you tell me what I am doing wrong please? Rehman 12:31, 11 March 2020 (UTC)
- I've taken the liberty of editing you sandbox. It's working now. — Jts1882 | talk 12:49, 11 March 2020 (UTC)
- Marvellous! Thanks, Jts1882. Rehman 12:51, 11 March 2020 (UTC)
- I've taken the liberty of editing you sandbox. It's working now. — Jts1882 | talk 12:49, 11 March 2020 (UTC)
- Thank you, Evad37! I've tried testing 3 points manually at User:Rehman/sandbox. Could you tell me what I am doing wrong please? Rehman 12:31, 11 March 2020 (UTC)
Tech talk on maps
mw:Tech talks will offer a talk about Maps on 25 March 2020 at 18:00 UTC (11:00 a.m. PDT, 2:00 p.m. EDT). You can watch the talk live at https://www.youtube.com/watch?v=2LH-pYdi9Ks Questions will be taken on m:IRC at #wikimedia-office
The above message is a copy of a message posted at Wikipedia:Village_pump_(technical)#Maps by User talk:Whatamidoing (WMF). — Jts1882 | talk 16:36, 11 March 2020 (UTC)
Map icons
I love mapframe and use it in innumerous Wikipedia articles. But it really calls out all the icons that are missing. There's countless. I've talked about this issue on Wikipedia, Mediawiki, Phabricator, and Github, and still receive no attention...
Is there a way to just add icons from Commons:Category:Icons? That way I could just use something like this ( ) without jumping through so many hoops every time a new icon idea comes up... ɱ (talk) 04:22, 12 April 2020 (UTC)
- I don't see any way we can do this on-wiki. Plus icons with CC-BY, CC-BY-SA, or other licences that require attribution have to be linked to their file description page, and so aren't really suitable for use within a marker. - Evad37 [talk] 02:46, 13 April 2020 (UTC)
- It's unfortunate because this is one thing pushpin maps have had for years, along with other things it does better - visible labels, ability to hover over/click points to view details/go to a different article (needs to be an interactive map within the article like Wikivoyage I suppose), ability to easily click to different views (city, state, country (worked around alright with articles like Columbus, Ohio)), and maybe more... ɱ (talk) 19:38, 17 April 2020 (UTC)
- Details can include pictures, descriptive information, links to other positions on the same map, links to other articles and maps. example -- Matroc (talk) 08:09, 21 April 2020 (UTC)
- I don't see how this relates to any of my instances of pushpin maps being better than maplink ones? ɱ (talk) 03:42, 30 April 2020 (UTC)
- Details can include pictures, descriptive information, links to other positions on the same map, links to other articles and maps. example -- Matroc (talk) 08:09, 21 April 2020 (UTC)
- It's unfortunate because this is one thing pushpin maps have had for years, along with other things it does better - visible labels, ability to hover over/click points to view details/go to a different article (needs to be an interactive map within the article like Wikivoyage I suppose), ability to easily click to different views (city, state, country (worked around alright with articles like Columbus, Ohio)), and maybe more... ɱ (talk) 19:38, 17 April 2020 (UTC)
Display inconsistencies
Hi, hope someone here can help figure this out - why is the map at Columbus, Ohio different from the map at Commons:Category:Columbus, Ohio (in the wikidata infobox)? Immediately a clear difference is that enclaves are part of the Commons map, but not part of the Wikipedia one. AFAIK both are using the wikidata ID so what is different, how can the Wikipedia one include the enclaves? Best, ɱ (talk) 03:45, 30 April 2020 (UTC)
- Looks like its something to do with the masking. The enclaves are there with
|type=shape
, but not with|type=shape-inverse
. I suspect this means the fix needs to be with the Kartographer extension rather than the module. — Jts1882 | talk 07:12, 30 April 2020 (UTC)- The masking doesn't work properly if there are cutouts within the shape: phab:T228546 - Evad37 [talk] 09:56, 30 April 2020 (UTC)
- Okay, thanks. I hope this is fixed soon. For now I'll take out the 'inverse'. But it is really important to me this gets fixed; the inverse display is more usable/readable for this purpose. ɱ (talk) 16:12, 30 April 2020 (UTC)
- The masking doesn't work properly if there are cutouts within the shape: phab:T228546 - Evad37 [talk] 09:56, 30 April 2020 (UTC)
Template options
Minor suggestion - can parameters at {{maplink}} like "|plain=yes|frame=yes|frame-align=center" be automated into one parameter for infoboxes? So a maplink template in an infobox could then potentially be as short as "{{maplink|type=point|infobox=yes}}"? ɱ (talk) 03:05, 19 April 2020 (UTC)
- Makes sense. Maybe it would also help if we can rearrange the doc page to more clearly differentiate infobox uses and non-infobox uses. It seems clear enough to me; just my two cents. Rehman 05:38, 19 April 2020 (UTC)
- @Ɱ and Rehman: {{Infobox mapframe}} is even shorter... - Evad37 [talk] 10:11, 30 April 2020 (UTC)
- Thanks! Guess I've never found this. ɱ (talk) 16:26, 30 April 2020 (UTC)
- @Evad37: it still has some strange behavior, different than what I would expect like the above idea. When trying it out at Grandview Heights, Ohio, for instance, it shows a point and shape, and doesn't seem to allow inverse shapes or different opacities... ɱ (talk) 03:33, 1 May 2020 (UTC)
- Thanks! Guess I've never found this. ɱ (talk) 16:26, 30 April 2020 (UTC)
- @Ɱ and Rehman: {{Infobox mapframe}} is even shorter... - Evad37 [talk] 10:11, 30 April 2020 (UTC)
Are multiPoint, lineString and polygon possible?
Hallo. I saw, that the Catalan module ca:Mòdul:Map has some additional features, no point
only: multiPoint
, lineString
and polygon
. It's possible to add them to the English module? Look at the fourth and fifth examples of the template use on ca:Plantilla:Map draw/ús/exemples at "Una línia" and "Un polígon", please. This template and module don't need the help of a template {{Coord}} for the coordinates, too. Greetings --Tlustulimu (talk) 09:15, 28 April 2020 (UTC)
- @Tlustulimu: Is it really desirable to have a bunch of coordinates within articles? More complicated, arbitrary shapes and lines can already be defined in geoJson files, either transcluded from a subpage of Wikipedia:Map data, or stored as a .map page on Commons. As for the use of {{Coord}}, that is there for consistency between templates using coordinates (such as various infobox templates), and to allow coordinates to be specified in a wide variety of formats (decimal, DMS, using negative coords or specifying N/S/E/W, etc.) - Evad37 [talk] 10:08, 30 April 2020 (UTC)
- @Evad37: Why not, if the module already uses "linestring" internally for the
type=circle
? --Tlustulimu (talk) 12:08, 30 April 2020 (UTC)- Because it dumps a bunch of raw data (coordinates) inside an article unnecessarily, rather than a geoJSON file which can easily be reused by other articles, other projects (including wikidata), or anywhere else beyond the wikis (since it is a standard format). - Evad37 [talk] 00:04, 1 May 2020 (UTC)
- @Evad37: Why not, if the module already uses "linestring" internally for the
- If a polygon or line is essential, you can use the
<mapframe>
tag directly (see Kartographer). I agree, though, that it is best to keep raw data out of the articles where possible. — Jts1882 | talk 08:25, 1 May 2020 (UTC)
Abnormal shapes
In the infobox for Tokyo, the shape produced by this template has far less sides than the linked OSM relation does, producing a jagged mess. (compare the Beijing infobox and its linked OSM relation, or Shanghai and its relation).
I have checked the Tokyo OSM relation and the Wikidata OSM ID, both of which seem to be perfectly fine.
Could this have to do with an OSM relation that is too detailed? Or maybe the multiple non-contiguous island chains that are part of Tokyo's jurisdiction? — Goszei (talk) 21:32, 29 April 2020 (UTC)
- Direct use of
<mapframe>
does the same. I'm guessing it has something to do with the large size of the whole area including the island chain causing a lower precision rendering. The question is whether there is a way of forcing the full precision. — Jts1882 | talk 08:06, 30 April 2020 (UTC)- @Goszei and Jts1882: This is a known issue: phab:T155919 - Evad37 [talk] 09:52, 30 April 2020 (UTC)
- @Evad37: I see. Well, good luck; I hope it get resolved soon. — Goszei (talk) 02:59, 4 May 2020 (UTC)
- @Goszei and Jts1882: This is a known issue: phab:T155919 - Evad37 [talk] 09:52, 30 April 2020 (UTC)
Circular area
I think I know the answer to this, but I'm asking just to see if maybe there's something I'm missing. I want to create a map with circular shaded area around a central coordinate – think blast radius of 1km. My gut tells me I'm going to have a to draw a circle, but I was hoping there's some hidden parameter I could use. Any ideas? –Fredddie™ 02:30, 24 January 2020 (UTC)
- Circles aren't supported in the geoJson spec[6], so they have to be approximated as many-sided shapes. It is possible to code for that, e.g. [7] is a javascript implementation that could be converted to Lua. - Evad37 [talk] 02:58, 24 January 2020 (UTC)
- @Fredddie: Done:
{{maplink|frame=yes|type=circle|radius=1000|coord={{coord|-31.95|115.85}}|fill=#00ff00}}
→ . - Evad37 [talk] 05:52, 24 January 2020 (UTC)- That's amazing! Johnuniq (talk) 06:53, 24 January 2020 (UTC)
- Wow thanks. Does
|radius=1000
mean that the radius is in meters? –Fredddie™ 15:30, 24 January 2020 (UTC)|radius=
is in metres, but you can also use|radius_km=
,|radius_mi=
, or|radius_ft=
instead for kilometres, miles, or feet. And|edges=
can be used to specify the number of edges for the polygon used to approximate the circle. The default is 32, higher values will give a smoother circle but may have an impact on the Lua resources used - Evad37 [talk] 15:45, 24 January 2020 (UTC)- I have tested creating circles and other shapes on Wikivoyage using Lua Modules since 2016. I also use a multi-sided shape of x amount of sides. Other shapes can be created from circle creation code. (ie: 3 sides can create a triangle, 4 a diamond, 5 a pentagon and so on and so forth. (my use of the word sides equals your parameter edges). In some instances I use an additional parameter to provide orientation (n,s,e,w etc.) -- I also had to resolve or code for actual shape distortion if I placed a larger shape further north or further south of the equator because of the mercator projection which will distort them. In addition, I also had to take into account what happens when a circle runs over the top or bottom of the map (90 or -90). Keep up the good work, Cheers and best wishes from a wiki voyager!! -- Matroc (talk) 04:35, 17 February 2020 (UTC)
- Wow thanks. Does
- That's amazing! Johnuniq (talk) 06:53, 24 January 2020 (UTC)
@Evad37: Hello. It's possible to add a new feature, like ex. {{maplink|frame=yes|type=circle|radius=1000|coord={{coord|-31.95|115.85}}|fill=#00ff00|edges=5|turn=0.5}}
, so that the above edge from the example with 5 edges would be below? Greetings --Tlustulimu (talk) 11:03, 6 May 2020 (UTC)
Cyclone tracks
Zoom
Is a zoom of half-integers, like "9.5", possible? Why or why not? For making shapes and routes display well in maps, I keep having to adjust the zoom, frame-width, and frame-height to try to optimize the view; would be better and simpler to use a more precise zoom level if possible. ɱ (talk) 04:44, 3 May 2020 (UTC)
- The fixed zoom levels is a feature of the Kartographer extension, so any change would have to be requested there. I agree it would be useful, but I wouldn't hold out hope for any changes. I also suspect the very peculiar 0-19 range has a reason, perhaps in facilitating scaling the longitude-latitude calculations. — Jts1882 | talk 07:39, 3 May 2020 (UTC)
- As far as I understand, while the map data is vector data and can theoretically be zoomed to any level, the way the maps work for performance reasons is to stitch together tiles (static raster images), which are generated periodically at preset zoom levels. So to add .5 zoom intervals would require more tiles to be generated at those zoom levels. - Evad37 [talk] 10:36, 6 May 2020 (UTC)
- Evad37 not even that. The OSM zoom levels are pretty hard defined and there are many shared assumptions in the software that you can't easily change. The only way to have more accurate zoom really is to switch to full vector maps, which is a HUGE effort. (Not even openstreetmap itself runs vector rendered maps). You are basically required to go all in on Mapbox GL js technology. But as nice as they are it's still a commercial company, which is a risk. —TheDJ (talk • contribs) 09:49, 25 May 2020 (UTC)
- As far as I understand, while the map data is vector data and can theoretically be zoomed to any level, the way the maps work for performance reasons is to stitch together tiles (static raster images), which are generated periodically at preset zoom levels. So to add .5 zoom intervals would require more tiles to be generated at those zoom levels. - Evad37 [talk] 10:36, 6 May 2020 (UTC)
Running list of problems related to maplink/kartographer
Hi all, so I utilize maplink for most articles I edit, and have tried out most of its features. Here is a running list of all the things that I believe could be improved. I've brought up most of them already, though mostly I'm given a long-stale Phabricator page as a reply. Please let me know what you think, ɱ (talk) 17:51, 5 May 2020 (UTC)
- Unfortunately many of those we can't do anything about on-wiki – while seeing an old phabricator task may be disappointing, there has been recent activity on the Maps board, including fixing bugs like phab:T227402 and phab:T192250. I have updated {{infobox mapframe}} to be able to specify opacities, and use an inverse-shape instead of the default shape. - Evad37 [talk] 10:57, 6 May 2020 (UTC)
- Where should I address these then? Is there a kartographer-specific space besides Phabricator? One thing I noticed is that your addition of inverse-shape on Infobox mapframe allows for enclaves, like I've been wanting in template:maplink! But there is a problem: I tested it out, and the enclaves aren't shaded properly. See User:Ɱ/sandbox10 for examples. Best, ɱ (talk) 16:45, 6 May 2020 (UTC)
- See "Display inconsistencies" above. The enclaves work with
|type=shape
but not|type=shape-inverse
. Unfortunately the latter is the more useful mask. Again, unfortunately, it's not a module issue that can be solved here. — Jts1882 | talk 19:51, 6 May 2020 (UTC)
- See "Display inconsistencies" above. The enclaves work with
- Where should I address these then? Is there a kartographer-specific space besides Phabricator? One thing I noticed is that your addition of inverse-shape on Infobox mapframe allows for enclaves, like I've been wanting in template:maplink! But there is a problem: I tested it out, and the enclaves aren't shaded properly. See User:Ɱ/sandbox10 for examples. Best, ɱ (talk) 16:45, 6 May 2020 (UTC)
- I know, I started that thread too, but it's something evidently partly-fixed in infobox mapframe, so I bet it could be on the maplink template as well... ɱ (talk) 20:36, 6 May 2020 (UTC)
- What Infobox mapframe is doing is display the feature as both a line and a shape/inverse-shape. This was a bit of a hack to show either a shape or a line without having to specify parameters, but it seems to more-or-less work as a hack to fix the geomask bug. So yeah, that same hack should work here too. - Evad37 [talk] 01:44, 8 May 2020 (UTC)
- Okay, but why do you think the shading isn't right on infobox mapframe? ɱ (talk) 02:49, 8 May 2020 (UTC)
- The shading isn't completely right because the hack is just taking the shading from the geomask, and overlaying the borders from the line:
- Okay, but why do you think the shading isn't right on infobox mapframe? ɱ (talk) 02:49, 8 May 2020 (UTC)
- What Infobox mapframe is doing is display the feature as both a line and a shape/inverse-shape. This was a bit of a hack to show either a shape or a line without having to specify parameters, but it seems to more-or-less work as a hack to fix the geomask bug. So yeah, that same hack should work here too. - Evad37 [talk] 01:44, 8 May 2020 (UTC)
- I know, I started that thread too, but it's something evidently partly-fixed in infobox mapframe, so I bet it could be on the maplink template as well... ɱ (talk) 20:36, 6 May 2020 (UTC)
=
+
- - Evad37 [talk] 03:04, 8 May 2020 (UTC)
- Alright, thanks. ɱ (talk) 07:12, 8 May 2020 (UTC)
- - Evad37 [talk] 03:04, 8 May 2020 (UTC)
- mw:Talk:Wikimedia Maps and mw:Help talk:Extension:Kartographer are other you can try (but Phabricator is the main place to report bugs and request new features). The m:Community Wishlist Survey is the another option, which a few years ago resulted in the last lot of significant work on Maps – but that would subject to whatever eligibility rules they have for the next survey, and to getting enough support votes from the community. - Evad37 [talk] 01:44, 8 May 2020 (UTC)
- Thanks, will look into these. ɱ (talk) 02:49, 8 May 2020 (UTC)
(←) Updated and added to User:Ɱ/Maplink-related problems and suggestions. Still need to reach out to those pages for further help, it seems. ɱ (talk) 17:48, 24 May 2020 (UTC)
- Ɱ, just a note that there are very few people working on maps right now. Like I made some fixes last month as a volunteer, and there is 1 guy keeping the servers running. If you want fixes you need to find (and/or possibly even fund) developers for the changes. Honestly there were more volunteers working on wiki map technology in 2010 than there are now. Most people have gone on to do other things and there has been little influx of new enthousiasts. —TheDJ (talk • contribs) 09:44, 25 May 2020 (UTC)
- That's alright, I don't expect immediate attention to these points, but I hope this shows that people are actively using maplink more, and there are enough problems here that some should be addressed, especially if anyone wants this to someday supersede all other mapping templates used on wiki spaces. It can also be a list for future readers/template editors, that these problems have been noted and are already important to address. ɱ (talk) 14:58, 25 May 2020 (UTC)
- E.g. I'm not sure if anyone's found enough problems with the Maki icons, but I've found so many that I might be the first to propose ditching it all-together/expanding it on our own, if possible. ɱ (talk) 15:01, 25 May 2020 (UTC)
- I'd add the inability to invert the Maki icons (or have black ones instead of white). For simple ones like circles, squares and trianges a black icon would be better than the white for lighter marker colours. Even better would be an ability to select the icon colour separately from the (background) marker colour. — Jts1882 | talk 15:51, 25 May 2020 (UTC)
- Added, thanks. ɱ (talk) 16:17, 25 May 2020 (UTC)
- Also it's clear we can't just upgrade to the newest Maki set, it won't fix many of the icon issues, and may in fact create a few new issues. ɱ (talk) 16:31, 25 May 2020 (UTC)
- I'd add the inability to invert the Maki icons (or have black ones instead of white). For simple ones like circles, squares and trianges a black icon would be better than the white for lighter marker colours. Even better would be an ability to select the icon colour separately from the (background) marker colour. — Jts1882 | talk 15:51, 25 May 2020 (UTC)
Map problems for George Floyd protests map
Hi, I just created Template:George Floyd protests map. On mobile it shows a lot of empty whitespace, not sure why? Also really shows the need for combining multiple points when zoomed out, a feature I've seen in interactive maps off-wiki. Would help keep the map smaller on the main page. I'll add it to my growing list for now. ɱ (talk) 21:31, 31 May 2020 (UTC)
- It's also not showing some cities... help from an expert would be appreciated! Ed [talk] [majestic titan] 01:59, 1 June 2020 (UTC)
- Which cities aren't showing? — Jts1882 | talk 07:55, 1 June 2020 (UTC)
Does anyone know why there's still so much whitespace at List of George Floyd protests when viewed on a cell phone? ɱ (talk) 17:31, 3 June 2020 (UTC) Also, this is looking to be the most significant use of template:maplink, with 66 different editors and over 360 data points? Will this help spur development? The map is getting so crowded, I think a tool to combine multiple points in different zoom levels would be very useful here, if possible. ɱ (talk) 18:29, 3 June 2020 (UTC)
Multiple parameters behavior
Mapframe accepts multiple parameters using a numbered syntax, e.g. type=, type2=, type3=, type4= ...
However, the present behavior is to look for numbered parameters and stop at the first one that is missing. So, for example, if the caller specified a type4, but type3 is missing, then the fourth (and any further features) won't actually be rendered. This strikes me as a bad user experience, since one can break a map by simply removing one feature from the middle of a list of features. I'd like to change this behavior so that all filled parameters are rendered, even if the call to the module omits some of the numbers in the sequence. Any objections to this change? Dragons flight (talk) 09:21, 7 June 2020 (UTC)
- I went ahead and made this change. Dragons flight (talk) 00:03, 8 June 2020 (UTC)
Wikidata titles
Is there some way to have titles default to those in Wikidata? Having to provide them with constructions like 911170682 where one needs to pull labels separately from the same items as this pulls the coordinates from, seems silly. Thank you, —Uzume (talk) 18:51, 19 June 2020 (UTC)
You are invited to join the discussion at Wikipedia:Requests for comment/Mapframe maps in infoboxes. Evad37 [talk] 03:27, 24 June 2020 (UTC)
Very limited functionality on iPhone
I haven't tested all the browsers on all the phones by any means, but I'm seeing on both the Wikipedia app and in Firefox for iPhone that opening the "interactive map" just opens a simple world map with the coords marked on it. It display OK in the infobox, but there's no interactivity. --Cornellier (talk) 22:13, 22 June 2020 (UTC)
- The lack of interactivity for apps is a known issue: phab:T193312. I'm not sure why it wouldn't work for you in firefox – it works for me on Chrome and Safari on my iPhone with e.g. the examples on https://en.m.wikipedia.org/wiki/Template:Maplink/doc - Evad37 [talk] 02:54, 23 June 2020 (UTC)
- On a data sample of my one iPhone it only works in Chrome. Not FF, Edge, Safari, or WP's own app. --Cornellier (talk) 13:25, 24 June 2020 (UTC)
Help for German state articles
Could someone please take a look at the maps in the infoboxes for Lower Saxony and Saxony-Anhalt? The subject of the articles is not grayed out in the map. For reference, please see Brandenburg, where the map displays properly. – Zntrip 01:48, 24 June 2020 (UTC)
- @Zntrip: Shape features not showing up will be due to one of the reasons listed in the FAQ (Q4) at the top of this page - Evad37 [talk] 02:07, 26 June 2020 (UTC)
Default type
Hello. Would it make sense to add a default for type
, considering it does not have a default at present? Maybe make the default type=point
? Rehman 10:00, 10 May 2020 (UTC)
- @Rehman: There is actually a default type:
data
(for data pages from Commons). - Evad37 [talk] 02:18, 26 June 2020 (UTC)- Thanks for the reply, User:Evad37. Considering that the vast majority of mapframe uses would use
type=point
, what do you think about changing this default? Rehman 10:34, 26 June 2020 (UTC)- I like the current function because when I input
|from=COTA10.map
(using a Commons data file) I don't expect to have to addtype=data
. At least that's not part of the current instructions... ɱ (talk) 14:52, 26 June 2020 (UTC)
- I like the current function because when I input
- Thanks for the reply, User:Evad37. Considering that the vast majority of mapframe uses would use
Mapping all named coordinates from an article or section
A new feature I've been working on and is currently in the sandbox is the ability to map all named coordinates – {{coord}}
templates which use the |name=
parameter – from an article, or a section of an article (another one of Ɱ's suggestions). Like {{GeoGroup}}, but in a mapframe/maplink map. And it can be used together with other types of features. See Template:Maplink/testcases#Named_coordinates for examples. - Evad37 [talk] 02:32, 26 June 2020 (UTC)
- Awesome, thanks for being so willing to develop these! ɱ (talk) 02:35, 26 June 2020 (UTC)
- I implemented it here List of covered bridges in New Brunswick --Cornellier (talk) 14:56, 4 July 2020 (UTC)
OSM relations
The documentation presently says To make OpenStreetMap (OSM) features available, add the Wikidata key to the OSM relation (and wait 1 or 2 days) – see mw:Help:Extension:Kartographer#External_data and mw:Help:Extension:Kartographer/OSM for further information.
Would it be possible (and computationally practical) to insert another option that uses OpenStreetMap relation ID (P402) on the wikidata item regardless of whether the OSM relation has the back link to Wikidata? At present, this situation leaves a blue box (map centred on 0,0) on pages ({{Infobox Australian place}} is where I have noticed) until the OSM relation is updated and a cache flushed (which takes several hours to a couple of days). --Scott Davis Talk 13:25, 24 January 2020 (UTC)
- @ScottDavis: This isn't possible from wikipedia templates/modules – it would require a change to how Kartographer extension displays OSM features on maps, which would need to be requested at Phabricator. - Evad37 [talk] 02:47, 12 February 2020 (UTC)
- I'm looking at the same problem, and I'm hoping it's the wait two days note for a fix. I can't see why Parramatta just works with no details passed to Maplink. Dave Rave (talk) 01:13, 15 February 2020 (UTC)
- Per this bug replication between OSM and Wikidata has been down since January 2020. If I understand correctly, wait two days has meant wait indefinitely since then although a fix is in the works, according to the bug. --Cornellier (talk) 13:01, 26 June 2020 (UTC)
- Yes, it's been down indefinitely. You can use my tutorial to turn OSM features into Wikimedia Commons data files, and then can use those instantly, as a workaround. ɱ (talk) 14:55, 26 June 2020 (UTC)
- Per this bug replication between OSM and Wikidata has been down since January 2020. If I understand correctly, wait two days has meant wait indefinitely since then although a fix is in the works, according to the bug. --Cornellier (talk) 13:01, 26 June 2020 (UTC)
- I'm looking at the same problem, and I'm hoping it's the wait two days note for a fix. I can't see why Parramatta just works with no details passed to Maplink. Dave Rave (talk) 01:13, 15 February 2020 (UTC)
Thanks, I'll take a look. Maybe a noob question, but why does mapframe need to pass through wikidata? Why not give the OSM relatation ID as a parameter and bypass wikidata completely? I get that in an ideal world we'd:
- add the WP page (pages for interwikis) to the wikidata item
- the WP page would automagically be populated with data
We're not quite there yet, but meantime why not display relations directly .... --Cornellier (talk) 15:22, 4 July 2020 (UTC)
Rendering Problem Using the Monobook Skin
The fullscreen button in the upper right hand corner does not display properly when using Monobook. The four corner box image is not properly aligned with the silver button. -- Tystnaden (talk) 12:34, 12 July 2020 (UTC)
Show a useful error message when type= is missing
This article was showing the unhelpful error message <mapframe>: The JSON content is not valid GeoJSON+simplestyle
. The actual error was that |type=
was missing. If the template can detect transclusions that are missing |type=
but require it, that would be helpful.
Also, if the documentation could make it clear that |type=
is required with some combinations of parameters, that would also be helpful. – Jonesey95 (talk) 15:15, 10 August 2020 (UTC)
Difficulty using this template
Can anyone help at https://help.openstreetmap.org/questions/76124/trouble-setting-up-to-use-boundary-on-wikipedia? {{u|Sdkb}} talk 21:52, 15 August 2020 (UTC)
Not behaving properly?
Does anyone know why the map (commented out now) at Scioto River would not display its line feature? I know relations need to have been tagged before January, but this seemingly was tagged two years ago... ɱ (talk) 01:45, 19 August 2020 (UTC)
- @Ɱ: Not sure, the QID seems to have been tagged correctly long ago as you pointed out. All I can think of is that maybe the relation is too complex for the geoline service. Unlike route relations, waterway relations can have some esoteric roles in them, not only
main_stream
but alsotributary
, and this one even erroneously contains a multipolygon relation representing a riverbank. – Minh Nguyễn 💬 07:20, 3 September 2020 (UTC)- Thanks. Importing the data into Wikimedia Commons worked at least. ɱ (talk) 17:49, 5 September 2020 (UTC)
Legend and TemplateStyles
{{Legend}} was recently refactored to use TemplateStyles. Unfortunately, it creates unstrip markers like "`UNIQ--templatestyles-00000000-QINU`"'
that show up verbatim in this module's |text=
parameter and don't have the desired effect on the color swatches, probably because this module passes the parameter verbatim into mw.html.wikitext
. This is affecting {{Interactive COVID-19 maps/Per capita confirmed cases/San Francisco Bay Area}}, which appears in COVID-19 pandemic in the San Francisco Bay Area. I'm not sure how widespread the issue is. Calling mw.text.unstrip
first would at least make keep the unstrip markers from showing up, but I'm not sure of a good solution for supporting TemplateStyles. Maybe there needs to be a built-in option for legends in this module? – Minh Nguyễn 💬 07:27, 3 September 2020 (UTC)
- I've modified Module:Medical cases data to make a temporary fix. I've striped out the strip markers and then added the templatestyles for the {{legend}}. There is probably a better way of handling the strip markers but this should prevent the problem showing on article pages for now. — Jts1882 | talk 08:13, 3 September 2020 (UTC)
- This is good to know, and I'll look at the problem myself, but it's not reasonable to change {{legend}} because {{maplink}} is incompatible with strip markers. This module and template are what should be fixed. {{Nihiltres |talk |edits}} 21:54, 3 September 2020 (UTC)
- Some looking at the code and the Lua documentation suggests that we need to tweak the part that generates the
<maplink>
tag to use frame:extensionTag instead of mw.text.tag. This is the old-school problem of nesting tags: usingframe:extensionTag
is the equivalent of using{{#tag:tagname}}
instead of<tagname>
. {{Nihiltres |talk |edits}} 22:22, 3 September 2020 (UTC)- I changed the module sandbox to use
extensionTag()
instead ofmw.text.tag()
(line 723). It seems to handle the map link testcases without breaking anything. However, the problem with Module:Medical cases data remains (tested in preview), which means this is not the required fix or I'm not looking at the right part of the module (entirely possibly). — Jts1882 | talk 07:13, 4 September 2020 (UTC)- Yeah, that doesn't seem to do it; I must have been wrong. My next guess is that
util.trimArgs
deleting control characters is also stripping the delete characters from the strip markers, thus invalidating them. If we rework that to ignore control characters associated with strip markers, that's another potential fix. I haven't traced through the module's code to check whereutil.trimArgs
is used, though. {{Nihiltres |talk |edits}} 23:34, 4 September 2020 (UTC)- After some testing, I updated to simply exempt the
text
argument from having control characters deleted, and it seems to work properly. :) We can probably improve on that with a proper fix by making sure that only arguments expected to contain JSON should have control characters deleted, but I was bold and pushed out the quick fix right away. {{Nihiltres |talk |edits}} 01:00, 5 September 2020 (UTC)
- After some testing, I updated to simply exempt the
- Yeah, that doesn't seem to do it; I must have been wrong. My next guess is that
- I changed the module sandbox to use
(←) With some self-review, I've prototyped an update to polish the fix a bit, making sure the filtering exception isn't dependent on localization. Unless anyone objects or can offer constructive criticism, I'll push it live in a day or few. {{Nihiltres |talk |edits}} 03:53, 9 September 2020 (UTC)
- Done {{Nihiltres |talk |edits}} 15:27, 10 September 2020 (UTC)
"from2"?
Hi - would it be possible to add a feature like "from2" to display map data from multiple sources, similar to "type2", "type3", etc.? I am trying to combine the maps at Brewery District (Columbus, Ohio), but would like to just for this single article... Feel free to suggest workarounds, though I think the feature, if possible, would be beneficial in general. ɱ (talk) 13:41, 5 October 2020 (UTC)
- It is already possible to use from2, eg
- However, currently it's not possible to combine raw geoJson with other types or froms with this module. I'm not even sure if that's possible with plain
<mapframe>
tags - will need to experiment to see what can be done. - Evad37 [talk] 14:01, 5 October 2020 (UTC)- Yeah, I mostly mean with a "from(1)" and "from2", I didn't think that was possible... ɱ (talk) 14:22, 5 October 2020 (UTC)
Mapframe causing issues in edit previews on Chrome
So I'm getting this issue on edit previews of articles that use this template. I'm even getting this on the module and module talk edit pages (I have auto preview on). This is my first time encountering this template, so I'm not sure if it's a known issue or not. - Floydian τ ¢ 02:26, 20 October 2020 (UTC)
- What is this 'Auto preview'? I don't have that, and using the preview button from this page works fine for me... If you disable your preview function, can you see if it would it work for you then? ɱ (talk) 03:44, 20 October 2020 (UTC)
- Auto preview just means that when I edit an article, it starts with a preview of the current state of the article without me having to press "Show Preview" first. Shouldn't have any effect on the template as its a standard user option. - Floydian τ ¢ 04:41, 20 October 2020 (UTC)
- Floydian, i don't see this problem. must be one of your installed userscripts/gadgets/browserextensions —TheDJ (talk • contribs) 09:48, 20 October 2020 (UTC)
- So it appears the issue is my use of User:Stmrlbs/bracketmatch.js. Not sure at this point what in particular causes the issue. - Floydian τ ¢ 01:50, 31 October 2020 (UTC)
How often does the base map update?
Or is there a way to force an update? I can see there's things I've added/changed on OSM weeks to months ago that aren't appearing on mapframe maps... ɱ (talk) 18:49, 1 November 2020 (UTC)
- Okay, everything seems updated by now... ɱ (talk) 21:06, 6 November 2020 (UTC)
You are invited to join the discussion at Wikipedia:Village pump (technical) § Trouble importing map outlines from OSM. {{u|Sdkb}} talk 22:51, 6 November 2020 (UTC)
Maplink markers not appearing in article space
I'm updating List of Smithsonian museums and am switching out an old satellite photo of the National Mall with a map. A weird issue has happened where, while using template:Maplink, the markers do not appear. They are there on the edit screen and when I copy and paste the article or section into my sandbox, but they are not appearing on the main article. I'm assuming it is just some bad syntax I created somewhere but I cant find it. I also find it weird that the markers appear while editing, when the elements are copied to a sandbox, and also once you click on the map and it bring you to a screen of just that. This is what makes me wonder if it is an issue with the template and not with anything I have done. Any help would be amazing. cross posted at Village pump (technical).--Found5dollar (talk) 22:20, 18 November 2020 (UTC)
- @Found5dollar: my adding a description made them live, not sure if it just needed descriptions to go along with titles? Shouldn't normally, might just be a bug, but at least it's working now... ɱ (talk) 23:03, 18 November 2020 (UTC)
- And thanks for working on this; I've seen this article a few times and been bothered by the old pixelated image. ɱ (talk) 23:04, 18 November 2020 (UTC)
- It's doing it unusually for me now at Arthur M. Sackler Gallery, definitely looks like a bug. ɱ (talk) 23:07, 18 November 2020 (UTC)
- Thanks for figuring out a fix! I'm going to try to add descriptions like you did for the 10 other entries on the map and see if it continues being viewable in main space. Now I just wish we could add visible labels so that people can see which museum it is without clicking! Thanks!--Found5dollar (talk) 00:27, 19 November 2020 (UTC)
- @Found5dollar: if you want, you could always do something like the original image did - use markers that are numbers (I suppose 1 to 11) and then use the caption to list out the 11... ɱ (talk) 00:35, 19 November 2020 (UTC)
- @Ɱ:. That's it! That's why this is a collaborative site. great idea. ill try that.--Found5dollar (talk) 00:39, 19 November 2020 (UTC)
- I don't know what keeps happening, but it's working again. My latest edit made it display again? Weird stuff, let's hope there's not more changes to crash it again? ɱ (talk) 01:35, 19 November 2020 (UTC)
- @Evad37: not sure if you know why this could be doing this... Also not working for me now at Liberty Bell. ɱ (talk) 16:49, 19 November 2020 (UTC)
- Seems to be working for me now... it might be an issue with one or some of the severs, if it works some of the time and not others, and an edit (which likely causes a different server to render the page) seems to fix the issue. I would also suspect an WP:ITSTHURSDAY related issue, except it started a couple of days ago - Evad37 [talk] 00:08, 20 November 2020 (UTC)
- Liberty Bell is working for you? ɱ (talk) 00:29, 20 November 2020 (UTC)
- Seems to be working for me now... it might be an issue with one or some of the severs, if it works some of the time and not others, and an edit (which likely causes a different server to render the page) seems to fix the issue. I would also suspect an WP:ITSTHURSDAY related issue, except it started a couple of days ago - Evad37 [talk] 00:08, 20 November 2020 (UTC)
- @Ɱ:. That's it! That's why this is a collaborative site. great idea. ill try that.--Found5dollar (talk) 00:39, 19 November 2020 (UTC)
- @Found5dollar: if you want, you could always do something like the original image did - use markers that are numbers (I suppose 1 to 11) and then use the caption to list out the 11... ɱ (talk) 00:35, 19 November 2020 (UTC)
- Thanks for figuring out a fix! I'm going to try to add descriptions like you did for the 10 other entries on the map and see if it continues being viewable in main space. Now I just wish we could add visible labels so that people can see which museum it is without clicking! Thanks!--Found5dollar (talk) 00:27, 19 November 2020 (UTC)
yes it was working for me this morning when I posted that comment - Evad37 [talk]
- Interesting. I too am seeing inconsistent behaviour with this template. Will be good if someone narrows it down. I primarily use the shape files via the Wikidata Q codes, it works in some previews or not, source editor or Visual also shows different results, it appears at some zoom levels and not at others, and once submitted it works or it doesn't. So really wants looking at, thanks. Regards, --The Equalizer (talk) 11:19, 28 November 2020 (UTC)
Reported as phab:T268927 on Phabricator - Evad37 [talk] 00:56, 29 November 2020 (UTC)
New proposal for icons
Hi all - there's a new proposal to add/update icons for mapframe at meta:Community Wishlist Survey 2021/Miscellaneous/Kartographer icon improvements. ɱ (talk) 14:00, 9 December 2020 (UTC)
Wikivoyage
Has a better mapframe. For example they have the option of layers and one can add a "relief map". You can see it here[8]. We be nice to have something similar on WP. Doc James (talk · contribs · email) 18:30, 13 March 2021 (UTC)
Mapping query at the village pump
The discussion at Wikipedia:Village pump (technical)#Minor mystery: mislabeled city on OpenStreetMap at Heritage Plaza would benefit from the input of someone familiar with troubleshooting issues with maps on Wikipedia. Thryduulf (talk) 12:02, 17 March 2021 (UTC)
- @Thryduulf I asked at phab at got pointed to phab:T230013. Izno (talk) 16:25, 1 April 2021 (UTC)
Simple geoshape test {Maplink|frame=yes|id=Q797|type=shape}
Simple geoshape test {{Maplink|frame=yes|id=Q797|type=shape}}:
The map appears correctly only in edit mode. Otherwise, the map is empty or without shape. I try this here (User:Pinky sl/sandbox) and also in sl:Uporabnik:Pinky sl/PeskovnikW. I'm trying to implement maplink and mapframe into slovenian wikipedia. --Pinky sl (talk) 15:22, 8 April 2021 (UTC)
- I can see the shape for Alaska both on the saved page and in edit mode. Sometimes there is a delay before things work when using wikidata and external map resources. I've never understood exactly why. — Jts1882 | talk 15:41, 8 April 2021 (UTC)
- So ... if I can see it correctly in edit mode, after a delay I will also see it in saved page? Pinky sl (talk) 15:55, 8 April 2021 (UTC)
- Not necessarily. It's quite common but here are other reasons why they don't display. Just don't ask me what they are. There are also dynamic features of these maps that only work in edit mode or on the expanded map. — Jts1882 | talk 17:04, 8 April 2021 (UTC)
- So ... if I can see it correctly in edit mode, after a delay I will also see it in saved page? Pinky sl (talk) 15:55, 8 April 2021 (UTC)
Mapping loading issues
Team Mapframe
I created a UK map at my sandbox #4, but I find it is slow to load in full sometimes and have to refresh several times. Am I calling too many elements? I am using 100 Q numbers for county and smaller area shapes, with another 50 for markers.
While talking Q numbers, I find Q23103 and Q21694759 don't load when using the template. I checked OSM and the correct Q numbers are in place and have been a while. I reported it into Phabricator and am awaiting a response.
Any suggestions for the above are gratefully received.
Thanks.
--The Equalizer (talk) 21:57, 11 February 2021 (UTC)
- Realised the second issue is a Wiki DB polygon issue which has been reported on Phab. They show if I refer to them as Geoline in the mapframe json call.
- Still would want some checks into the wider issue when calling 50-100+ shapes.
Regards, The Equalizer (talk) 16:49, 10 April 2021 (UTC)
Requiring Wikidata
Module:Mapframe is causing a hidden error ("Lua error: Coordinates not found on Wikidata.") at Akita City Culture Hall which puts the page in Category:Pages with script errors. That could be fixed by editing the Wikidata item but is this error due to misuse of a parameter somewhere or has a decision been taken to require the entry of coordinates at Wikidata? Johnuniq (talk) 03:31, 3 May 2021 (UTC)
- I don't see that mapframe is in use there. Regardless, no, Wikidata coords are not required, but mapframe will give this error if there are no coords provided and none on Wikidata either. ɱ (talk) 01:29, 9 May 2021 (UTC)
- I think the problem was resolved by an IP adding the coords at Akita City Culture Hall (Q106678229). At any rate, it was resolved by something. Editing Akita City Culture Hall shows it uses Module:Mapframe and it definitely had the error I mentioned—I always preview an edit of the article to be sure it's not a caching issue. I won't worry about it although it would be interesting to temporarily revert the IP at Q106678229 and see if the hidden Category:Pages with script errors returns. Strange that no articles currently have that problem—perhaps they all have coordinates or don't use a related infobox. Johnuniq (talk) 01:51, 9 May 2021 (UTC)
- Ok, it wasn't displaying because the other maps were in use. And so, yes, either you need to enter coords into the mapframe template there, or have them on Wikidata. Having neither will lead to a broken map and will add that category. ɱ (talk) 02:06, 9 May 2021 (UTC)
- I think the problem was resolved by an IP adding the coords at Akita City Culture Hall (Q106678229). At any rate, it was resolved by something. Editing Akita City Culture Hall shows it uses Module:Mapframe and it definitely had the error I mentioned—I always preview an edit of the article to be sure it's not a caching issue. I won't worry about it although it would be interesting to temporarily revert the IP at Q106678229 and see if the hidden Category:Pages with script errors returns. Strange that no articles currently have that problem—perhaps they all have coordinates or don't use a related infobox. Johnuniq (talk) 01:51, 9 May 2021 (UTC)
Portland, Oregon's left-hand map isn't displaying (it was when I created the maps there). I'm not sure why it wouldn't, it just relies on the Wikidata ID. Did something sever that link to OSM, or was there some change on OSM? Note that when you change shape-inverse to shape, the coords reset to 0,0. And unlike many maplink bugs related to servers, the map doesn't even work on preview mode. ɱ (talk) 12:30, 25 April 2021 (UTC)
- The geoshape request returns an empty array, so yes, somehow the shape data cannot be retrieved.. —TheDJ (talk • contribs) 19:03, 25 April 2021 (UTC)
- I've put a hack in and it is displaying now. Regards, The Equalizer (talk) 22:08, 26 April 2021 (UTC)
- Ah the shape has a hole in it.. That's the reason it wouldn't show. So probably the relation inside OSM that the Q id is connected to broke and it should be repaired, or the repair has not arrived on WMFs servers yet. —TheDJ (talk • contribs) 09:46, 28 April 2021 (UTC)
- Correct. The original shape on OSM is present and true, but there is a known issue reported already on Phabricator where the shape when copied over to the Wiki map DB servers is corrupted and treated as a line element instead. I am not sure how that could be reuploaded without continual intervention from the DB admins for all the broken shapes. The Equalizer (talk) 10:10, 29 April 2021 (UTC)
- Ah the shape has a hole in it.. That's the reason it wouldn't show. So probably the relation inside OSM that the Q id is connected to broke and it should be repaired, or the repair has not arrived on WMFs servers yet. —TheDJ (talk • contribs) 09:46, 28 April 2021 (UTC)
- I've put a hack in and it is displaying now. Regards, The Equalizer (talk) 22:08, 26 April 2021 (UTC)
Update: Columbus, Ohio just broke too. I applied the hack The Equalizer provided, but I'm sure there's others breaking too... ɱ (talk) 19:48, 19 May 2021 (UTC) @The Equalizer: can you link to the phabricator page? I want to follow this issue - it really limits city article mapping. ɱ (talk) 13:53, 29 May 2021 (UTC)
- phab:T218097 is the key one, but several others are also linked to it, while other unlinked ones can be found using the key terms 'polygons', 'shape' and the OSM replication tool 'osm2pgsql' if you wish to perform a search. The Equalizer (talk) 18:51, 29 May 2021 (UTC)
Features are not shown in a maplink frame
{{maplink|frame=yes|frame-align=|frame-width=|frame-height=|from=Tornadoes of 2018.map|frame-latitude= 37|frame-longitude=-100|zoom=3|text=Tornadoes of 2018 in the United States}}
Features (in this case, LineString) are not shown in a maplink frame. They are shown correctly in a preview during editing a page. If you click the map to enlarge, they are shown correctly. I would appreciate any suggestion.―― Phoenix7777 (talk) 23:46, 21 May 2021 (UTC)
- @Phoenix7777: This could be phab:T269984, or something similar. If so, then one workaround is change the frame width or height slightly. Or it might fix itself if you wait long enough (typically between a couple of hours and quite a few hours). Or it could be something else entirely. - Evad37 [talk] 04:16, 23 May 2021 (UTC)
- @Evad37: Thank you for the reply. It has past almost 36 hours since I posted this, so there is little hope it fix itself. The workarounds you suggested are not based on the root cause. So I am not willing to try because the result will become visible only after saving the page. I already tried and reverted many times. Are there possibility that the problem is solved near future? I created 11 maps and only one map is realized in an article.―― Phoenix7777 (talk) 12:04, 23 May 2021 (UTC)
- @Evad37: I found an interesting fact. Current map address above is
- https://maps.wikimedia.org/img/osm-intl,3,37,-100,300x200.png?lang=en&domain=en.wikipedia.org&title=Module+talk%3AMapframe&groups=_eb42f1fdc47082a94c75048adeaba57180d95585
- If a url encode "%3A" is changed to ":", then correct image is displayed.
- can this be any help to solve the problem?―― Phoenix7777 (talk) 06:09, 24 May 2021 (UTC)
- Today, features can be seen in the map. After 10 days, it fixed itself!―― Phoenix7777 (talk) 04:58, 1 June 2021 (UTC)
- can this be any help to solve the problem?―― Phoenix7777 (talk) 06:09, 24 May 2021 (UTC)
Help with better displaying a map
I'm wondering if anybody more familiar with the placemark icons could turn this into a legible map, with small coloured dots instead of icons that pile atop one another (although in a few spots it will be inevitable at the scale of the map, given that they may be only a few kilometres apart). Muchos gracias, Floydian τ ¢ 2021-07-10T06:14:42
- Mapframe is not set up to support anything other than the teardrop icons. I'd suggest displaying the map larger would make it look more visually appealing, as well as making the oversize markers just normal scale. ɱ (talk) 15:58, 11 July 2021 (UTC)
- Amazing how a little bump up in size makes that big of a difference. Thanks! - Floydian τ ¢ 21:21, 11 July 2021 (UTC)
Mapframe on Wikipedia App
Can someone explain why mapframe doesn’t work on the Wikipedia app? This is a major issue, neither does the stack template work on any mobile versions. Please look into this. SkunkaMunka (talk) 16:27, 16 July 2021 (UTC)
- It's been reported at T193313 and T193312. Medium-priority, not much progress it seems. ɱ (talk) 15:20, 17 July 2021 (UTC)
County lines & Relief Switch
Hello, can someone please help me with developing county lines in a standard interactive map? As seen here: https://commons.m.wikimedia.org/wiki/File:USA_New_Mexico_relief_location_map.svg#mw-jump-to-license The county lines are visible and this would be nice to have been implemented. I am also seeking assistance for a way to change the map from standard to relief, such as a switch. If you can get these maps developed, tell me how to, or refer me to someone who can, that would be highly appreciated. Thanks! - @SkunkaMunka
Can someone respond for how to go about properly requesting this county-line feature? I support its implementation as well. ɱ (talk) 13:57, 3 July 2021 (UTC)
- Hi guys - not sure if it has been noticed but on that link, that map above has been manually created, uploaded and is not interactive, it basically is a SVG picture file. I take 'interactive' to mean that you can pan around locations and zoom in/out. The differing types of maps supported on articles is listed here:
- Only the {{Maplink}}/{{Mapbox}} and {{OSM Location map}} templates support interactive maps.
- If a relief map other than drawing it as a normal fixed/picture file is required, that can only be done with the {{Location map}} template which are semi-automated fixed/picture maps. Small inset relief maps can be added when using the {{OSM Location map}} template.
- County lines can be placed onto an interactive map if you spend the time collating all the Wikidata references, but it will noticeably slow it down because of the number of shapes being called, and some might not even show. Ideally you would have to test how well it performs in a Wiki sandbox. If ready for a steep learning curve, you can automate a query that pulls the shapes together on an interactive map as here: Maplink raw Wikidata query examples
- Finally, there is a Map Workshop Wiki page where you can put in a request to have a map drawn as a fixed/picture file.
- Regards, The Equalizer (talk) 10:21, 21 July 2021 (UTC)
- @The Equalizer: I am not sure if the original poster was clear enough - they want the base maps for maplink to show county lines, just like they show roads and water features by default. ɱ (talk) 15:08, 21 July 2021 (UTC)
- There is very little developer appetite for supporting anything but the highest boundary levels (phab:T152244 open since 2016...), the relief mapping could be suggested as a feature at Phab as I see there is an OSM derived map at hikebikemap.org with topographical elements which could be a base, but otherwise the above are the only realistic options at present.
- Regards, The Equalizer (talk) 23:33, 21 July 2021 (UTC)
- @The Equalizer: I am not sure if the original poster was clear enough - they want the base maps for maplink to show county lines, just like they show roads and water features by default. ɱ (talk) 15:08, 21 July 2021 (UTC)
So many bugs?
Why do you think there are so many bugs and faults to maplink? I'm constantly having interesting new problems - like why is Greater Columbus Convention Center now displaying part of the shape, with part messed up? OSM's shape (40477610) displays fine, and hasn't been edited in 8 months. ɱ (talk) 22:01, 9 July 2021 (UTC)
- You have to appreciate that there is a middle piece of the maps pie. The original OpenStreetMap (OSM) is a 3rd party resource whose data is regularly replicated to map servers controlled by Wikimedia, which is sometimes also confusingly referred to as OSM. For speed and efficiencies that copy is compressed and it's those that are served to the end Wiki articles. And therein begins the problems - the maps are stored in a SQL DB and the process that does this is well-known for breaking, and causing some corruption. That seems particularly to manifest itself with the shape files but occasionally the background maps go out of sync and aren't always readily updated.
- Here on the WikiTech site gives a technical review of that mapping infrastructure.
- Due to the many issues reported in Phabricator, it's been decided to update some of those systems to stabilise them, detailed in here.
- The bugs can be in many cases manually fixed, but does need some engagement from the support staff, the FAQ at the top explains how to report those on Phab to begin that proccess.
- One alternative is to create your own GeoJson shape files, upload those to the Data namespace and then add those to articles via Maplink. That is far more stable but less flexible and more involving, instructions on creating those can be found here.
- Regards, The Equalizer (talk) 01:09, 14 July 2021 (UTC)
- @The Equalizer: "GeoJson" is "far more stable"? See #Features are not shown in a maplink frame and User:Phoenix7777/sandbox. I added a new maplink yesterday but it shows no features yet. And other maplinks in the page show incomplete feature images. Compare the images when you click "edit" and "Show preview".―― Phoenix7777 (talk) 10:09, 14 August 2021 (UTC)