Page MenuHomePhabricator

Overview of the various ways that maps can be broken and if/how error messages could be shown
Open, Needs TriagePublic5 Estimated Story Points

Description

We want to investigate various ways that maps can be broken and record them. This will be used for future evaluation to decide which might be able to be improved, which might need error messages, etc.

Broken might mean missing information, parts of maps not loading or complete maps not loading. What are the different states, and different problems encountered in each? What are the types of information that can be missing? What does it looks like? If known from this investigation, also note the reasons for things not loading but this can be in follow-up tickets as well.

Different states to investigate (list incomplete, needs thought, just a starting point):

  • Loading (nothing visible)
  • Static maps not loading
  • Dynamic embedded maps
  • Full-screen dynamic maps
  • Tiles not loading
  • Geoshapes not loading (sometimes they load in the small and not the big, sometimes only the full screen but not small)
  • Objects in OSM not visible
  • Editing, preview, final

Review: Examples

Please add here as you come across more examples. Also check the notes section considering possible solutions.

CategoryDescriptionScreenshotNotesPotential improvements
ErrorsBroken image icon
maperror.png (328×512 px, 15 KB)
Possible reasons: server down, ...T309522 Render error on the server side with i18n support
ErrorsBlank map image (static)
image.png (223×289 px, 5 KB)
Happens when the mapdata group ID can't be loaded for an article, for example this image embedded in this article when "uselang=zn-cn" is included, thus. See the bug report T246314.Should be able to serve a localized error message image.
Errors[Dynamic?] Map doesn't load, but markers do
Screen Shot 2022-04-21 at 13.18.12.png (933×1 px, 85 KB)
Might be tile server issuesT309543 Add a note to the user when we have missing tiles
ErrorsMap not visible in VE
Screen Shot 2022-04-20 at 17.56.16.png (717×841 px, 95 KB)
- Should look into this, probably fixable - TBD TICKET
Loading[Static] Missing map while loading
Screen Shot 2022-04-20 at 17.57.02.png (372×501 px, 11 KB)
Screen Shot 2022-04-19 at 15.07.05.png (416×415 px, 22 KB)
The loading displays a broken map stage for a short time:
Peek 2022-05-06 15-32.gif (473×483 px, 102 KB)
T309541 Add a background image with a spinner or similar to static maps
Loading[Dynamic] Missing features/broken map while loadingT309541 Add a background image with a spinner or similar to static maps
Loading[Dynamic?] Map tiles missing
Screen Shot 2022-04-21 at 13.18.34.png (953×1 px, 323 KB)
Mostly happens while loading.T309543 Add a note to the user when we have missing tiles
Annotations[Dynamic] Geoshapes and markers missing
Screen Shot 2022-05-04 at 11.25.09.png (553×917 px, 241 KB)
Screen Shot 2022-05-04 at 11.25.19.png (616×956 px, 581 KB)
https://fr.wikipedia.org/wiki/Occitanie_(r%C3%A9gion_administrative)#Carte_de_la_population_en_Occitanie
Should be possible to add an error message. See also T306987: [stub] Serve formatted error message image when mapdata cannot be found. May be because the mapdata is missing or unavailable. See also T308223.Easy to add an i18n error annotation
Annotations[Static] Plain map without any features/annotations
Screen Shot 2022-05-04 at 11.29.50.png (281×317 px, 37 KB)
Screen Shot 2022-05-04 at 11.30.06.png (633×799 px, 208 KB)
https://en.wikipedia.org/wiki/Alaska#Colonization
Possible reason: Console showing an error message for a failed sparql queryT309522 Render error on the server side with i18n support
Out of scope?Cropped labels
Screenshot from 2022-05-04 16-05-51.png (195×460 px, 142 KB)
This is an OSM issue. See also T228812: Place names get cut off and unreadable on tile boundary.
Out of scope?Entire world is repeated twice
image.png (401×1 px, 224 KB)
Happens when the map width is larger than the proper aspect ratio. This can also happen when a mapframe is set to automatically choose the bounding box based on a geoshape, but the shape doesn't load.- Could limit the aspect ratio to never exceed one world - Crop off map on the sides

Initial categorization of errors:

  • No image is loaded at all.
  • The water outline is rendered, but no map details.
  • The base map is rendered, but no geojson overlays.
  • The overlays are rendered, but no base layer.
  • Corruption of the base map or overlay.

Related Objects

Event Timeline

ECohen_WMDE renamed this task from Investigate various ways that maps can be broken to Investigate and record the various ways that maps can be broken.May 4 2022, 10:27 AM
ECohen_WMDE updated the task description. (Show Details)
lilients_WMDE set the point value for this task to 5.May 5 2022, 12:42 PM
awight updated the task description. (Show Details)

Note, esp. for @ECohen_WMDE: It's possible to use CSS to style the very basic but rather unpredictable "broken image" experience. The possibilities include: Making the alt="…" text visible and style it, including size, weight, color, and shadow; background colors, gradients, repeated and non-repeated images. Think of e.g. an hourglass to indicate "something should have happened here". One aspect to consider is that this styling might be visible for a brief moment before the image successfully loads, notable esp. on slow bandwidth connections. The style shouldn't be aggressive because of this. Here are a few examples:

Screenshot from 2022-05-11 12-33-08.png (342×516 px, 26 KB)

Screenshot from 2022-05-11 12-33-19.png (343×558 px, 23 KB)

Screenshot from 2022-05-11 12-44-23.png (148×474 px, 8 KB)

Something similar might be possible for missing tiles.

Next steps from sprint planning: make initial recommendations about potential improvements for each scenario. For example, whether we can show an error message or if there's some other bug to fix. Create new tasks for each group of improvements. Don't go very deep into proof-of-concept work without another round of discussion.

Missing features/broken map while loading (dynamic): Should be possible to add a background image with a spinner/whatever - TBD TICKET

I actually would argue against a spinner when a map or parts of it are loading in dynamic mode. I think it is very known to users that loading maps can take some time. Other map providers also do not display a spinner in those cases. Especially when we have multiple map tiles missing, displaying multiple spinners would be very challenging visually. 😵

Lena_WMDE renamed this task from Investigate and record the various ways that maps can be broken to Investigate the various ways that maps can be broken and if/how error messages could be shown.May 31 2022, 11:57 AM
lilients_WMDE renamed this task from Investigate the various ways that maps can be broken and if/how error messages could be shown to Overview of the various ways that maps can be broken and if/how error messages could be shown.Aug 2 2022, 12:17 PM
lilients_WMDE added a project: Epic.

In addition to what I wrote in T305433#7920365 I played around with a little snippet of JavaScript that makes the existing error messages visible to the user. It will show up in place of the "This is the alt text …" messages in the example screenshots in T305433#7920365.

<style>
img.error {
	background: #f99;
}
</style>
<script>
function handleImgOnError( image ) {
	var request = new XMLHttpRequest();
	request.open( 'GET', image.src );
	request.send( null );
	request.onreadystatechange = function () {
		image.alt = request.responseText;
		image.className = 'error';
	}
}
</script>
<img src="thisWillFail.txt" width="400" height="400" onerror="handleImgOnError( this )">

At this point the error message can also be shown as a popup, in case we want that.