Module talk:Mapframe/Archive 2
![]() | This is an archive of past discussions. 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 |
You are invited to join the discussion at Wikipedia:Graphics Lab/Map workshop § Broken map, not sure how to fix.... — Berrely • Talk∕Contribs 16:29, 23 August 2021 (UTC)
- @Evad37: do you know what is happening?--Kozuch (talk) 21:06, 24 August 2021 (UTC)
- The details are over my head but I want to record that Fredddie posted some very valuable advice about how to successfully make a map at the bottom of this revision of the user's talk page. I can't see that info in the documentation. Johnuniq (talk) 00:05, 3 September 2021 (UTC)
Markers in caption legends?
I use a mapframe caption here to provide a legend. However, the only template I can find is {{Legend}}, which just produces solid-colored squares. Is there any way to replicate the marker icons themselves (i.e. the pins, their color, and the icons on them)? {{u|Sdkb}} talk 04:34, 30 September 2021 (UTC)
Blue maps in infoboxes
I have tried to use mapframe in various infobox types. If it is supported and used, the results are quite surprising but some are great. Colosseum uses infobox ancient site and creates a blue map with mapframe, but the fullscreen works great, see the history of the article 15:48, 6 October 2021. The same effect occured in Infobox artwork. Ruedi33a (talk) 15:53, 6 October 2021 (UTC)
- Usually you just need patience, a few hours, to get the servers to respond to the mapping request. Adding the coordinates directly into the mapframe request can help. ɱ (talk) 15:59, 6 October 2021 (UTC)
- Thanks! By adding "coordinates={{|WikidataCoord|display=inline}}" the problem is gone.Ruedi33a (talk) 17:18, 6 October 2021 (UTC)
Marker not shown in infoboxes
Some infoboxes show the marker in the mapframe in "Show preview" mode, but not after applying "Publish changes". In fullscreen mode everything is OK. An example for this behaviour is Pietà (Michelangelo).Ruedi33a (talk) 17:29, 6 October 2021 (UTC)
- That article seems fine for me? And this is a known glitch, usually solved by changing an aspect, most easily the zoom level. After a while (few days or so?) you can change the zoom back to the ideal level. ɱ (talk) 17:56, 6 October 2021 (UTC)
- Thanks again. The problem is self correcting as you said and solved now. It just needs patience...Ruedi33a (talk) 19:01, 6 October 2021 (UTC)
Could someone knowledgeable about this template perhaps take a look at my query at Talk:Hesse#Map, regarding the infobox map in that article? – Arms & Hearts (talk) 12:54, 10 October 2021 (UTC)
Givans Creek Woods
I'm trying to add a map to the Givans Creek Woods infobox. When I add map = {{maplink|type=shape}}
, I get Lua error in Module:Location_map at line 522: "?'\"`UNIQ--maplink-00000010-QINU`\"'?" is not a valid name for a location map definition.
. I added the wikidata tag to https://www.openstreetmap.org/way/423894868 yesterday. Is it possible I've just not waited long enough for the data to propogate? -- RoySmith (talk) 14:20, 28 October 2021 (UTC)
- It works for me, but you have a few problems with your code. See the park infobox for help - you need to make it map_image. Then see the maplink template for help - you need other parameters for a proper display - like |frame=yes|plain=yes|frame-align=center. But it's usually easier to instead use {{infobox mapframe}}, made for infoboxes. Not sure why that might not be working right now... ɱ (talk) 14:27, 28 October 2021 (UTC)
Lua errors
Lua error in Module:Mapframe at line 200: attempt to index local 'key' (a number value) has popped up at a bunch of articles including Gonzales County, Texas and Illinois Route 19. Seems related to Jts1882's recent edits. * Pppery * it has begun... 16:47, 7 November 2021 (UTC)
- I've undone the change. I'll have to follow up tomorrow. — Jts1882 | talk 17:47, 7 November 2021 (UTC)
- @Pppery:. I've added a check on the type of the parameter key, which fixes the error.
- I was puzzled why the errors didn't show up in the {{maplink/testcases}}. It turns out that those templates showing the error have spurious positional parameters. Gonzales County, Texas has the Wikidata ID without the
|id=
parameter (of form{{maplink|...|Q26614}}
) and Illinois Route 19 has{{maplink|...|from.map}}
. The positional parameters at the end do nothing and {{maplink}} only works in the infoboxes because the module gets the Wikidata ID from the page. — Jts1882 | talk 09:08, 8 November 2021 (UTC)
You are invited to join the discussion at Wikipedia:Village pump (technical) § Mapframe bug with references. {{u|Sdkb}} talk 04:34, 30 September 2021 (UTC)
- Heads up, discussion about this has continued at Wikipedia:Village pump (technical)#Ref parameter and Jts1882 has written a fix. Please let us know there if there are any concerns that should be addressed before implementation. {{u|Sdkb}} talk 19:24, 4 November 2021 (UTC)
- @Jts1882, looks like no concerns; are we good to implement? {{u|Sdkb}} talk 06:42, 7 November 2021 (UTC)
- It seems to work and doesn't cause any problems with the testcases. I've added a "Raw Wikidata query" example.
- I've being exploring this a bit more. A problem arose on the upgrade to php7 which meant that json was handled more strictly. This led to the fix of replacing control characters with spaces in all template parameters (
function util.trimArgs()
, line 190). This in turn caused a problem with stripmarkers in the|text=
parameter, which was then exempted from control character replacement. My sandbox change now exempts the|descriptionN=
parameters. As far as I can tell, only the|raw=
parameter needs removal of the control characters (just replacing "\n" also works on the testcase). The json generated from template parameters by the module and passed throughmw.text.jsonEncode()
doesn't give the json errors. So a more general fix would be to only replace control characters in|raw=
, which would then also allow references in|title=
as well. — Jts1882 | talk 11:28, 7 November 2021 (UTC)- @Jts1882, I'm unfortunately still encountering the errors at my use case at Special:Permalink/1054430411#Campus. Two of the references in it are working (zoom way out) but the rest still aren't. I thought it might be a caching issue but it seems to be persisting. Copying the mapframe to my sandbox, a different set seems to be working/not working, so maybe that points to a caching issue after all? Thanks again for all your work on this, {{u|Sdkb}} talk 18:25, 10 November 2021 (UTC)
- Looks like my regex for the numbered description parameters is not working properly (possibly when N>9?). I think the control characters only need to be removed from the raw parameter. I've changed the sandbox and that seems to work. I'll follow up tomorrow morning. — Jts1882 | talk 20:57, 10 November 2021 (UTC)
- Looking at my sandboxes, the N>9 seems to be precisely the problem and the sandbox code seems to resolve it. Yay! {{u|Sdkb}} talk 22:02, 10 November 2021 (UTC)
- Looks like my regex for the numbered description parameters is not working properly (possibly when N>9?). I think the control characters only need to be removed from the raw parameter. I've changed the sandbox and that seems to work. I'll follow up tomorrow morning. — Jts1882 | talk 20:57, 10 November 2021 (UTC)
- @Jts1882, I'm unfortunately still encountering the errors at my use case at Special:Permalink/1054430411#Campus. Two of the references in it are working (zoom way out) but the rest still aren't. I thought it might be a caching issue but it seems to be persisting. Copying the mapframe to my sandbox, a different set seems to be working/not working, so maybe that points to a caching issue after all? Thanks again for all your work on this, {{u|Sdkb}} talk 18:25, 10 November 2021 (UTC)
- @Jts1882, looks like no concerns; are we good to implement? {{u|Sdkb}} talk 06:42, 7 November 2021 (UTC)
Lack of adequate documentation
The state of on-Wiki documentation of Mapframe maps is really quite horrible. Neither WP:Mapframe nor Help:Mapframe exists, and one has to dig around quite a bit to find the link to mw:Help:Extension:Kartographer, which itself isn't really helpful. it's really unclear where one is supposed to head for help on local issues, or to discuss community policy covering its use, etc.
I've noticed Mapframe maps referring to OSM objects via WikiData get broken every so often (including right now), and there doesn't seem to be anywhere to report this. --Paul_012 (talk) 09:16, 14 August 2021 (UTC)
- Thanks for the feedback, I may try to help create some of those pages. I do think reporting is okay - a few different talk pages redirect here - this is the place to report any mapframe issues, including broken OSM-based maps. I do wish we had a better way to report to people who moreso edit OSM and could fix errors over there, however. ɱ (talk) 14:16, 14 August 2021 (UTC)
- @Paul 012: Done. Let me know what you think could be added to it to make it more helpful. And OSM errors can be reported here. ɱ (talk) 14:59, 14 August 2021 (UTC)
- Thanks a lot for the effort; it's a good start. --Paul_012 (talk) 14:41, 15 August 2021 (UTC)
- @Paul 012:, @Ɱ: I agree. It is a good start but we need to go further. I attended a [wikidata workshop] on zoom. Something similar for maplink would be useful. Paolo Oprandi (talk) 11:50, 31 December 2021 (UTC)
Now that I know this is the right place to ask, there's currently a bug that causes objects represented by OSM route-type relations to not be displayed. Has this been reported? --Paul_012 (talk) 14:41, 15 August 2021 (UTC)
- @Paul 012:Interesting idea - where would you report it? And how are you getting on with maps in general? Paolo Oprandi (talk) 11:50, 31 December 2021 (UTC)
Kartographer Icons
Are the [Kartographer Icons] the full range of icons we can use? They are very limited. I need icons for hills, valleys, racing, forests and so much more. Are there alternatives I should know about? I note [icons8] have a very complete set of icons. Paolo Oprandi (talk) 12:06, 31 December 2021 (UTC)
- Unfortunately that's the only choice. There is a newer version of the maki icons but it needs a change to the Wikimedia Extension:Kartographer. This extension hasn't got any upgrades for some time, so I wouldn't hold my breath. — Jts1882 | talk 13:27, 31 December 2021 (UTC)
- Please see this CWS request. I recognized a lot of problems, and we need someone with enough technical skill to be able to implement solutions. ɱ (talk) 16:22, 31 December 2021 (UTC)
- Thanks - that is useful. Can we add to the list of missing icons? I will continue using the icons available for now, but it means they will be misused. For example, for a path for walkers I have used the the "pitch" icon as it make no sense in the UK anyway. Paolo Oprandi (talk) 17:12, 31 December 2021 (UTC)
- I am not sure if a proposal like this is meant to be edited, but feel free to paste its content elsewhere and amend. Submissions for the 2022 Community Wishlist Survey begin in about 10 days, so let's try to resubmit it there then! ɱ (talk) 17:22, 31 December 2021 (UTC)
- @Riparia riparia: - please see CWS 2022/Miscellaneous/Kartographer icon improvements. I added your marker ideas. Please recommend more suggestions! ɱ (talk) 03:13, 12 January 2022 (UTC)
- Thanks - that is useful. Can we add to the list of missing icons? I will continue using the icons available for now, but it means they will be misused. For example, for a path for walkers I have used the the "pitch" icon as it make no sense in the UK anyway. Paolo Oprandi (talk) 17:12, 31 December 2021 (UTC)
- Please see this CWS request. I recognized a lot of problems, and we need someone with enough technical skill to be able to implement solutions. ɱ (talk) 16:22, 31 December 2021 (UTC)
UK Wikidata items with and without maps
I have been able to add maps on to pages such as the Upper Beeding parish and Brighton and Hove using the wikilink template and wikidata code, but I don't understand why some wikidata area items are connected to maps and some are not.
I am now trying to use the same method to add a map for Southwick, but it doesn't seem to have a map associated with it. I am guessing that is because it is of a different governmental organisational level. Is that correct?
I am therefore look for an area with a map. It might be that I will have to use the map of the entire Adur District, but I don't think so as Coombes, Lancing and Sompting all have maps associated with them and they are in the same District.
It could be that I should use the Shoreham-by-Sea map but this map (to the right) doesn't look correct - it should cover a much bigger area - and if it is not correct, what should I do about it?
Can anyone help me with this or explain it to me?
And finally, am I able to make maps that do not exist and what is the easiest way to do this (preferably without having to draw it and work out borders myself)? Many thanks. Paolo Oprandi (talk) 17:36, 31 December 2021 (UTC)
- @Riparia riparia: the data is being automatically drawn from OpenSteetMap. See [1] — Martin (MSGJ · talk) 22:32, 2 March 2022 (UTC)
- mw:Help:Extension:Kartographer/OSM explains the link between OSM and Wikidata — Martin (MSGJ · talk) 22:34, 2 March 2022 (UTC)
Many maps
How do I specify a manual override coordinates so one article can have many maps?
Please reply at Template_talk:Infobox_building#mapframe-coordinates, not here.
Thank you CapnZapp (talk) 19:34, 26 April 2022 (UTC)
Shape
I can't make shape map for Uttara. Can anyone please give instructions for it? I tried it from doc of template but can't understand. Mehedi Abedin 12:00, 16 May 2022 (UTC)
See Wikipedia:Creating shape maps from OpenStreetMap data. ɱ (talk) 18:18, 16 May 2022 (UTC)
No outline around map object
Hello, for some reason, the outline doesn't work on all objects. It's shown here with wikidata:
Klipriviersberg Nature Reserve
but it doesn't work here:
Both have wikidata and wikipedia entries. It also doesn't work with {{maplink}} or <mapframe>. Why is this? Thank you Maqdisi (talk) 05:41, 2 June 2022 (UTC)
- There is no shape being returned by the shape api. https://maps.wikimedia.org/geoshape?getgeojson=1&ids=Q111994013 I added the boundary property to the geoshape because "Currently, only relations with type=multipolygon, type=route, and type=boundary will display on maps.". We'll see if that fixes it within a couple of days. —TheDJ (talk • contribs) 11:44, 2 June 2022 (UTC)
Clicking a shape with from key doesn't work
Hello, I have something like this:
{{Maplink|frame=yes|frame-coord={{coord|-35.579|21.824|}}|zoom=5 |type=shape|from=Southwest Indian Seamount Marine Protected Area.map|title=Shape|description=Description of shape |type2=shape|from2=Agulhas Bank Complex Marine Protected Area.map|title2=Shape|description2=Description of shape }}
]
But clicking on it won't show the title popup and description. Also, I'm unable to change the colours of the shape if it uses `from`.
Thank you, Maqdisi (talk) 10:19, 3 June 2022 (UTC)
- When using
|from=
you are getting the geojson from the map file from Commons, e.g. your second one at commons:Data:Agulhas_Bank_Complex_Marine_Protected_Area.map. I think any changes need to be made to that file or a duplicate made with your requirements, e.g adding a title to the features block with"title":"test title"
. — Jts1882 | talk 13:28, 3 June 2022 (UTC)- I now see this is a new file that you have created so I've added a title that can now be seen on the map. — Jts1882 | talk 13:32, 3 June 2022 (UTC)
Help with map Q112251746
Can I please get a check I've done wikidata:Glen Innes to Tamaki Drive Cycleway and OSM correctly? The map is not showing up. Thanks F (talk) 08:21, 11 June 2022 (UTC)
- It should be ok, but I believe database synchronisation has been turned off again for a while already. —TheDJ (talk • contribs) 12:08, 11 June 2022 (UTC)
Template-protected edit request on 21 June 2022 Suggestion Fixing style/layout errors Spelling/grammar/punctuation/typographical correction
![]() | This edit request to Template:Maplink/doc has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
On Template:Maplink#Usage, the example that starts "Overlays can also be displayed on top of the map:" is missing 2 left-curly-braces (}}
) at the end of the line.
It has 2, but I think it needs 4, like: minimap=false}}}}
That way, it will produce this:
ArielMais (talk) 05:26, 21 June 2022 (UTC)
Not done:
{{edit template-protected}}
is usually not required for edits to the documentation or categories of templates using a documentation subpage. Use the 'edit' link at the top of the green "Template documentation" box to edit the documentation subpage. P.I. Ellsworth , ed. put'r there 07:20, 21 June 2022 (UTC)
Issue with non-OSM map
Not sure if this is the best place for this but I am having a problem with the first map on North Highlands, New York. As you can see in the source this map corresponds to this Wikimedia Commons entry. It renders as expected when previewing however displays as blank on Gecko-based browsers and with a broken page icon on Chromium-based browsers. Null edits do not help and I am unaware if this is merely an issue of server synchronization, any ideas? U-dble (talk) 18:26, 30 October 2022 (UTC)
- I'd like to add that clicking on the map to see full-screen works in both browsers. U-dble (talk) 18:28, 30 October 2022 (UTC)
Just raw data being displayed
Can anyone work out why the GeoJSON for South Antrim (UK Parliament constituency) (commented out under boundaries section) is simply displaying the code at the map data page rather than generating the map. I am using the same {{maplink}} settings and GeoJSON syntax as on other constituency pages, which are working fine. Rcsprinter123 (address) 18:27, 14 November 2022 (UTC)
- You're missing the closing brackets. The raw={{mapdata}} has a closing set, but the mapframe template does not. - Floydian τ ¢ 18:57, 14 November 2022 (UTC)
- Oh, I knew there would be a stupidly simple explanation. Thank you Floydian. Rcsprinter123 (remark) 19:43, 14 November 2022 (UTC)
Check programmatically if an OSM-relation exist
![Map](https://maps.wikimedia.org/img/osm-intl,a,a,a,300x200.png?lang=en&domain=en.wikipedia.org&title=Module_talk%3AMapframe%2FArchive_2&revid=1240523109&groups=_e42d74e5349ac6dc4d7bea27539fcbd137c415f6)
Hi! Is there a way do check programmatically if a wikidata-entity has a corresponding relation on Open Street Map (i.e. if it will show a map)? For example to show an error message rather than a map of the world if someone tries to use maplink for wikidata-items without a corresponding Open Street Map-relation (such as in the example where I try, nonsensically, to show (Q42) on a map)
If that is the case it would be nice to show an error message with some information rather than a map of the world. At the moment we check wikidata if it has OpenStreetMap relation ID (P402). However that solution is manual and not necessarily reliable as it depends on someone adding the relation to wikidata correctly whenever a relation is tagged with wikidata on Open Street Map. Gunnar Larsson (talk) 21:18, 29 November 2022 (UTC)
- The only way to know this, is by running https://maps.wikimedia.org/geoline?getgeojson=1&ids=Q42. Unfortunately, you cannot do that from Lua at this time. It is a separate system. I do think that is a good suggestion however and would encourage you to file it as a feature request in phabricator under the project Kartographer. —TheDJ (talk • contribs) 11:03, 30 November 2022 (UTC)
- Thanks for the suggestion and the answer! I have now written a feature request (https://phabricator.wikimedia.org/T324421). Hopefully the content of the request is not too confusing (I am a fairly new new user of Mapframe) Gunnar Larsson (talk) 13:41, 4 December 2022 (UTC)
Can’t get Route shown reliabily
I simply cannot get the route in the map in the infobox on Roter Faden shown reliably. Sometimes it works, but most times it doesn’t.
I’ve now tried using GeoJSON (see Commons:Data:Hannover/Roter_Faden.map, also as geoshape (P3896) on Red Thread (Q2168375), where it shows just fine).
It seems really finicky. I just added the {{mapframe}} above, and it KIND OF works here 😮 when you commit (but NOT in preview!). And the zoom grip in the top right is all over the place. And I cannot style the line yet.
Is there ANY way to get the route shown on a mapframe reliably? Betterkeks (talk) 07:00, 31 October 2022 (UTC)
- What you are seeing is likely that the image as included in the article is out of date. Maps use pretty aggressive caching, but it doesn't have 'active' expiration when you modify them (And confusingly, not all wikis do this, it is mostly the top wikipedia's). If you open a map, they are always dynamic, and their caching is less aggressive. For instance, above here, I seem to get revision 700862134 of Data:Hannover/Roter_Faden.map. The page was likely previewed or saved with this older version, then the actual version was saved, and now in this page you see the older version of that page, as the server doesn't know it should throw away the older tile. —TheDJ (talk • contribs) 09:09, 31 October 2022 (UTC)
- Altering the zoom back and forth has usually proven to purge the map cache, and it seems to have worked here! Your map is live for me. ɱ (talk) 15:56, 31 October 2022 (UTC)
- OK. I’ve done the zoom in/out trick before as well, but then it lost it later. Hopefully it’ll stick this time. Thank you both. Betterkeks (talk) 23:58, 31 October 2022 (UTC)
- I would say it bypasses the generated image. The zoom factor is part of the key with which the image is saved. —TheDJ (talk • contribs) 09:22, 9 November 2022 (UTC)
- The GeoJSON seems stable in the mapframe shown in the infobox on Roter Faden, no problems in the last two months. But I noticed today that it now just won’t show up in the opened map 😣, you know, when you click on the mapframe in the infobox on Roter Faden. It used to work, and now it doesn’t. Betterkeks (talk) 01:45, 11 December 2022 (UTC)
Hello. I'm facing a similar issue. The route is often unstable even for dynamic map. Does the stability depend on the time elapsed after a wikidata tag is added to a feature on OSM? For eg in this map, the old version showed RMG but not Grey and Aqua. The wikidata tag for Grey and Aqua were only recently added and the old version in Noida Metro's page was more than 3 months old. How much time will it take before both static and dynamic map stabilizes? Can this be fixed to make the sync faster? Insagnius bot (talk) 18:39, 3 November 2022 (UTC)
- Is there a way to fix the highlight of [2] on this page It was there on map 1 before I made the edit hoping to fix map 0. Now it's gone on 1, fixed on 0 (thumbnail). :( Insagnius bot (talk) 05:39, 4 November 2022 (UTC)
- broke again (( Insagnius bot (talk) 11:02, 4 November 2022 (UTC)
Manhattan
Does anyone have any idea why the map at Manhattan (linked to the Qid which is linked to OSM relation 8398124) doesn't include the island of Manhattan? The OSM relation is appearing correctly however. ɱ (talk) 17:44, 13 December 2022 (UTC)
- @Ɱ, there are two relations in OSM: one for Manhattan (8398124) and one for Manhattan Island (3954665). Both are associated with the Wikidata item for Manhattan, Q11299, which is incorrect. It seems Maplink gets confused and treats those two relations as one and only highlights their difference.
- I associated the second relation with the Wikidata item for Manhattan Island, Q15063317. That should fix it. AxelBoldt (talk) 22:15, 28 December 2022 (UTC)
Scale of map, zoom buttons only appear upon article preview?
If I edit an article and add a maplink (with frame=yes) and then preview, I see a nice map with working +/- zoom buttons and a scale at the bottom. But when I save the article, the zoom buttons and the scale are gone! Especially the scale I find very important for orientation. Is there a way to make zoom buttons and scale appear on saved articles? AxelBoldt (talk) 17:23, 25 December 2022 (UTC)
- I believe this is deliberate. Enwiki editors always complain about the imaginary centenarian turning on their CRT monitors and booting up their Windows NT operating system to read Wikipedia articles, and thus they cannot load a page with any new and flashy interactive graphics in a timely manner. Yet the more interactive versions are live on other wikis, and I am unaware of any problems. ɱ (talk) 18:16, 25 December 2022 (UTC)
- OK, but putting the map scale at the bottom of the generated image shouldn't put any extra strain on server or client, so why isn't it done? AxelBoldt (talk) 21:22, 28 December 2022 (UTC)
- I assume someone doesn't like the clutter, but I could be wrong, and maps need scales. Completely worth bringing up to someone with technical abilities. ɱ (talk) 21:39, 28 December 2022 (UTC)
- I think this is a matter determined by the Wikimedia extension: mw:Help:Extension:Kartographer. The scale is present in interactive mode and not in static mode. Unfortunately English Wikipedia doesn't show the maps in interactive mode on the page, only in edit preview and when the map is expanded. Presumably the scale alone wouldn't be a performance issue, but it would need a change to the Wikimedia software rather the Lua module here. — Jts1882 | talk 08:01, 29 December 2022 (UTC)
- I see, thanks! AxelBoldt (talk) 17:37, 29 December 2022 (UTC)
Can this map be scaled to match readers' thumbnail size preferences?
This template/module has ways to specify width and height in pixels, but I do not see a way to specify a size relative to the reader's thumbnail preference (e.g. using something like |upright=
). If you have insight into how this preference might be added, please respond at this discussion, not here, to keep discussions in one place. Thanks. – Jonesey95 (talk) 04:59, 10 January 2023 (UTC)
Bugs with shape-inverse?
When there is a hole in the shape, shape-inverse does not cut out the hole while shape does.
Xeror (talk) 04:34, 16 January 2023 (UTC)
- This is a known problem. ɱ (talk) 21:27, 19 February 2023 (UTC)
Hamburg
I tried to include an interactive map in Hamburg infobox. It was mostly successful except the the shape in the city is not cut out when I use shape-inverse. I looked at the larger map and found out that there is a weird shape in the sea in the west side. For some reasons, it makes the whole city area filled but the boundary is still there. I tried to use the Hamburg.map in the Wikidata but it does not allow me to use shape-inverse for that map, only shape. Does anyone know how to solve this problem? The end goal is to look like the one in Berlin infobox. Thanks. Xeror (talk) 20:57, 12 January 2023 (UTC)
- @Xeror: I think part of your problem is that this isn't three different maps - it's one map with three different zooms. So if you have a fill inside or outside of a shape, it could mess with the larger shapes' displays. I think your best option for this complex map is what I drafted up at the top of User:Ɱ/sandbox. ɱ (talk) 16:27, 13 January 2023 (UTC)
- @Ɱ: If you check the Berlin one, it works perfectly fine with almost identical codes (just different QID). I have also tried removing the switcher and leaving with just one zoom. The problem is still there. It may have to do it with the disjoint areas of the Hamburg map. But then I do not understand why even using shape won't work. The area in the city area does not fill. I suspect that the boundary of the city area on OSM is not a close path. How can I fix that if it is the case? Xeror (talk) 21:53, 13 January 2023 (UTC)
- I am unsure why there is this problem then, like you said it might be a boundary issue for OSM editors to fix, but I created a map that does work, which I can add to the article now. ɱ (talk) 21:28, 19 February 2023 (UTC)
- @Ɱ: If you check the Berlin one, it works perfectly fine with almost identical codes (just different QID). I have also tried removing the switcher and leaving with just one zoom. The problem is still there. It may have to do it with the disjoint areas of the Hamburg map. But then I do not understand why even using shape won't work. The area in the city area does not fill. I suspect that the boundary of the city area on OSM is not a close path. How can I fix that if it is the case? Xeror (talk) 21:53, 13 January 2023 (UTC)
Is it possible to make the fill consist of two striped colours?
Sometimes an area (Type C) consists of Type A and Type B. Is it possible to make the fill contain both colours as stripes? Maqdisi (talk) 15:08, 13 April 2023 (UTC)
- +1 I don't think its possible yet but It would also be useful for icons. REEDriler (talk) 17:42, 16 April 2023 (UTC)
Wikidata routes found using Q relations need to also load in the data for their child relations
When looking up a route by its wikidata id, mapframe/maplink will correctly find an item with a relation.
However, it doesn't recurse into any child relations that relation may have.
For example lets look at Ohio State Route 104 (wikidata id Q2491883) since that is not too long and is given as an example on OSM's Route_directions page of the newer and generally preferred way to define routes
The invoke:OSM link works correctly:
{{#invoke:OSM|wd|id=Q2491883}} [3]
But maplink does not show anything:
{{maplink|frame=yes|text=OH104|type=line|id=Q2491883}}
The reason why is that the wikidata Q2491883 is referenced by OSM relation 162114, which consists of no ways, but four child relations: 12925342, 12925341, 12925339, 2925340. See OSM Route Manager for relation 162114.
I realize that a workaround in this instance would be to add the wikidata to each of the child relations, but this isn't a correct solution. This parent/child relation is often used in cases of long routes such as en:Interstate 75 (Q94689) with each state getting its own child route (and each having its own wikidata entry) such as en:Interstate 75 in Michigan (Q2351623).
With turbo-overpass querys the key parameter (which the invoke:osm template uses) is to put a line ">>;" which tells the system to recurse.
I'm usually pretty decent with deciphering code and would be willing to offer up a potential patch, but don't see where mapframe, Kartographer, nor Kartotherian is calling OSM to get the GeoJSON.
KelleyCook (talk) 17:45, 19 January 2023 (UTC)
- Its a known issue. [4] REEDriler (talk) 04:53, 17 April 2023 (UTC)
Issue with Interstate 74 in North Carolina map
It seems that something is causing Data:Interstate 74 in North Carolina.map to crash and leave the text "Map" on Interstate 74 in North Carolina and the map on List of Interstate Highways in North Carolina which uses the same data file as well. DiscoA340 (talk) 15:45, 31 March 2023 (UTC)
- I have filed T334187 for this issues. It seems to have something to do with the handling of GeometryCollection. —TheDJ (talk • contribs) 08:40, 17 April 2023 (UTC)
Facility to export as image
Hello, I prefer using Mapframe for animal range maps and locations of parks, but one drawback is that a user can't export that information in the form of an image (like they would if it was an actual image). In Firefox, I'm able to right click on the Mapframe box and open the image link in a new page which gives a link like this:
Then the default resolution of 300x200 can be changed to something larger and the image saved. Is it possible to have a button in the maximised map to give the user the ability to export it as an image? Thanks, Maqdisi (talk) 05:41, 29 April 2023 (UTC)
Does newline-delimited GeoJSON work with Mapframe?
Hello, for the first time I added newline-delimited GeoJSON data to https://commons.wikimedia.org/wiki/Data:Eastern_variable_skink_range.map which works, but in Wikipedia https://en.wikipedia.org/wiki/Trachylepis_varia it doesn't show. I don't know if I did something wrong or it's because I used newline-delimited GeoJSON. Thank you, Maqdisi (talk) 10:12, 2 May 2023 (UTC)
- The GeoJSON was incomplete which is fixed now. At this moment in time the image on the article which is the click-through to the map is broken, although the resulting map does show the shaded areas now. I have attempted to refresh it which hasn't immediately worked. Let's give it a day to see if it picks up. Regards, The Equalizer (talk) 02:48, 4 May 2023 (UTC)
- Thank you, I appreciate it, Maqdisi (talk) 03:29, 4 May 2023 (UTC)
- Looks to be ok now if you can confirm. The Equalizer (talk) 11:19, 5 May 2023 (UTC)
- Yes, thank you so much. Just to confirm, is there an easy way to this? I exported it from QGIS, but it seems you changed the data value from an array to a dict with type "FeatureCollection". That's the main issue, right? How would I do this in the future to save space? Maqdisi (talk) 11:39, 5 May 2023 (UTC)
- Not fully sure. As you saw, the map file on the Commons page always displayed without issue, yet on the Wiki article it didn't originally, so they seem to have different rendering engines, suspect the Commons viewer is more forgiving. The click through map wasn't showing the geographic areas which was helped by the collection add, I also think there are delays with the creation of the bitmap image that is displayed on the article, and a forced refresh of that (detailed in earlier posts by changing the zoom or height/width) seem to eventually fix that piece. The Equalizer (talk) 15:22, 6 May 2023 (UTC)
- Yes, thank you so much. Just to confirm, is there an easy way to this? I exported it from QGIS, but it seems you changed the data value from an array to a dict with type "FeatureCollection". That's the main issue, right? How would I do this in the future to save space? Maqdisi (talk) 11:39, 5 May 2023 (UTC)
- Looks to be ok now if you can confirm. The Equalizer (talk) 11:19, 5 May 2023 (UTC)
- Thank you, I appreciate it, Maqdisi (talk) 03:29, 4 May 2023 (UTC)
Malformed shapes
Remind me please, do we report OSM shapes that are malformed (with gaps so end up being regarded as a 'way' I think) on Phab due to not being migrated into Wiki OSM properly? They should fill with the same colour like the right-most shape. Don't know if it's one of the existing bugs or if there is now a specific procedure to manage these import faults. Many thanks.
The Equalizer (talk) 19:55, 28 April 2023 (UTC)
- I've realised this is where two OSM relations contain the same Q number and both shapes overlap as a result and confuse the map loader, the three affected shapes have this configuration. I thought I saw a mention on a talk page or Phab about this and will hunt around. In the meanwhile have disabled one of the Wikidata references on one of the shapes to see what happens. The Equalizer (talk) 19:10, 6 May 2023 (UTC)
- Looks to be T321236, and is a similar result to T312938. Fixed by disassociating the multiple Wikidatas and waiting for Kartographer to update. There is an OSM SQL query that can find these. Also mentioned above in the Manhattan, and possibly Hamburg sections (notes for myself in case re-encountered). The Equalizer (talk) 12:59, 9 May 2023 (UTC)
Link to a map data
I think there used to be a link to a map data before, but the link has been removed from the map. Currently the way to get to a map data is to look at the source and find "from=" in a template maplink. Why was the link removed? Is it possible to restore the link?―― Phoenix7777 (talk) 03:04, 7 June 2023 (UTC)
- I am not sure if there ever was such a link, but at maps like {{Ohio Statehouse map}}, I use {{Navbar}} to allow users to easily access and edit the source code. ɱ (talk) 03:14, 7 June 2023 (UTC)
- I don't use templates. So the Navbar solution doesn't work. See Cameron Peak Fire and a map. There was a link to a map data at the bottom right of the map where a link to "Wikimedia map" currently occupies.
Edit request 9 June 2023
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: Display names in other (local) language.
Diff: Explain how to display placenames in Occitan in the French wikipedia. When I copy the mapframe from Occitan wikipedia Tèrra de Bancaliá to the topoinymy section in French Terre de Bancalié, the placenames are displayed in French.
Thanks in advance. --— J. F. B. (me´n parlar) 09:17, 9 June 2023 (UTC)
− | + | CHANGED_TEXT |
— J. F. B. (me´n parlar) 09:17, 9 June 2023 (UTC)
Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. Izno (talk) 01:10, 17 June 2023 (UTC)
Order shapes and show one upfront
, how to make the yellow Circle line appear upfront and not rearfront ? Bouzinac (talk) 14:39, 18 June 2023 (UTC)
- This is a relatively new template I am unfamiliar with. If you were to use the basic {{mapframe}}, I believe you can order how shapes appear based on their order listed (e.g. as "id2", "id3", "id4", etc.). I am not sure this {{Rapid transit OSM map}} has any functionality built in to customize this. ɱ (talk) 15:57, 18 June 2023 (UTC)
- I've tried inside https://en.wikipedia.org/wiki/Template:Rapid_transit_OSM_map/sandbox
- this
{{#if:{{{stations|}}}|ORDER BY if(?id=wd:{{{stations|}}},1,2)}}
- and result yet not sucessful ... https://en.wikipedia.org/wiki/User:Bouzinac/sandbox Bouzinac (talk) 19:19, 18 June 2023 (UTC)
- While the SPARQL query looks to be fairly ordered https://w.wiki/6r2s Bouzinac (talk) 19:28, 18 June 2023 (UTC)
- Is the Circle Line part of the OSM systems entity? If it was I'd expect
|single_line=y
to work. I can't see any fragment of Circle line that isn't overlapped. — Jts1882 | talk 19:39, 18 June 2023 (UTC)- Oh my god! I wrongly assumed OSM was correct about London lines : here's my change https://www.openstreetmap.org/edit?relation=7671006#map=13/51.5113/-0.1510 Now we have to wait for the commit between OSM and wikipedia Bouzinac (talk) 20:03, 18 June 2023 (UTC)
- Is the Circle Line part of the OSM systems entity? If it was I'd expect
- While the SPARQL query looks to be fairly ordered https://w.wiki/6r2s Bouzinac (talk) 19:28, 18 June 2023 (UTC)
- But in the London network, the yellow line still appears rearfront... Bouzinac (talk) 07:53, 19 June 2023 (UTC)
Subject not centred when embedded in infobox
Hello, I created https://commons.wikimedia.org/wiki/Data:Rocherpan_Marine_Protected_Area.map which is perfectly centred there, but on the page https://en.wikipedia.org/wiki/Rocherpan_Marine_Protected_Area it isn't. How do I ensure it is centred? Thanks, Maqdisi (talk) 07:52, 6 July 2023 (UTC)
- Done, please view mapframe parameters. Added "frame-align=center" and "frame-coord". ɱ (talk) 11:28, 6 July 2023 (UTC)
- Oh, I see, I didn't realise that since the Data page has the coords and it centres it. But I see it gets that from Wikidata to specify the centre of the map. Thank you, I really appreciate it, Maqdisi (talk) 11:56, 6 July 2023 (UTC)
Interactive maps in the Kashmir region
Hi there,
You were recommended by user:Deor for this. Something is perplexing me. How does one specify a region in the Mapframe maps? The interactive maps must have some intelligence. For in the Jammu Division, its shaded region appears in the map, but I am not able to do that for the Kashmir division. In both I had supplied the coords of a city within the region in the coords parameter.
So again: how does one specify the lat/long coords of a region, as opposed, say, to a city or town, in these interactive maps? Thanks. Fowler&fowler«Talk» 13:50, 11 June 2023 (UTC)
- The map shapes have to be defined at Open Street Map (OSM) and linked to the appropriate Wikidata item. There is an OSM shape for the Jammu Division linked to Jammu division (Q2817363), which in turn is liked to Jammu Division article here on English Wikipedia. There doesn't seem to be an equivalent shape for the Kashmir division. Unfortunately I can't help you with how to create these shapes at OSM. It's a mystery to me. — Jts1882 | talk 14:37, 11 June 2023 (UTC)
- There is a shape? "Relation: Kashmir Division (13424056)". ɱ (talk) 14:51, 11 June 2023 (UTC)
- The article is now set to display the region's boundaries, once our servers pull the data from OSM. Which may take a few days. Alternatively, you can follow my tutorial at Wikipedia:Creating shape maps from OpenStreetMap data to make this happen sooner. ɱ (talk) 14:57, 11 June 2023 (UTC)
- @Jts1882: see Wikipedia:Creating shape maps from OpenStreetMap data#Part 2: If you need to create the shape for info on shape creation on OSM. ɱ (talk) 15:00, 11 June 2023 (UTC)
- I was following the tutorial and used the analyzer to find the shape. I added a statement to wikidata less than a minute after you did. I'm a bit puzzled. The Jammu division wikidata item doesn't have an OSM statement and but the mapframe works because of the wikidata link. Why didn't the Kashmir one work the same way as the OSM relation was linked to the Wikidata item? — Jts1882 | talk 15:06, 11 June 2023 (UTC)
- Thanks both for the feedback and effort. I forgot to put this on my watchlist hence the late reply. There are also the Gilgit Division, Baltistan Division and Diamer Division. These are in Pakistan-administered Kashmir. The first two showed a map (when I used the lat/long of their capital cities), but no shape. The last did not even generate a map. ("a LUO error it said.") I will look at the tutorial and wait for a few days for the Kashmir division's shading to appear. Thanks again. Fowler&fowler«Talk» 16:45, 11 June 2023 (UTC)
- The thing with the Kashmir region, and so many other borders and other boundaries, is we assume they should be shapes, but the border is actually just a line. Putting type=line at Kashmir division fixed it. ɱ (talk) 11:58, 6 July 2023 (UTC)
- Thanks both for the feedback and effort. I forgot to put this on my watchlist hence the late reply. There are also the Gilgit Division, Baltistan Division and Diamer Division. These are in Pakistan-administered Kashmir. The first two showed a map (when I used the lat/long of their capital cities), but no shape. The last did not even generate a map. ("a LUO error it said.") I will look at the tutorial and wait for a few days for the Kashmir division's shading to appear. Thanks again. Fowler&fowler«Talk» 16:45, 11 June 2023 (UTC)
- I was following the tutorial and used the analyzer to find the shape. I added a statement to wikidata less than a minute after you did. I'm a bit puzzled. The Jammu division wikidata item doesn't have an OSM statement and but the mapframe works because of the wikidata link. Why didn't the Kashmir one work the same way as the OSM relation was linked to the Wikidata item? — Jts1882 | talk 15:06, 11 June 2023 (UTC)
Maplink frames don't display maps
Some maplink frames don't display maps as shown below. I know it takes some time to render the original data. But there is a map that took almost two weeks after the data was created. They show maps correctly during the edit preview. Any suggestions?―― Phoenix7777 (talk) 23:29, 2 July 2023 (UTC)
![]() 2023 Current United States wildfires (map data) |
- Some of these appear to be large files, which may work better hosted on Wikipedia, or displayed like the map at George Floyd protests#Protests. ɱ (talk) 11:33, 6 July 2023 (UTC)
- These all work at Commons:User:Ɱ/sandbox, which makes me think Wikipedia and Commons must not be communicating properly. You can always host your data here... ɱ (talk) 11:50, 6 July 2023 (UTC)
- Seems that WMF has managed to block itself. Filed a ticket —TheDJ (talk • contribs) 13:41, 6 July 2023 (UTC)
- I removed
"geometry":null
from all of the above map data. This change may have solved the problem. The rightmost image of 2023 Canadian wildfires is currently not showing the correct image. This may be an existing caching problem, and I hope it will be resolved soon.―― Phoenix7777 (talk) 09:51, 9 July 2023 (UTC) - The rightmost image is also solved now.―― Phoenix7777 (talk) 09:56, 9 July 2023 (UTC)
- The
"geometry":null
are generated after simplifying the geojson data with mapshaper because the map data exceeded the 2,048 kilobyte limit. I also hope to reduce the limit as well.―― Phoenix7777 (talk) 10:29, 9 July 2023 (UTC)
- I removed
- Seems that WMF has managed to block itself. Filed a ticket —TheDJ (talk • contribs) 13:41, 6 July 2023 (UTC)
Border not working
Should this work ? {{maplink|frame=yes|type=line|id=Q2658266}}
Bouzinac (talk) 11:09, 6 July 2023 (UTC)
- I would assume this should work as a line, not as a shape, but it still doesn't. I wouldn't be surprised if this shape has some glitch in it or recent edit that messed it up. You could always download the XML and upload the file onto Wikimedia Commons or Wikipedia, that usually works with more stability. ɱ (talk) 11:27, 6 July 2023 (UTC)
- How to "convert" the OSM layer into a true geographic file ? Bouzinac (talk) 08:35, 10 July 2023 (UTC)
- The OSM relation has to be of type=multipolygon, type=route, and type=boundary to display on maps. The type of this relation is multilinestring. —TheDJ (talk • contribs) 09:53, 10 July 2023 (UTC)
- Working! Thanks --Bouzinac (talk) 10:52, 17 July 2023 (UTC)
- Would there be a technical reason someone on OSM would prefer type=multilinestring instead of type=boundary , eg there ? Bouzinac (talk) 05:53, 18 July 2023 (UTC)
- In this particular case, I doubt it. Overall.... I'm really not too sure. If I understand it correctly, the defining characteristic is it being discontiguous series of ways. —TheDJ (talk • contribs) 13:31, 18 July 2023 (UTC)
Lua error: not enough memory
Berlin has been intermittently showing "Lua error: not enough memory" over the last few days. Previewing an edit of the article with no change shows Lua memory usage: 52,428,777/52,428,800 bytes
in the HTML source (I added the commas for clarity). The same preview after deleting {{maplink}} from the infobox gives Lua memory usage: 26,738,059/52,428,800 bytes
so {{maplink}} is using nearly 26MB or half the Lua limit. Does anyone know if the wikitext in the article is misguided and contributing to the problem, or is this amount about right? Would the "use the mapframe extension tag directly" trick in the documentation help? Johnuniq (talk) 09:33, 20 July 2023 (UTC)
- Does it need the three mapframe maps? Just editing and preview the top section I get 37M as is, 16M on removing maplink, and 18M when removing the middle switch map and just showing Berlin and Europe. Other tests show it is the Germany map that is resource hungry. Perhaps the border is high resolution. — Jts1882 | talk 10:00, 20 July 2023 (UTC)
- That's outside my scope. I suppose I could ask at Talk:Berlin because it's essentially their problem if the article is broken. However, I wondered also about whether the extension tag might solve the problem and I was hoping someone used to the parameters might try it. Johnuniq (talk) 10:35, 20 July 2023 (UTC)
Omaha, Nebraska Maplink Map
Can you please make Omaha, Nebraska map for me, I don't know how to make one. JNOJ1423 (talk) 19:15, 24 July 2023 (UTC)
Can I use an older base map?
I used maplink in Bronx County Bird Club. The problem is, the club existed in the 1920s, 30s, and 40s, before the Cross Bronx Expressway (I-95) was built. Is there any way to get a basemap which reflects the roads of the time? RoySmith (talk) 16:05, 16 August 2023 (UTC)
- @RoySmith Unfortunately, the underlying Kartographer plugin requires the WMS URL from where the map is taken from to be hardcoded afaik. Unless WMF themselves hosted it it would also be taxing on the servers of the USGS or whatever if something like this was added, so for now your best bet is a static image. – Isochrone (T) 09:21, 17 August 2023 (UTC)
- OpenStreetMap is creating historical maps, but OSM is ambitious enough to even map out all of present-day objects and roads, so this historical project is almost a pipe dream. I don't see a historical OSM map making it onto Wikimedia spaces in my lifetime. And it'd be difficult to choose a year, and perhaps less helpful to a reader. They'd want to see the location where a building is or was in relation to their world as they know it, not the location on some historical map. It's fine to do something like New York Biltmore Hotel does, among countless other demolished landmarks. Simply point out where the site is, using the OSM map. ɱ (talk) 18:44, 17 August 2023 (UTC)
alt?
Is there any way to include alt text with the map? RoySmith (talk) 22:20, 29 August 2023 (UTC)
Highway system OSM map raw query
I was wondering if someone could help explain the raw query used in {{Highway system OSM map}}. We recently had a problem with it described at Wikipedia talk:WikiProject Highways#Problem with Croatian highway infobox maps so it would be nice if this was better understood, to be more maintainable. --Joy (talk) 16:54, 1 December 2023 (UTC)
Map displays fine in preview but flat grey when live. What gives?
Syntax is «infobox mapframe|stroke-width=1|zoom=12|width=240 |geomask=Q19858129 |point=none » (substituting guillemets for braces to display). Problem arises at Middleton, Milton Keynes. I have left it overnight in the hope that it would clear but no joy. Advice? 𝕁𝕄𝔽 (talk) 12:34, 12 December 2023 (UTC)
- @MRSC:, any suggestions? --𝕁𝕄𝔽 (talk) 12:40, 12 December 2023 (UTC)
- Whenever I've run into this sort of thing before it has been something to do with the Wikipedia/Wikidata/OpenStreetMap link up. I've had a quick look but can't see anything obvious. MRSC (talk) 13:00, 12 December 2023 (UTC)
- I'll have to suspend the mapping in the three cases I've had to use geomask= , I can't leave it like that. --𝕁𝕄𝔽 (talk) 13:04, 12 December 2023 (UTC)
- Geomask maps haven't been working for a while, seems to be reported @ phab:T305121.
- Use instead the standard one:
{{Infobox mapframe|stroke-width=1|zoom=12|width=240 |id=Q19858129}}
- Regs, The Equalizer (talk) 20:34, 12 December 2023 (UTC)
- I'll have to suspend the mapping in the three cases I've had to use geomask= , I can't leave it like that. --𝕁𝕄𝔽 (talk) 13:04, 12 December 2023 (UTC)
- Whenever I've run into this sort of thing before it has been something to do with the Wikipedia/Wikidata/OpenStreetMap link up. I've had a quick look but can't see anything obvious. MRSC (talk) 13:00, 12 December 2023 (UTC)
Nested relations
Is there a way to get nested relations, such as that for the Oak Leaf Trail (https://www.openstreetmap.org/relation/16054036), to display using this template? The best I've been able to get working is the default fully zoomed-out view of the globe. huntertur (talk) 02:45, 14 November 2023 (UTC)
- The zoomed out view means it is not working. Looking at OSM Analyser, it thinks the master relation is empty, so there is no shape to render. I think all the ways would need to be added in which is effort, or the individual trails given their own Wikidatas. The Equalizer (talk) 22:22, 18 November 2023 (UTC)
- I have a similar issue with the fr:Ligne d'Avallon à Nuits-sous-Ravières, https://www.openstreetmap.org/relation/6442408 where only the ways included in the parent relation are shown, and not the child relations. There are quite a few instances of this behavior. If I understand you correctly, the only way to address this would be to export all the ways of the nested relations and feed them into the master relation? Could this be done with some export-update and re-import of the XML of that relation? Milliped (talk) 12:41, 13 December 2023 (UTC)
Request to fix JFK Expressway map
The red line of the route for JFK Expressway in the Queens is way too long, it should run from the center of JFK Airport to Exit 20 on the Belt Parkway; right now it runs all the way to central Queens, which it certainly shouldn’t. Thank you. :) Jason Ingtonn (talk) 00:35, 6 August 2023 (UTC)
- Corrected. Regs, The Equalizer (talk) 21:37, 13 December 2023 (UTC)
Maplink view defaults to 0 0 coordinates
Hi there, for some reason when I add a maplink to an infobox tunnel or infobox mountain pass, the maplink doesn't show the specified object; the view is of the 0 0 coordinates. Please see Daspoort Tunnel and Orange–Fish River Tunnel. I also added it to Chapman's Peak but it resolved after a few days. Adding a maplink to infobox river doesn't have that problem; see Berg River. Thanks, Maqdisi (talk) 08:30, 26 October 2023 (UTC)
- Use
{{infobox mapframe}}
instead, have updated Daspoort. Regs, The Equalizer (talk) 01:43, 14 December 2023 (UTC)
Add "Show" to L10n
"Show" as at line 1080 should be added to L10n. --Nk (talk) 13:04, 15 December 2023 (UTC)
- If you view the source for the Mapframe module, there is an edit request button with instructions on how to notify admins. Regs, The Equalizer (talk) 17:43, 15 December 2023 (UTC)
Scale indicator of maps is not shown at published phase
Hi, does exist anyway to show scale of maps? For example, only in preview time, there exists a 20km indicator on the bottom left of this map:
For viewing of this scale, we should do a preview action. But at the time of publishing, such indicator is not shown. If we show, then the scale of map of Shiraz city becomes clearer to the viewer of Wikipedia. Thanks, Hooman Mallahzadeh (talk) 12:12, 22 December 2023 (UTC)
question about switching between maps
I'd like to switch between several different .map files depicting the same region in different times. I tested the template:switcher and the switch function described in the template:mapframe docs. Neither of them worked. The template:switcher just resulted in 3 identical maps (the first of the three maps). The template:mapframe switch function resulted in a map without the associated shapes on top. But it's possible I did it wrong. Here's the code segment for that attempt:
{{maplink|frame=yes|plain=yes|from=SWITCH:Wisconsin's 1st Assembly district (2024–2031).map,Wisconsin's 1st Assembly district (2022–2023).map, Wisconsin's 1st Assembly district (2011–2021).map|frame-height=300|frame-width=400|frame-latitude=44.8|frame-longitude=-88|zoom=7|overlay-horizontal-alignment=right|overlay-vertical-alignment=bottom|overlay=[[File:2024 WI Asm 01.svg|100px]]|switch=From 2024 to 2031, From 2022 to 2023, From 2012 to 2021 }}
I also tried adding overlapping shapes in the same map file and trying to switch by ID. That threw errors. Anyone done or seen something like this before? If I can see a working version I can probably reconstruct it. -- Asdasdasdff (talk) 22:37, 1 March 2024 (UTC)
- Use
{{Switcher}}
instead to allow an overlay: (Remove any colons seen) :{{switcher| :{{maplink|frame=yes|plain=yes|from=Wisconsin's 1st Assembly district (2024–2031).map|frame-height=300|frame-width=400|frame-coord={{coord|44.8|-88}}|frame-longitude=-77.2|zoom=7|overlay-horizontal-alignment=right|overlay-vertical-alignment=bottom|overlay=[[File:2024 WI Asm 01.svg|100px]] :}} :|A - From 2024 to 2031 :|{{maplink|frame=yes|plain=yes|from=Wisconsin's 1st Assembly district (2022–2023).map|frame-height=300|frame-width=400|frame-coord={{coord|44.8|-88}}|frame-longitude=-77.2|zoom=7|overlay-horizontal-alignment=right|overlay-vertical-alignment=bottom|overlay=[[File:2024 WI Asm 01.svg|100px]] :}} :|B - From 2022 to 2023 :|{{maplink|frame=yes|plain=yes|from=Wisconsin's 1st Assembly district (2011–2021).map|frame-height=300|frame-width=400|frame-coord={{coord|44.8|-88}}|frame-longitude=-77.2|zoom=7|overlay-horizontal-alignment=right|overlay-vertical-alignment=bottom|overlay=[[File:2024 WI Asm 01.svg|100px]]}} :|C - From 2011 to 2021 :}}
- Also you report having three identical maps. You should look at the map files on Commons.
- commons:Data:Wisconsin's 1st Assembly district (2024–2031).map
- and
- commons:Data:Wisconsin's 1st Assembly district (2022–2023).map
- I've compared the coordinate data and they both exactly the same.
- commons:Data:Wisconsin's 1st Assembly district (2011–2021).map is subtly different, a small change at the bottom right of the shape.
- The Equalizer (talk) 17:39, 2 March 2024 (UTC)
- Thank you, I will try that out! And yeah, the 2024 map is actually identical to the 2022 map. But I guess I thought it was necessary to indicate that even though the map was unchanged, it was under a new legal authority with the 2024 law vs the 2022 court decision (district 1 is the only district that was left unchanged). Thanks again. -- Asdasdasdff (talk) 23:04, 3 March 2024 (UTC)
- Hey, looks like it worked! Thanks again! -- Asdasdasdff (talk) 23:09, 3 March 2024 (UTC)
Geojson map styling ignored when displaying map on the page, when the data file is in sub directory
geojson color styling rendered for data file in root directory
geojson color styling ignored for data file in subdirectory
While the preview works for both static rendered images behave differently.
I have raised a bug(T359705). This comment is to demonstrate the issue. Arjunaraoc (talk) 05:40, 9 March 2024 (UTC)
- Today I find that the color styling is updated to correct color for the data file in sub directory. The issue may need investigation for delay in updation. Arjunaraoc (talk) 03:56, 10 March 2024 (UTC)
Another example with feature colleciton
Styling rendered with file in root directory
styling rendered for file in sub directory
Surprisingly, the static image for data in sub directory was not updated even after two days, when I tested in actual article page.
- I think there is a caching delay of some sort. I tried updating a file I was working with in a sandbox (so in a subdirectory too) and although it shows ok on Commons it also wouldn't seemingly show the new attributes when used in an article. Even purging hasn't helped. A workaround is to update and then move the file to a new page. The Equalizer (talk) 05:27, 15 March 2024 (UTC)