Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with leaflet 1.1 #33

Open
kofronpi opened this issue Jul 11, 2017 · 5 comments
Open

Bug with leaflet 1.1 #33

kofronpi opened this issue Jul 11, 2017 · 5 comments

Comments

@kofronpi
Copy link

How to reproduce

What behaviour I'm expecting and which behaviour I'm seeing

This extended ControlLayer worked well with Leaflet 1.0.3.

It still works, but triggers an error in the web console:

leaflet-src.self-2632dc6….js?body=1:5110 Uncaught TypeError: Cannot read property 'length' of undefined
    at NewClass._checkDisabledLayers (leaflet-src.self-2632dc6….js?body=1:5110)
    at NewClass.expand (leaflet-src.self-2632dc6….js?body=1:4870)
    at NewClass._expandIfNotCollapsed (leaflet-src.self-2632dc6….js?body=1:5121)
    at NewClass.addTo (leaflet-src.self-2632dc6….js?body=1:4821)
    at NewClass.addControl (leaflet-src.self-2632dc6….js?body=1:4676)
     [...]

Minimal example reproducing the issue

Full example without overlays: (it's the same error with or without overlays)
https://playground-leaflet.rhcloud.com/heki/edit

@thomas-gt
Copy link

+1

1 similar comment
@edmargomes
Copy link
Contributor

+1

@gilbertoss
Copy link

+1

@beve
Copy link
Contributor

beve commented May 6, 2019

Hi,
Late answer but if it can help i found a workaround:

In styledLayerControl.js rename _initLayout: function() to _initCustomLayout: function() line 148.

Now line 43 in function onAdd() , add a call to this._initCustomLayout(); after the this._initLayout() and before this._update();

@veragreen119
Copy link

This error came back with [email protected] :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants