Module talk:Location map/Archive 11
![]() | This is an archive of past discussions about Module:Location map. 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 5 | ← | Archive 9 | Archive 10 | Archive 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.
No problem when a caption is given. But when there is none, text flows awkwardly:
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: 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: 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: 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)
- 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: 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 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: 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)
- Ask this German editor here @Awkwafaba:. Where are you from?♦ Dr. Blofeld 21:56, 24 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)
- @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)
- OK, I created the redirect. Johnuniq (talk) 08:10, 9 March 2022 (UTC)