Skip to content

Commit

Permalink
Fix Esri#1228 safari partially rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiwolkobmt committed Dec 2, 2021
1 parent 0c9839a commit c7bdd1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Layers/RasterLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ export var RasterLayer = Layer.extend({
interactive: this.options.interactive
}).addTo(this._map);

// See issue 1228 (https://github.com/Esri/esri-leaflet/issues/1228)
// Safari sometimes only partially renders imgs with decoding = sync (safari default)
// To enforce full rendering of img use decoding = async
image._image.decoding = 'async';

var onOverlayError = function () {
this._map.removeLayer(image);
this.fire('error');
Expand Down

0 comments on commit c7bdd1b

Please sign in to comment.