Uncaught TypeError: L.control.resetView is not a function

Created on 16 June 2025, 9 days ago

I create view block toggle with leaflet when clicking on it will show map I don't understand why it shows error in console log but block still works normally
Line 76 javascript
Drupal.Leaflet[mapid].reset_view_control = L.control.resetView(map_reset_view_options).addTo(map_container.data('leaflet').lMap);

drupal.js?v=11.1.7:64 Uncaught TypeError: L.control.resetView is not a function
    at loadMap (leaflet.drupal.js?sxxoe5:76:70)
    at HTMLDivElement.<anonymous> (leaflet.drupal.js?sxxoe5:194:13)
    at T.each (jquery.min.js?v=4.0.0-beta.2:2:2876)
    at T.fn.init.each (jquery.min.js?v=4.0.0-beta.2:2:1386)
    at Object.<anonymous> (leaflet.drupal.js?sxxoe5:16:26)
    at T.each (jquery.min.js?v=4.0.0-beta.2:2:2925)
    at Object.attach (leaflet.drupal.js?sxxoe5:10:9)
    at drupal.js?v=11.1.7:166:24
    at Array.forEach (<anonymous>)
    at Drupal.attachBehaviors (drupal.js?v=11.1.7:162:34)
🐛 Bug report
Status

Active

Version

10.3

Component

Code

Created by

🇫🇷France lazzyvn paris

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

Comments & Activities

Production build 0.71.5 2024