can customize alt attribute of the image in imageOverlay.
This commit is contained in:
parent
e58f6b1727
commit
ac615cb89e
@ -5,7 +5,8 @@
|
|||||||
L.ImageOverlay = L.Layer.extend({
|
L.ImageOverlay = L.Layer.extend({
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
opacity: 1
|
opacity: 1,
|
||||||
|
alt: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (url, bounds, options) { // (String, LatLngBounds, Object)
|
initialize: function (url, bounds, options) { // (String, LatLngBounds, Object)
|
||||||
@ -90,6 +91,7 @@ L.ImageOverlay = L.Layer.extend({
|
|||||||
|
|
||||||
img.onload = L.bind(this.fire, this, 'load');
|
img.onload = L.bind(this.fire, this, 'load');
|
||||||
img.src = this._url;
|
img.src = this._url;
|
||||||
|
img.alt = this.options.alt;
|
||||||
},
|
},
|
||||||
|
|
||||||
_animateZoom: function (e) {
|
_animateZoom: function (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user