Page MenuHomePhabricator

Display map markers on Kartographer maps even in case of mapserver failures
Open, LowPublic


If the fetching of mapserver data using or fails then all map markers are not shown.

Both mapshapes and markers are created in several layers. Their definition is made in HTML document header using the JavaScript GeoJSON declaration of wgKartographerLiveData. The markers to display are directly defined in the document header and are therefore available at any time. Geolines and geoshapes are specified as external data by their Wikidata IDs and must be fetched from server. This is done with AJAX-call promises and can, of course, fail.

After a completely faultless retrieval the map-markers are added. Unluckily in case of any failure nothing is done although both the base map and the marker coordinates are available. This has to be changed in a manner that the markers should be shown in the case of failures, too.

The code should be work similar to the following example:

Promise.all( promiseArray )
	.then( function() { displayAllMarkers(); } )
	.catch( function() { displayAllMarkers(); } );

The map server failures can have different causes as reported for instance in T241644 and T226412. In that cases the map server is returning nothing or a error statement like "Cannot GET /geoline". These errors will prevent the drawing of map markers.