Skip to content

Commit

Permalink
Merge pull request #162 from dpix/master
Browse files Browse the repository at this point in the history
AMD support
  • Loading branch information
jieter committed Jun 10, 2015
2 parents 93d2378 + c3ab377 commit b5b035d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions leaflet-providers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
(function () {
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['leaflet'], factory);
} else {
// Assume leaflet is loaded into global object L already
factory(L);
}
}(this, function (L) {
'use strict';

L.TileLayer.Provider = L.TileLayer.extend({
Expand Down Expand Up @@ -619,4 +627,6 @@
L.tileLayer.provider = function (provider, options) {
return new L.TileLayer.Provider(provider, options);
};
}());

return L;
}));

0 comments on commit b5b035d

Please sign in to comment.