1import { Controller } from '@hotwired/stimulus'; 2 3export default class extends Controller { 4 connect() { 5 this.element.addEventListener('ux:map:marker:before-create', this._onMarkerBeforeCreate); 6 } 7 8 disconnect() { 9 this.element.removeEventListener('ux:map:marker:before-create', this._onMarkerBeforeCreate); 10 } 11 12 _onMarkerBeforeCreate(event) { 13 const markerIconUrl = event.detail.definition.extra.iconUrl; 14 const { definition, L } = event.detail; 15 16 const markerIcon = new L.Icon({ 17 iconUrl: markerIconUrl, 18 shadowUrl: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/images/marker-shadow.png', 19 iconSize: [25, 41], 20 iconAnchor: [12, 41], 21 popupAnchor: [1, -34], 22 shadowSize: [41, 41], 23 }); 24 25 definition.rawOptions = { 26 icon: markerIcon, 27 }; 28 } 29}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.