Skip to content

Commit

Permalink
Support 'withCredentials' option on Image Overlays
Browse files Browse the repository at this point in the history
  • Loading branch information
luiscamachopt authored Oct 2, 2020
1 parent 8c88145 commit 980bc5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Layers/RasterLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { cors } from '../Support';
import { setEsriAttribution } from '../Util';

var Overlay = ImageOverlay.extend({
_initImage: function() {
ImageOverlay.prototype._initImage.call(this);
if (this.options.withCredentials) this._image.crossOrigin = 'use-credentials';
},
onAdd: function (map) {
this._topLeft = map.getPixelBounds().min;
ImageOverlay.prototype.onAdd.call(this, map);
Expand Down

0 comments on commit 980bc5d

Please sign in to comment.