can customize alt attribute of the image in imageOverlay.

This commit is contained in:
francis.chan 2014-06-30 10:28:48 +08:00
parent e58f6b1727
commit ac615cb89e

View File

@ -5,7 +5,8 @@
L.ImageOverlay = L.Layer.extend({
options: {
opacity: 1
opacity: 1,
alt: ''
},
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.src = this._url;
img.alt = this.options.alt;
},
_animateZoom: function (e) {