Jump to content

Module talk:Location map/Archive 11

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 5Archive 9Archive 10Archive 11

Text flow on phone

I find that when no caption is given the text that follows the map flows round it rather than starting below it, Which can give ugly results when the map is large. Adding a caption solves the problem. E.g.

Location map/Archive 11 is located in Democratic Republic of the Congo
Umangi
Umangi
Yambuya
Yambuya
Bomane
Bomane
Djabir (Bondo)
Djabir (Bondo)
Ibembo
Ibembo
Ekwangatana
Ekwangatana
Yakoma
Yakoma
Locations in the Congo

No problem when a caption is given. But when there is none, text flows awkwardly:

Location map/Archive 11 is located in Democratic Republic of the Congo
Umangi
Umangi
Yambuya
Yambuya
Bomane
Bomane
Djabir (Bondo)
Djabir (Bondo)
Ibembo
Ibembo
Ekwangatana
Ekwangatana
Yakoma
Yakoma
Location map/Archive 11 (Democratic Republic of the Congo)

Scroll to the bottom of this window, click "Mobile view" and size the window to about 400px to see the effect – or just view this page on a phone.

Is this something that can / should be fixed? Aymatth2 (talk) 12:04, 4 November 2021 (UTC)

Tutorial

Hello everyone!

I am interested in knowing the procedure of creating a location map from scratch. (how to I establish the coordinates for the sides as well as the center)

Can anyone help me?

Cheers, DariusConopidovici (talk) 21:35, 16 November 2021 (UTC)

