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

create L.WMS even in AMD? #37

Open
sheppard opened this issue Aug 25, 2016 · 0 comments
Open

create L.WMS even in AMD? #37

sheppard opened this issue Aug 25, 2016 · 0 comments

Comments

@sheppard
Copy link
Member

sheppard commented Aug 25, 2016

Currently L.WMS is only assigned when using Leaflet as a global, so you can't do this:

define(['leaflet', 'leaflet.wms'], function(L) {
    var source = L.WMS.source(...);
});

Instead you have to do this:

define(['leaflet', 'leaflet.wms'], function(L, wms) {
    var source = wms.source(...);
});

It might be less confusing (and more consistent with other plugins) to support both options when running in AMD.

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

No branches or pull requests

1 participant