Wikivoyage talk:Dynamic maps Expedition

From Wikivoyage
Jump to navigation Jump to search

Archived discussions


Borders in dynamic maps[edit]

Swept in from the pub
Spain's borders are mostly fine, but on Firefox the borders are gone in most of France and to the east.

On Firefox, national and regional borders in some large chunks of the world have disappeared (especially in the southern and eastern hemispheres), and others appear and disappear depending on whether the zoom level is even or odd. On Safari there seems to be no problem. What is causing this? How can we fix it? —Granger (talk · contribs) 14:12, 18 May 2020 (UTC)

I've opened Firefox and I'm not experiencing this problem. (Is it perhaps limited to one computer?) --Comment by Selfie City (talk | contributions) 18:33, 18 May 2020 (UTC)
Maybe. Now on my computer France's borders are mostly fine, but the ones to the west have disappeared (but only on zoom level 3). —Granger (talk · contribs) 18:40, 18 May 2020 (UTC)
My Firefox (68.5.0esr 64-bit LTS on Debian) shows them OK, at least in that region. I don't see what the zoom level is, but it seems country borders appear at 3 and region borders at 4 (if counting is from 1). --LPfi (talk) 19:13, 18 May 2020 (UTC)
Is that a type of problem that can appear when allowed memory use is approaching? --LPfi (talk) 19:15, 18 May 2020 (UTC)
Maybe, but it's hard for me to see how that would explain the different behavior between even and odd zoom levels. That version of the problem has come back for me, by the way—all national and regional borders seem to disappear at odd zoom levels (3, 5, 7...), and many of them are gone at even zoom levels too. (The map in this section is at zoom level 3 by default; every time you click the button to zoom in, it adds 1.) —Granger (talk · contribs) 19:38, 18 May 2020 (UTC)
This looks to be a problem with the tile renderer. I don't see them at zoom 3, but at zoom 4 I see them only in some places. OSM renders maps into fixed-size "tile" images, and it's clear from what I see that some tiles have them and some don't. My guess is that either someone made a bad change in the stylesheet controlling visibility and rendering, which is either slowly turning up as tiles get rerendered (or slowly disappearing after the error was reverted), or that there's a problem on the tile rendering servers. It's certainly not a problem on anyone's PC or browser. --Bigpeteb (talk)
Good to know it's not just me! It is strange the way the problem comes and goes. The map on this page seems to be back to normal for me now. We'll see if that changes again. —Granger (talk · contribs) 19:51, 18 May 2020 (UTC)

Two (or more) separate dynamic maps on a page[edit]

I'm working on a topic article, the Wine Regions of Ontario, in which I want to have four dynamic maps, one for each of four regions. So far, I have four identical maps showing all of the POIs. Is there a way to include only the POIs in a subsection in a map for that subsection? Thanks, Ground Zero (talk) 19:31, 3 July 2020 (UTC)

I've found a work-around that seems to work, but it feels like cheating. I've used latitude and longitude parameters to centre each map on the the region I want to display, and then the zoom parameter to exclude the rest of the province. I would prefer a more elegant solution if there is one. Ground Zero (talk) 03:54, 4 July 2020 (UTC)

Switchable static/dynamic map[edit]

Swept in from the pub

Since there's a big dynamic-map-dislike club around here, going around deleting {{Mapframe}}|staticmap=... , I was thinking - would something like this User:Andree.sk/Multimap make the dynamic maps more acceptable? (obviously some better styling would be needed) -- andree.sk(talk) 07:52, 3 August 2020 (UTC)

I like it! --Renek78 (talk) 08:12, 3 August 2020 (UTC)
I saw that you were working on this earlier, and I agree that it's a really good idea and could be incorporated into some articles. --Comment by Selfie City (talk | contributions) 21:59, 3 August 2020 (UTC)
Interesting. Worth testing out on a few articles, perhaps. Powers (talk) 01:27, 4 August 2020 (UTC)
I don't see how a dynamic map would ever be preferable to a static map in an article that's not a bottom-level destination, but so long as the article doesn't display both maps simultaneously, I won't stand in the way of this idea. -- AndreCarrotflower (talk) 02:09, 4 August 2020 (UTC)
While helping out with a Wikipedia template (Cyclone map) I monitored/followed some work you may also be interested in: Radio buttons for switching between historical maps and Wikipedia Request for comment: Mapframe maps in infoboxes. -- Matroc (talk) 03:09, 4 August 2020 (UTC)
I would like to have that feature, unless it has drawbacks such as bandwidth use. I often want information that is not available in the static map – and information not available in, or hard to discern from, the dynamic one. One tweak suggestion: try to get identical sizes; when switching back and forth to compare the maps, having to move the mouse hinders keeping focused on the spot being compared (and is also otherwise irritating). --LPfi (talk) 08:08, 4 August 2020 (UTC)
Good idea! One other slight improvement to change the "Switch map" text depending on which map is displayed; e.g the dynamic map is displayed, so it says "Switch to static map".--ThunderingTyphoons! (talk) 09:59, 4 August 2020 (UTC)
Do our readers actually know what static/dynamic map is? Perhaps something like schematic/detailed map could be better? -- andree.sk(talk) 04:46, 5 August 2020 (UTC)
It's misleading to suggest that one variety of map is inherently more or less detailed than the other. A static map can be as detailed or as simple as its maker chooses and so can a dynamic one. The fundamental difference between them from the reader's perspective is spelled out in the current terminology about as plainly as it can be - dynamic maps have a zoom feature when rendered on a browser while static ones don't - which is not to even mention the fact that the current terminology has been in use on this site for seven years and how immensely disruptive it would be to change it. -- AndreCarrotflower (talk) 04:53, 5 August 2020 (UTC)
It could be printable/zoomable or whatever - the question is if a newcomer sees "Switch to dynamic map", if it would make sense to him. I don't think we explicitly promote the term anywhere outside the pub... ? -- andree.sk(talk) 07:35, 5 August 2020 (UTC)
That's a valid point. "Dynamic map" is certainly used widely in Wikivoyage space pages (e.g. Wikivoyage:Map), but it isn't as far as I know in use anywhere in article space. "Printable" and "zoomable" work as descriptive terms, rather than as name changes.--ThunderingTyphoons! (talk) 09:33, 5 August 2020 (UTC)
If it's just a question of the labeling for this new switchable map template, "static map" and "interactive map" would probably be clearer for most users. -- Ryan • (talk) • 15:02, 5 August 2020 (UTC)
I like all of the suggested alternative terrms (printable, zoomable, interactive). WhatamIdoing (talk) 23:09, 5 August 2020 (UTC)
Great idea! I modified your work to make the style better: User:City-busz/Multimap. Changes:
  • The map can be switched by the thumbnail caption text.
  • The text is changing between "switch to interactive map" and "switch to static map" as needed.
  • The map sizes are identical.--City-busz (talk) 21:22, 14 August 2020 (UTC)
Great idea andree and excellent fine tuning City-busz! I think the next step is to change Template:Regionlist to manage internally the div code and determine the right size for the interactive map. --Andyrom75 (talk) 15:58, 6 September 2020 (UTC)
Take a look at Template:Regionlist/Test. I'd like to fetch the height of the image but I don't know how to do it. Any idea? --Andyrom75 (talk) 16:23, 6 September 2020 (UTC)
Finally I've done. Now is possible to add just "| regionInteractiveMap=map1" to the Regionlist template and inside the article the relevant "geoshapes". This would be helpful to all the editors that are used with the current syntax. What do you think? --Andyrom75 (talk) 22:50, 6 September 2020 (UTC)
Nice work, User:City-busz and User:Andyrom75! I would say it's pretty good for the rollout - we can always improve on it later, if new "requirements" show up. I'd just consider splitting out the static/interactive switcher to a separate template, maybe we'll need it. And perhaps add a switch to prefer the dynamic map (though that might be too hard to implement without duplicating all the code)... In any case, great that it could be done without additional javascript! -- andree.sk(talk) 06:07, 7 September 2020 (UTC)
Thanks for your work User:Andyrom75! Great to see that it works within the region template. One thing that I noticed is that this solution doesn't work with the mobile view, but I don't know why: https://en.m.wikivoyage.org/wiki/Template:Regionlist/Test --City-busz (talk) 09:41, 7 September 2020 (UTC)
User:City-busz, it's a known issue that collapsable area doesn't work on mobile view. See phabricator:T111565. . --Andyrom75 (talk) 09:51, 7 September 2020 (UTC)

Hi Andree, City-busz and Andyrom75, thanks for working on this, it looks great. I was testing it on this edit here and a couple of things I found are:

  • When I toggled to the dynamic map, it kept zooming out. I'm not sure why but was wondering if the zoom parameter should be included to stop this
  • I think it's easy to miss the toggle switch because it's just black text like the description. Is it possible to make it a different colour or stylize it like a hyperlink or do something to highlight it's interactive?
  • This comment is just a nice-to-have, but I think it would be ideal if it the user could specify whether the dynamic map or static map is the default for the page. The quality of both styles of maps varies from page-to-page so it would be nice if we could put the best one forward as the default.

Overall though, it looks awesome. -Shaundd (talk) 16:43, 2 October 2020 (UTC)

