Problem/Motivation
Markers "alt" attribute are set to an empty string because marker.title is not set on leaflet.drupal.js.
The following code should set the title, but marker.title is "undefined" and there is no option to set this value from the frontend.
Drupal.Leaflet.prototype.create_point = function(marker) {
let latLng = new L.LatLng(marker.lat, marker.lon);
let lMarker;
let marker_title = marker.title ? marker.title.replace(/<[^>]*>/g, '').trim() : '';
let options = {
title: marker_title,
className: marker.className || '',
alt: marker_title,
};
Comments
Comment #4
itamair commentedThanks @FiNeX
very nice catch.
The Marker title was left away from the new Leaflet Tooltip implementation in Version 10.x.
The new 10.2.11 release properly fix this and re-enable the Marker Title both in case of simple title and of Leaflet Tooltip.