Skip to content

Commit

Permalink
fix layers control factory and update build
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jul 26, 2012
1 parent 19ed185 commit 2df0a4c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions dist/leaflet-src.js
Expand Up @@ -2525,6 +2525,7 @@ L.ImageOverlay = L.Class.extend({
return this;
},

// TODO remove bringToFront/bringToBack duplication from TileLayer/Path
bringToFront: function () {
if (this._image) {
this._map._panes.overlayPane.appendChild(this._image);
Expand Down Expand Up @@ -6737,10 +6738,11 @@ L.Control.Layers = L.Control.extend({
}
});

L.control.layers = function (options) {
return new L.Control.Layers(options);
L.control.layers = function (baseLayers, overlays, options) {
return new L.Control.Layers(baseLayers, overlays, options);
};


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

Expand Down Expand Up @@ -7283,10 +7285,11 @@ L.Map.include({
options = this._locationOptions = L.Util.extend(this._defaultLocateOptions, options);

if (!navigator.geolocation) {
return this.fire('locationerror', {
this._handleGeolocationError({
code: 0,
message: "Geolocation not supported."
});
return this;
}

var onResponse = L.Util.bind(this._handleGeolocationResponse, this),
Expand All @@ -7309,7 +7312,7 @@ L.Map.include({

_handleGeolocationError: function (error) {
var c = error.code,
message =
message = error.message ||
(c === 1 ? "permission denied" :
(c === 2 ? "position unavailable" : "timeout"));

Expand Down
2 changes: 1 addition & 1 deletion dist/leaflet.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/control/Control.Layers.js
Expand Up @@ -173,6 +173,6 @@ L.Control.Layers = L.Control.extend({
}
});

L.control.layers = function (options) {
return new L.Control.Layers(options);
};
L.control.layers = function (baseLayers, overlays, options) {
return new L.Control.Layers(baseLayers, overlays, options);
};

0 comments on commit 2df0a4c

Please sign in to comment.