Raruto / leaflet-rotate

Leaflet plugin that allows to add rotation functionality to map tiles
GNU General Public License v3.0
77 stars 21 forks source link

Compatibility with Leaflet 1.9.2 #15

Closed alessandro-dallatorre closed 1 year ago

alessandro-dallatorre commented 1 year ago

I know that it states compatible with Leaflet 1.7 However, I tested this plugin with Leaflet 1.9.2 and everything works except from popups that stay anchored to the old position without getting the rotation transformation applied. Could you please look into this?

Raruto commented 1 year ago

Hi @alessandro-dallatorre,

every file included in this library does nothing but slightly alter (overriding) the prototypes of some functions defined in the core, eg:

https://github.com/Raruto/leaflet-rotate/blob/6bfcccecf50143fd927e5f347a3f4d5a930c2f56/src/layer/Popup.js#L4-L6

in particular, only two functions are modified within that file:

https://github.com/Raruto/leaflet-rotate/blob/6bfcccecf50143fd927e5f347a3f4d5a930c2f56/src/layer/Popup.js#L1-L65

as i am not a core developer either, please try to check yourself too if anything has changed in the meantime inside that file:

At the moment, you may be waiting a very long time before I get in on it...

Thanks for any cooperation, Raruto

Raruto commented 1 year ago

@alessandro-dallatorre I did a quick test with version leaflet@v1.9.2 and it seems ok to me.

If not, please also provide a public example that reproduces the issue, otherwise I consider this issue resolved

Have a nice day, Raruto

alessandro-dallatorre commented 1 year ago

Yes, please wait and I'll post some code and screenshots.

Raruto commented 1 year ago

popups that stay anchored to the old position without getting the rotation transformation applied.

@alessandro-dallatorre it is not clear what exactly you are referring to, but this should be the default behavior (markers, popups and tooltips by default are not added to rotatePane, see also: Map Panes documentation and https://github.com/Raruto/leaflet-rotate/issues/2#issuecomment-889768730)

https://github.com/Raruto/leaflet-rotate/blob/2526fa91ef23c6d3c04c779feaddf0411ace69a8/src/map/Map.js#L230-L232

please wait and I'll post some code and screenshots.

It's been a while, if you think there is still a problem please open a new specific issue and provide more detailed information about it

I do my best to at least keep the plugin aligned with the main leaflet structure, but I don't have the resources to test or support only myself all the available features..