Shaundd the zoom-out issue is caused by the presence of the railway shape. But honestly I don't know why... I'll try to figure out if your idea can be implemented as a workaround, but I think that the problem is elsewhere.
Good point on the switch label. Is easy to do, we just decide how to customize. I've just made a change.
On the last point I can say that is feasible but I think that the best approach is to show first the static one. Let's remember that Wikivoyage initially was made to be printed, (although nowadays is not common) and once in paper you cannot switch :-). If the static map is awful, well... maybe we should remove it instead of putting it in the background. On the other hand, currently the template assumed to have a static map. If we want to implement officially this template, we can extend it to work also with a dynamic map only (quite easy to do ... but I haven't done it because I don't know if there is a real interest). --Andyrom75 (talk) 17:20, 2 October 2020 (UTC)
Shaundd, I've just implemented your suggested zoom and it works; Check it! :-) --Andyrom75 (talk) 17:33, 2 October 2020 (UTC)
@Andyrom75: Cool. I see it centers the map based on all the mapshapes, which in the case of East China, pulls it away from the area of focus. It's an unusual case, but I wonder if it would be good to permit the lat and long to specified (like a normal mapframe) to cover situations like this? I did another test too, at Kootenays, and it works fine as-is. -Shaundd (talk) 19:57, 2 October 2020 (UTC)
Shaundd, automatic center is how maps work by default if coords are not specified. Although I like to keep thigs simple, I've implemented the optional parameters regionmapLat, regionmapLong and for uniformity I've change the name of zoom into regionmapZoom. Now you can play with them :-) --Andyrom75 (talk) 20:40, 2 October 2020 (UTC)
Thanks Andyrom75, I agree simple is better, but I find the auto-center feature of dynamic maps doesn't always hit the best spot so I think it's good to allow users to position the map if needed.
Do you think it's ready to deploy to the Regionlist template? -Shaundd (talk) 21:33, 2 October 2020 (UTC)
Shaundd, for me it's fine. Any further feature can be added afterwards. PS Once published, the two articles used for the test shall be adjusted to use again the main template. --Andyrom75 (talk) 22:18, 2 October 2020 (UTC)
Shaundd, I've just deployed the template (and updated thw two articles). Template manual is not yet updated; I'll wait few days to get any feedback. --Andyrom75 (talk) 13:16, 4 October 2020 (UTC)
Shaundd, I've just added a brief explanation of the new parameters on Template:Regionlist/doc, feel free to improve it. --Andyrom75 (talk) 13:13, 11 October 2020 (UTC)
Thanks Andyrom75. I made some copyedits and added a bit more detail about how it interacts with the "group" parameter in the mapshape template. -Shaundd (talk) 05:50, 16 October 2020 (UTC)

One of the best features of WikiVovage is the dynamic map (which is something that no other guide has!). I want to provide maps of Dartmoor villages (showing hills and vegetation - that the default map does not show) and have experimented adding a Maplink layers=M or Relief Map layer=S [as indicated in Wikivoyage:How to use dynamic maps] to Widecombe in the Moor. I cannot get this to work: am I making a rookie error or is the layers functionality disabled RobThinks (talk) 23:22, 10 November 2020 (UTC)

RobThinks, if I understood correctly, you want to set as default the Mapnik or Relief map layer that you can activate manually clicking on the radio button on the right top of the map. In the affirmative case, you could see that near Wikimedia option there is a different icon, this icon means that this service map is provided from Wikimedia server, while the other two layers from external servers. Years ago has been decided to disable the possibility to set as default these layers because user IP (considered as a sensitive user data) would have been shared with a third party without explicit user approval. While the "external service icon" joint to a "manual click" is considered an explicit approval. I hope I've answered to your doubt. --Andyrom75 (talk) 10:19, 13 November 2020 (UTC)
Thanks Andyrom75. I am beginning to understand, however I believe that other new copyeditors will ask the same questions or scratch their heads like me. May I suggest:
  1. It appears that Wikivoyage:How to use dynamic maps is for copyeditors and we should consider changing its title to 'Wikivoyage:How to construct or make dynamic maps' ?
  2. On the Main Page we should consider a short video, or a link to one, to explain how brilliant Wikivoyage dynamic maps are and how they help filter what a newcomer [a reader] find exactly what they are hunting for [by selecting one of the two radio buttons].
  3. Moving the Basic layers (opaque) and Additional layers (transparent) sections to the end into an 'Deprecated Markup Section', as I believe the layers= tag does no longer functions [from the initial mapframe map]? RobThinks (talk) 00:18, 14 November 2020 (UTC)

Many dynamic maps don’t show the POI... does anyone know why?[edit]

Swept in from the pub

