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

Property 'iconLayers' does not exist on type 'typeof control' #11

Open
enocholumide opened this issue Apr 1, 2017 · 1 comment
Open

Comments

@enocholumide
Copy link

Keep getting this error :(

Please help

image

@christianversloot
Copy link

christianversloot commented Apr 8, 2020

I know I'm late - but for future reference.

Create a file called typings.d.ts in your src folder. Then add this:

// Declare the leaflet module so we can modify it
declare module 'leaflet' {

  // We want to alter the control namespace
  namespace control {

    // Define minimal type information for the icon layers
    function iconLayers(v: any);

  }
}

And it should work!

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

2 participants