Jump to content

Module talk:Mapframe/Archive 2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 06:51, 31 March 2023 (Archiving 1 discussion(s) from Module talk:Mapframe) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 1Archive 2

 You are invited to join the discussion at Wikipedia:Graphics Lab/Map workshop § Broken map, not sure how to fix.... — Berrely • TalkContribs 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 through mw.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)

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)

UK Wikidata items with and without maps

Map
Notable areas around Shoreham-by-Sea

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:

Umtiza Nature Reserve

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. /media/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 (talkcontribs) 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
}}

]

Map
Map

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

Map
Map

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 (talkcontribs) 12:08, 11 June 2022 (UTC)

Template-protected edit request on 21 June 2022 Suggestion Fixing style/layout errors Spelling/grammar/punctuation/typographical correction

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:

Map
San Francisco International Airport


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)