From ff62b32aedb33e53d3064c31f1370b2916e774bf Mon Sep 17 00:00:00 2001 From: Olli Raitio Date: Wed, 1 Nov 2017 15:19:14 +0200 Subject: [PATCH] Use absolute path for xlink:href attribute --- leaflet.textpath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet.textpath.js b/leaflet.textpath.js index cd001d4..d13d9fd 100755 --- a/leaflet.textpath.js +++ b/leaflet.textpath.js @@ -98,7 +98,7 @@ var PolylineTextPath = { var dy = options.offset || this._path.getAttribute('stroke-width'); - textPath.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", '#'+id); + textPath.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", window.location.href + '#' + id); textNode.setAttribute('dy', dy); for (var attr in options.attributes) textNode.setAttribute(attr, options.attributes[attr]);