@DariusConopidovici: I suggest that you start with Template:Location_map/Creating_a_new_map_definition and Wikipedia:WikiProject Maps/Conventions/Location maps. There are additional resources at Wikipedia talk:Graphics Lab/Map workshop and the Commons:Graphic_Lab/Map_workshop. None of these seems to adquately address your question about finding the extent, lat/long boundaries in any detail. For me, I use the program QGIS which automatically provides this information for a given project. One limitation is that QGIS will not read in a SVG format. In this case, I created a raster image from the SVG. Then used the QGIS georeferencer. If you want more help, feel free to ping me. - DutchTreat (talk) 15:19, 4 December 2021 (UTC)
Thank you for your indication. I am QGIS user so I'll try to see how this can be worked out. Was also thinking about the BBOX corner coordinates of the image in WGS84 that can help with defining some borders. I ll do a couple of tests and I'll ping you if there is something to discuss in detail.Cheers and have a great weekend DariusConopidovici (talk) 22:24, 4 December 2021 (UTC)
@DariusConopidovici: The map I created in QGIS is called Module:Location map/data/New Zealand Wellington Region. Put a rectengle frame as a vector layer to use a clipping boundary. QGIS displays the bounding box coordinated in the layer properties. Good luck and enjoy the adventure of mapmaking. - DutchTreat (talk) 11:33, 5 December 2021 (UTC)
Thank you for your feedback! Any idea where I can find data that I can process and easily add to wiki (I am referring to administrative areas)? I know about GADM (https://gadm.org/data.html) and OSM but I am not very sure if that can be used here. What do you use? Have a great Sunday! DariusConopidovici (talk) 13:22, 5 December 2021 (UTC)
@DariusConopidovici: Use either OSM or Natural Earth Data (admin boundaries part of the "Cultural" section for each map scale). The license for GADM is restricted for commercial use. It is not a free license. The data cannot be used for Wikipedia projects. See details at Commons:Licensing. Hope this helps! - DutchTreat (talk) 12:09, 6 December 2021 (UTC)
@DutchTreat: So I made this Module:Location map/data/Gabon Woleu-Ntem. What do you think? How do I transform the PNG to SVG? Best regards DariusConopidovici (talk) 09:46, 7 December 2021 (UTC)
@DariusConopidovici: SVG is the preferred format. When you export from QGIS, you will want to choose the SVG format. Have you looked at this map? File:Gabon, administrative divisions - de - colored.svg I'm having some trouble reading the map that you created. The whole country of Gabon is not visible, I think. In the upper right, it would help to show the whole country in the highlight color with surrounding countries of Cameroon, Congo and Equatorial Guinea in grey. - DutchTreat (talk) 15:24, 7 December 2021 (UTC)
@DutchTreat: Thank you for the feedback. You mean that I should make a smaller frame in the map showing where the region is located in Gabon? (in the same manner that you showed that area on the Southern Island of New Zealand?). I'll get to work and fix it :). DariusConopidovici (talk) 19:07, 7 December 2021 (UTC)

@DariusConopidovici: After looking at these maps Commons:ser:Sting/Gallery: Location and locator maps, I think it is best to remove the inset map of the region from the upper right. You can see for both Algeria and Chad that no inset is used for each of the admin areas. - DutchTreat (talk) 12:08, 8 December 2021 (UTC)

Location marks should appear on the full-sized map when you open it

Location marks should appear on the full-sized map when you open it. This seems like it should be technically simple to implement and it's strange that it's not already in place. I can't be the only person who's bothered by this, right? 2601:1C1:8800:1AF0:3D63:F167:97B9:EE48 (talk) 03:08, 25 February 2022 (UTC)

Map request for Tokelau

Not sure if this is the place to request this, but could we get a map for Tokelau? The “best” i found for List of villages in Tokelau is Oceania. Maybe even a Polynesia map would work better. The islands are just north of American Samoa, for context. --awkwafaba (📥) 03:20, 22 February 2022 (UTC)

@Obersachse, John Carter, and Dr. Blofeld: looping you in as you were involved in the earlier discussion. --awkwafaba (📥) 13:53, 24 February 2022 (UTC)
Ask this German editor here @Awkwafaba:. Where are you from?♦ Dr. Blofeld 21:56, 24 February 2022 (UTC)
@Dr. Blofeld: unfortunately not from anywhere that would instill enough knowledge of German to post on that page. Neither from Tokelau. --awkwafaba (📥) 02:43, 25 February 2022 (UTC)

He speaks English LOL.♦ Dr. Blofeld 07:17, 25 February 2022 (UTC)

Rescaling secondaryModules marks in Module:Location map/multi function "load"

At present the handling for secondaryModules seems to directly copy the options for marks from the smaller modules, without care about size. This is fine for real map markers, but for road overlays such as the one in Module:Syrian Civil War overview map (it's originally in the detailed map, but I moved it into the overview) it gets problematic when transcluded into Module:Syrian and Iraqi insurgency detailed map. Maybe we should do something to stretch these sort of size-sensitive not-quite-marks.

The following is a strawman proposal and is not a real edit request. At least not until someone else concurs that we need to do something about it. We should add a new {{location map~}} option to be ignored by the template called preserve_scale; this indicates the secondaryModules code should stretch the image to fit. Then we go into that code and write something like the following to actually do it:

	if dataModule.secondaryModules then
		for _,modname in ipairs(dataModule.secondaryModules) do
            local mod = mw.loadData(modname)
            -- ignoring multi-map for this prototype. also ignoring height stretch (because there's no "height" for {{location map~}}) and non equirectangular (because we can't do complex stretching and calculation is messy)
            local m_map = locmap.getMapParams(mw.getMapParams(mod.containerArgs[1]), frame)
            local m_width = mod.containerArgs.width
            -- calculate width of the mod's map under current frame's params (width left right)
            -- calculate scale ratio = width ratio
			for _,markArgs in ipairs(mod.marks) do
                if markArgs['preserve_scale'] ~= nil then
                   markArgs['width'] = markArgs['width'] * scale
                end
				marks[#marks + 1] = tostring(locmap.mark(frame, markArgs, map))
			end
		end
	end

Artoria2e5 🌉 14:03, 2 March 2022 (UTC)

USA Midwest and Northeast errors

I reported here that Module:Location map/data/USA Northeast was moved to Module:Location map/data/USA Midwest and Northeast and that has broken several articles. For example, Premier Hockey Federation is showing 'Lua error in Module:Location_map/multi at line 27: Unable to find the specified location map definition: "Module:Location map/data/USA Northeast" does not exist.' A discussion at Commons was mentioned in the edit summary. Any views on what should happen to fix the article errors? Possibilitis are to revert the move, or to fix the articles, or possibly to cop out by making an effective redirect at the original title. Johnuniq (talk) 06:33, 9 March 2022 (UTC)

I don't think a redirect is a cop out -- there are plenty of redirected location maps. — hike395 (talk) 07:40, 9 March 2022 (UTC)
OK, I created the redirect. Johnuniq (talk) 08:10, 9 March 2022 (UTC)
@Johnuniq: My apologies for breaking the articles and thanks for cleaning up my mess. I am used to automatically created redirects solving any issues when moving a page. While I don't expect to have to move any modules anytime soon, I will make sure to be more careful if I have to do so and seek a broader consensus. –Noha307 (talk) 04:39, 20 March 2022 (UTC)
No problem! Johnuniq (talk) 05:21, 20 March 2022 (UTC)

Two maps

I was editing the Bhopal disaster and I would like to have the following: one map which shows the location of Bhopal within India and one that shows the location of the plant in Bhopal itself. What would be the best approach to it? PhotographyEdits (talk) 15:04, 9 April 2022 (UTC)

Documentation for Template:Location map data documentation

Should the template {{Location map data documentation}} have some instructions on use? – Reidgreg (talk) 18:58, 10 April 2022 (UTC)

Template-protected edit request on 22 April 2022: submaps

Submaps

Problem with error

Lua error in Module:Location_map at line 422: No value was provided for longitude. in infobox at iSimangaliso Marine Protected Area, but there is a coordinate for the page, and several other pages for marine protected areas seem to work fine. · · · Peter Southwood (talk): 07:05, 10 July 2022 (UTC)

Ther error is because the coordinates were not included in the {{location map}} template. The article already had a map specified by |map_image=. If you want to replace that with a location map, the template supports that with |map= which I added within a comment. You can uncomment that and see the result. Or did you want to show both. MB 16:07, 10 July 2022 (UTC)

Also getting maybe a different problem at infobox of Trafalgar Marine Protected Area, where the position is displaying in the wrong place. the red dot is displayed at somewhere near 34S, 20E, while it should be at the position in the only {{coords}} template on the page, about 30S, 30E. · · · Peter Southwood (talk): 13:43, 10 July 2022 (UTC)

OK, I see you did want both maps so I have got it working by specifying the coords in {{location map}} in both articles. MB 16:22, 10 July 2022 (UTC)
Follow-up, the template will pull the coords from WD if they are present there. In iSimangaliso, there are no coords in WD which is why you were getting no map at all. In Trafalgar, there were WD coords but they were wrong, which explains why the dot was at the wrong location. I updated the later in WD. MB 16:35, 10 July 2022 (UTC)
MB, I was not aware that it took coords from WD. Was not expecting an outside context problem. I guess I missed that in the documentation. Thanks for fixing and letting me know what the problem was. It worked fine in a whole lot of other similar infoboxes, so there was no obvious reason to expect these two to be different. Cheers · · · Peter Southwood (talk): 16:56, 10 July 2022 (UTC)

'class=notpageimage|' displayed in article when location map+ is used

See Lake District for an example. I have no idea why it's doing this. Can someone look into it? KaraLG84 (talk) 12:16, 11 August 2022 (UTC)

Help with a faulty map

Hello, I've been working through the page listing all the articles with linting errors on and I've encountered this page which has been sat at the top of the list for a while.

It has a problem with the map that the linting tool says is down to this markup:

{{#invoke:Location map|top|Russia Bashkortostan|width=1000|float=center|caption=y}}

I've tried to fix it and learn how this template works but I'm stuck. Can anyone help? LicenceToCrenellate (talk) 11:07, 25 August 2022 (UTC)

That module invocation, which is a rare thing in articles, opens some div tags that were not closed. I have put a hack in this non-article to close them. The better resolution is to delete that page. Thanks for fixing Linter errors; you'll probably have better luck getting help with strange Linter problems at Wikipedia talk:Linter. – Jonesey95 (talk) 12:47, 25 August 2022 (UTC)

Thank you for your help. I was unsure about deleting it, probably worth pursing. I didn't know about the lint help page, thanks again! LicenceToCrenellate (talk) 15:42, 25 August 2022 (UTC)

Sharjah

Hi, recently I uploaded this map of the Emirate of Sharjah and I'm wondering if anyone could get it into the location map code so I can use it more efficiently in articles about suburbs and communities in the Emirate. Badass Flare (talk) 19:14, 2 November 2022 (UTC)

The documentation page suggests that Wikipedia editors should check if nothing links to a page to check if it might be broken. But clicking on a map on the list provides no such information. Is this a bug in the mobile Wikipedia formatting, or is that one sentence hint just too obtuse to be useful to first time users of the"location map" template. 77.213.220.123 (talk) 04:47, 29 January 2023 (UTC)

Help with module

Can someone please fix this module? The module is Module:Location map/data/Australia Greater Newcastle. I've been testing it on the page Swansea, New South Wales (by adding | alternative_location_map = Australia Greater Newcastle to the infobox) and I can't seem to get it on the right spot. I've tried about 50 times and it's very frustrating. Can someone please fix this ASAP? Thanks! Thiscouldbeauser (talk) 04:20, 13 April 2023 (UTC)

A new idea to insert outer title in this template

Seen from Washington (state) I just got an idea to place an outer title for this template, which requires an optional parameter |title=. Once this parameter is used, the title is placed at the top of <div class="thumbinner"> element, and centered in there. (see this screenshot)

Who can reproduce? -- Great Brightstar (talk) 07:33, 25 May 2023 (UTC)

Not centred on mobile

On mobile the image follows the float parameter. On narrow screens such as phones, this results in the article's text flowing to the side in a very narrow and hard to read column. In contrast, ordinary images generally are centred, and don't float, unless the screen is wide enough to justify floating. Hairy Dude (talk) 22:50, 3 September 2023 (UTC)

How to show multiple maps

Does anybody know how to show multiple maps that can be selected as in the Jakarta article. Looking at the WML, there is no mention of the filenames used - just some strange hashtags. I tried searching on help, but as is well known, the pathetic inadequacies of that function mean it's almost impossible to find even simple information. Any help, or a pointer to the concealed help page, would be much appreciated. Thanks. Davidelit (Talk) 04:17, 22 July 2023 (UTC)

Under the "pushpin_map" argument present in most geographical infoboxes, you can utilise multiple maps by listing the names of said maps in ascending order, separating each with a hashtag. E.G. "Indonesia Java#Indonesia#Southeast Asia". You can find the names of the specific maps you would like to use by looking at the modules of said maps; the name is shown near the top of the module documentation.
Hope this helps. — Mugtheboss (talk) 22:15, 15 September 2023 (UTC)
As an extension to this, going through Category:Location map modules by country is likely to be helpful towards your efforts in finding the modules you would like to use. — Mugtheboss (talk) 22:27, 15 September 2023 (UTC)

Error in Myanmar map

In Module:Location map/data/Myanmar the two maps there have different coordinates. The File:Myanmar relief location map.jpg mentioned in its description is 92-102 E. So if this file is shown, the coordinate marked is shifted left/right from the place it should be. I think the File:Myanmar adm location map.svg should be changed to File:Myanmar location map.svg and the coordinate should be adjusted accordingly. Not sure what would break if the map range is shrunk. --Lerdsuwa (talk) 02:18, 21 March 2022 (UTC)

I noticed the same thing. For instance Nat Ma Taung does not show up in the correct location. Can someone with the proper editing privileges and more technical know-how please fix this error? 69.130.10.175 (talk) 23:45, 8 February 2023 (UTC)
 DoneMugtheboss (talk) 22:57, 15 September 2023 (UTC)

Pyongyang Map

Hey, I see there's a Module:Location map/data/North Korea, but it'd be nice to have one for Pyongyang more specifically. Similar to Module:Location map/data/South Korea Seoul.

Could anyone create this? Would be much appreciated; I'd make really good mileage out of it by making a bunch of infoboxes for pages with it. toobigtokale (talk) 09:46, 26 September 2023 (UTC)

Bug when displaying several places? Cannot click

Hello, is this a bug?

In map 1, clicking on "Recanati" works fine, both on the name and on the red marker.

In map 2, it's impossible to click on "Recanati". I noticed that if I delete the "Siena" place, it kinda starts working but still a little buggy. There seems to be some kind of interaction that I fail to understand. In this map it happens with other places too, such as Milan.

I noticed it happens frequently on other different maps. Is this a general problem of Location map? Or is it specific to some maps? Can anybody help or provide some insight? Thanks in advance


Gor1995 (talk) 14:23, 2 October 2023 (UTC)

I used a little trick on your second map to show you what label_width of 50 means: Livorno and Siena boxes are completely covering Recanati. For most of those labels 6 would suffice, as shown of your first map. Ponor (talk) 00:31, 3 October 2023 (UTC)

Huh, I just realized I had no idea how the label_width parameter worked :/
Thanks so much for your help!! You're very kind Gor1995 (talk) 07:59, 3 October 2023 (UTC)

First I'd like to suggest including some version of {{navbar}} on each location map template (pointing to that map instead of Location map+ itself). I was experimenting with adding it on {{Oceans and seas in Southeast Asia}} and found it to be helpful and unintrusive with the right formatting parameters, but didn't save the edit because I thought it would be better to have this be standardised between all of the location maps using this template. This could have parameters to turn it off or to override whatever default formatting of navbar we picked so that the user could still format the final result as if inserting that template on the caption manually.

Secondly: We can turn off linking to the default background image with the maplink= parameter on Location map+. However, the vast majority of uses of this template on the wiki have links, and the background image link is very easy to click on by accident. Many, many of these templates are almost unusable because of their tiny links next to a clickable background. Even the example map on the template documentation suffers from a clickable background instead of maplink= despite being full of links. Proposing that the current behavior of maplink= is made the default for that template, and for some other parameter value to produce the current default. YuriNikolai (talk) 19:36, 7 October 2023 (UTC)

Markers

Whats configuration to put more than 1 marker, for example 10 markers in same map. Joaosilva2000 (talk) 08:11, 12 October 2023 (UTC)

Joaosilva2000, see Template:Location map many or Template:Location map~. Frietjes (talk) 20:03, 12 October 2023 (UTC)
The Template:Location map many its like plural version of Template:Location map right? Joaosilva2000 (talk) 03:29, 14 October 2023 (UTC)

image2, image3…

Description of suggested change: see below

Diff: Special:Diff/1177292789

Ponor (talk) 12:51, 23 October 2023 (UTC)


Module:Location map/data/Zimbabwe has three maps in its definition file, but only image and image1 can be used with the help of |relief=: no value means image will be used, any value gives image1. If one wants to use image2, the full file name has to be given to |AlternativeMap=. However, |relief=2 could mean image2, and I think that's what many would expect. I'm proposing this little change Special:Diff/1177292789, which would leave everything as it is now, except when |relief=2…99. @TheDJ, Legoktm, Elli, and Frietjes: I'm pinging you as the last four contributors, not sure how much this page is watched.

The same thing tested at test.wiki from {{Location map}} template is here testwiki:User:Ponor/sandbox/Location map Ponor (talk) 02:43, 27 September 2023 (UTC)

This seems like a reasonable change at first glance but I don't actively maintain this module (and didn't write this) so I'll hold off on implementing for a bit to see if anyone else comments. Elli (talk | contribs) 05:03, 27 September 2023 (UTC)

Leaving a note here that Location map many, Location map+ and their modules need no changes in order for this to work (images from Module:Location map/data/Africa):

Ponor (talk) 16:21, 30 September 2023 (UTC)

 Done * Pppery * it has begun... 00:08, 27 October 2023 (UTC)

Template contains script error

The resecently add line

       local digits = mw.ustring.match(args.relief,'^[1-9][0-9]?$') or '1' -- image1 to image99

is throwing a script error because args.relief is a boolean not a string. Phatom87 (talk contribs) 00:16, 31 October 2023 (UTC)

Example? Frame arguments should always be strings, even if the module interprets them as booleans. I'm sure if my code were really broken it would have taken less than a month for someone to notice. * Pppery * it has begun... 00:50, 31 October 2023 (UTC)
The documentation explains that |relief= takes any non-blank value and has special behavior when the value is a number like "2" or "3". Phatom87: A link to a page where something is broken is always helpful when reporting a problem. – Jonesey95 (talk) 17:47, 31 October 2023 (UTC)
Didn't realize this was sourced to multiple pages anyway Template:Russo-Ukrainian_War_detailed_relief_map is the problem page, Phatom87 (talk contribs) 00:33, 4 November 2023 (UTC)
Yeah, that module is doing something strange. I've fixed it. * Pppery * it has begun... 00:36, 4 November 2023 (UTC)