dynmeth / RaphaelLayer

Raphael overlay for Leaflet maps
MIT License
80 stars 25 forks source link

Compatibility with leaflet 1.X #23

Open erkinsergey opened 6 years ago

erkinsergey commented 6 years ago

The current version is not updated for a long time and is incompatible with current leaflet 1.x. When using this version of leaflet there are errors and warnings that do not allow working with the plugin. I was able to start it in the work as follows: in source file rlayer-src.js find the line

R.Layer = L.Class.extend({
    includes: L.Mixin.Events,

and replace it with

R.Layer = (L.version < "1.0" ? L.Class : L.Layer).extend({
    includes: (L.version < "1.0" ? L.Mixin.Events : []),

After that the plugin worked without problems.