vue-leaflet/Vue2Leaflet

Cannot add alt-text to l-marker icon

bche1132 opened this issue · 2 comments

Description

Cannot add alt-text to l-marker icon. Have not seen this in the docs. This is an attribute in leaflet itself, but have seen no props or way to pass in alt-text with the vue-leaflet package

Live Demo

http://jsfiddle.net/2qcgwLm7/
Inspect icon with your browser, no alternate text is available, even though the markers are part of the tab index.

Steps to Reproduce

N/A

Expected Results

alternate text is available

Actual Results

alt is blank

Browsers Affected

  • Chrome
  • Firefox
  • Edge
  • Safari 9
  • Safari 8
  • IE 11

Versions

  • Leaflet: v1.7.1
  • Vue: v2.6.12
  • Vue2Leaflet: v2.6.0
mikeu commented

Hi @bche1132 , you should be able to pass any Leaflet option that does not have a corresponding Vue prop via the options object prop. For example,

<l-marker :lat-lng="marker" :options="{alt: 'default marker'}"></l-marker>

Does that work for you?

@mikeu yes! Thank you that's perfect.
Appreciate the quick response!