From ac615cb89e50cbc9762107dbf9ae03d25fa1bd3e Mon Sep 17 00:00:00 2001 From: "francis.chan" Date: Mon, 30 Jun 2014 10:28:48 +0800 Subject: [PATCH] can customize alt attribute of the image in imageOverlay. --- src/layer/ImageOverlay.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layer/ImageOverlay.js b/src/layer/ImageOverlay.js index 42deb3b8..b2ac282b 100644 --- a/src/layer/ImageOverlay.js +++ b/src/layer/ImageOverlay.js @@ -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) {