w8r / Leaflet.Bookmarks

Leaflet plugin for user-generated bookmarks
http://w8r.github.io/Leaflet.Bookmarks/
59 stars 17 forks source link

Plugin is broken with leaflet 1.9.3 #30

Closed B-e-n-G closed 1 year ago

B-e-n-G commented 1 year ago

It seems the plugin is broken with the latest leaflet version 1.9.3 or one of the version before. The exmaple runs with leaflet version 1.6.0.

w8r commented 1 year ago

I will check it out

On Thu, 15 Dec 2022 at 12:46, B-e-n-G @.***> wrote:

It seems the plugin is broken with the latest leaflet version 1.9.3 or one of the version before. The exmaple runs with leaflet version 1.6.0.

— Reply to this email directly, view it on GitHub https://github.com/w8r/Leaflet.Bookmarks/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGSBBFXA3IIA3AOPTZWHTWNMAJDANCNFSM6AAAAAAS7UFXJI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

B-e-n-G commented 1 year ago

To give more detailied informations... the this._close in L.Control.Bookmarks.js (for example in line 647) is undefined and the call _close() crashes. It seems that this._popup is undefined as well (around this line).

PedroVenancio commented 1 year ago

Hi @w8r I have the same issue

Uncaught TypeError: this._close is not a function
    at NewClass._onSubmit (formpopup.js:284:12)
    at HTMLFormElement.handler (DomEvent.js:108:13)

Is there anything we can do to overcome it?

Thanks!

PedroVenancio commented 1 year ago

The origin of the issue seems to be this change: https://github.com/Leaflet/Leaflet/pull/6962

w8r commented 1 year ago

fixed in 0.5.0

PedroVenancio commented 1 year ago

Hi @w8r

Thank you very much for the update!! Do you plan to build the code again with version 0.5.0? dist folder was removed.

Thanks again!

w8r commented 1 year ago

Fixed in 0.5.1. You can get the built version from CDNs like unpkg

PedroVenancio commented 1 year ago

Hi @w8r

That's perfect now with v0.5.0: https://unpkg.com/browse/leaflet-bookmarks@0.5.0/dist/ However, it seems v0.5.1 does not generated the built version correctly: https://unpkg.com/browse/leaflet-bookmarks@0.5.1/dist/

Thank you very much for your work @w8r !

w8r commented 1 year ago

@PedroVenancio what do you mean it's not generated correctly? The files are there and they are linked properly in the package.json. Did you encounter some problem with 0.5.1?

PedroVenancio commented 1 year ago

Hi @w8r

I was expecting to see Leaflet.Bookmarks.js and leaflet.bookmarks.css in v0.5.1

imagem

just like in v0.5.0

imagem

w8r commented 1 year ago

ah, I renamed the files, it's reflected in package.json

PedroVenancio commented 1 year ago

Oh great! Thanks @w8r !!