marker.title is not set on leaflet.drupal.js

Created on 26 January 2024, 11 months ago
Updated 9 February 2024, 11 months ago

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,
    };
🐛 Bug report
Status

Fixed

Version

10.2

Component

Code

Created by

🇮🇹Italy finex

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024