It seems to be happening only in articles with dynamic maps that have mapmasks. Has this bug been brought up anywhere? Is anyone working on fixing this. I noticed it first at HebVoy a couple of weeks ago, but then started seeing that this is happening at the parallel articles on EnVoy. ויקיג'אנקי (talk) 17:44, 23 December 2020 (UTC)

I noticed this problem a few days ago, on Dongguan and Foshan. It seems to come and go. I tried fiddling with the Foshan article to get rid of it, but it went away on its own. —Granger (talk · contribs) 18:50, 23 December 2020 (UTC)
Is it possible to have any of the developers responsible for this feature address this issue here? ויקיג'אנקי (talk) 15:14, 24 December 2020 (UTC)
Have either of you looked on Phabricator to see if anyone's reported it as an issue? --ThunderingTyphoons! (talk) 15:44, 24 December 2020 (UTC)
I see Dongguan correctly. In Foshan I've removed {{mapshapes|Q660751}} (metro line) and only now I see all the markers. However I see a glitch on the right side of the shown grey area just for few initial milliseconds. I can't state if the problem is on voy template, wikidata instance or OSM information. Since Template:Mapframe, Template:Mapshape, Template:Mapshapes and Template:Marker hasn't been changed since years, I would tend to exclude that the issue is on Wikivoayge. If the problem is just on few articles (just to say a number, less of a dozen despite the existing thousands) it's a problem of OSM data on a specific instance so it's not a Phabricator matter and need to be solved by someone familiar with OSM. --Andyrom75 (talk) 06:16, 26 December 2020 (UTC)
Granger, if you are able to interact with Chrome console, check it on Foshan. Without the "mapshapes" I got not JS error and I was able to see all the POI in the map, but now that you have restore it, I got the following JS error: Unable to add datalayers to map.. I don't know how to solve it, but that's why me (and potentially others) are not able to see the POI on the map. --Andyrom75 (talk) 12:48, 26 December 2020 (UTC)
Interesting. On Chrome I see exactly what you describe, but on Firefox that error doesn't appear and the markers display correctly. I do get several other errors in the console on Firefox, though, including
  • Error: Missing host permission for the tab
  • NS_ERROR_FAILURE (with a fairly long error message)
  • InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
Granger (talk · contribs) 14:03, 26 December 2020 (UTC)

This failure is a well-known one. If there is any failure in retrieving geoline or geoshape data from https://maps.wikimedia.org/ map server then the Javascript script for the display of map markers is doing nothing. But the map markers should be displayed in the unlucky case of retrieval failures, too. Unfortunately the map server is failing for whatever reasons (traffic, defective OSM relations, ...). The simple cause is a programming failure. --RolandUnger (talk) 09:11, 28 December 2020 (UTC)

Wonky Yugoslavia[edit]

Swept in from the pub

I'm trying to create a dynamic map (User:Nricardo/Sandbox3) to replace the not-quite-right static map at Western Balkans, but the mapshapes for Bosnia and Herzegovina and Croatia aren't filling properly. If I change type from geoshape to geoline, the outlines do populate (but without fill color), which is weird. I checked that the Wikidata and OpenStreeMap IDs are populated in the respective databases. Something must be off somewhere along the line, and I don't think WV is the problem. French WV is showing the same behavior (fr:Yougoslavie), though they use the older html tag syntax. Any ideas, folks? Thank you. --Nelson Ricardo (talk) 09:19, 26 March 2021 (UTC)

For B&H, the respective map query returns empty data, as compared to e.g. working Serbia. So there's either bug in OSM data (incomplete boundary in the relation), or some bug in the wikimedia map importer. Both are possible... I summon @RolandUnger:, since he has probably more ideas to figure out what's happening. :-) -- andree.sk(talk) 19:09, 26 March 2021 (UTC)
The shape contour of Bosnia and Herzegovina is not closed, that's why it cannot be the border line of an area. It is working with geoline, {{mapshape|wikidata=Q225|type=geoline|fill={{StdColor|T1}}|title=[[Bosnia and Herzegovina]]}}. It is commonly known that there are many cases in OSM where contour lines are not closed. Normally these lines should automatically be closed by the mapserver software. Unfortunately it seems to be a never ending story. --RolandUnger (talk) 08:10, 27 March 2021 (UTC)
@RolandUnger: I see that Bosnia and Herzegovina is fixed now. I believe that was your doing, so thank you! Any ideas on Croatia? --Nelson Ricardo (talk) 21:07, 29 March 2021 (UTC)

Northern Chile[edit]

The Northern Chile map looks like it is properly defined to include wikidata Q2109,Q2114,Q2118,Q2120,Q2121, but the last two appear shaded. Can anyone figure this out? The regions are listed from north to south, with the two southern-most regions being shaded-out. Thanks. Ground Zero (talk) 11:46, 10 May 2021 (UTC)