leaflet-rails 0.4.0.alpha4 → 0.4.0.alpha5
Sign up to get free protection for your applications and to get access to all the features.
Binary file
|
@@ -1100,7 +1100,8 @@ L.Map = L.Class.extend({
|
|
1100
1100
|
// TODO looks ugly, refactor!!!
|
1101
1101
|
if (this.options.zoomAnimation && L.TileLayer && (layer instanceof L.TileLayer)) {
|
1102
1102
|
this._tileLayersNum++;
|
1103
|
-
|
1103
|
+
this._tileLayersToLoad++;
|
1104
|
+
layer.on('load', this._onTileLayerLoad, this);
|
1104
1105
|
}
|
1105
1106
|
|
1106
1107
|
var onMapLoad = function () {
|
@@ -1129,7 +1130,8 @@ L.Map = L.Class.extend({
|
|
1129
1130
|
// TODO looks ugly, refactor
|
1130
1131
|
if (this.options.zoomAnimation && L.TileLayer && (layer instanceof L.TileLayer)) {
|
1131
1132
|
this._tileLayersNum--;
|
1132
|
-
|
1133
|
+
this._tileLayersToLoad--;
|
1134
|
+
layer.off('load', this._onTileLayerLoad, this);
|
1133
1135
|
}
|
1134
1136
|
|
1135
1137
|
return this.fire('layerremove', {layer: layer});
|
@@ -1974,6 +1976,13 @@ L.TileLayer = L.Class.extend({
|
|
1974
1976
|
tile.src = this.getTileUrl(tilePoint, zoom);
|
1975
1977
|
},
|
1976
1978
|
|
1979
|
+
_tileLoaded: function () {
|
1980
|
+
this._tilesToLoad--;
|
1981
|
+
if (!this._tilesToLoad) {
|
1982
|
+
this.fire('load');
|
1983
|
+
}
|
1984
|
+
},
|
1985
|
+
|
1977
1986
|
_tileOnLoad: function (e) {
|
1978
1987
|
var layer = this._layer;
|
1979
1988
|
|
@@ -1984,10 +1993,7 @@ L.TileLayer = L.Class.extend({
|
|
1984
1993
|
url: this.src
|
1985
1994
|
});
|
1986
1995
|
|
1987
|
-
|
1988
|
-
if (!layer._tilesToLoad) {
|
1989
|
-
layer.fire('load');
|
1990
|
-
}
|
1996
|
+
layer._tileLoaded();
|
1991
1997
|
},
|
1992
1998
|
|
1993
1999
|
_tileOnError: function (e) {
|
@@ -2002,7 +2008,9 @@ L.TileLayer = L.Class.extend({
|
|
2002
2008
|
if (newUrl) {
|
2003
2009
|
this.src = newUrl;
|
2004
2010
|
}
|
2005
|
-
|
2011
|
+
|
2012
|
+
layer._tileLoaded();
|
2013
|
+
}
|
2006
2014
|
});
|
2007
2015
|
|
2008
2016
|
|
@@ -3658,7 +3666,6 @@ L.LineUtil = {
|
|
3658
3666
|
};
|
3659
3667
|
|
3660
3668
|
|
3661
|
-
|
3662
3669
|
L.Polyline = L.Path.extend({
|
3663
3670
|
initialize: function (latlngs, options) {
|
3664
3671
|
L.Path.prototype.initialize.call(this, options);
|
@@ -3756,7 +3763,7 @@ L.Polyline = L.Path.extend({
|
|
3756
3763
|
},
|
3757
3764
|
|
3758
3765
|
onRemove: function (map) {
|
3759
|
-
if (this.editing.enabled()) {
|
3766
|
+
if (this.editing && this.editing.enabled()) {
|
3760
3767
|
this.editing.removeHooks();
|
3761
3768
|
}
|
3762
3769
|
|
@@ -5883,8 +5890,8 @@ L.Control.Layers = L.Control.extend({
|
|
5883
5890
|
input.name = 'leaflet-base-layers';
|
5884
5891
|
}
|
5885
5892
|
input.type = obj.overlay ? 'checkbox' : 'radio';
|
5886
|
-
input.checked = this._map.hasLayer(obj.layer);
|
5887
5893
|
input.layerId = L.Util.stamp(obj.layer);
|
5894
|
+
input.defaultChecked = this._map.hasLayer(obj.layer);
|
5888
5895
|
|
5889
5896
|
L.DomEvent.addListener(input, 'click', this._onInputClick, this);
|
5890
5897
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leaflet-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.alpha5
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This gem provides the leaflet.js map display library for your Rails 3
|
15
15
|
application.
|
@@ -28,6 +28,7 @@ files:
|
|
28
28
|
- lib/leaflet-rails.rb
|
29
29
|
- lib/leaflet-rails/version.rb
|
30
30
|
- vendor/assets/images/layers.png
|
31
|
+
- vendor/assets/images/marker-icon.png
|
31
32
|
- vendor/assets/images/marker-shadow.png
|
32
33
|
- vendor/assets/images/popup-close.png
|
33
34
|
- vendor/assets/images/zoom-in.png
|
@@ -55,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
56
|
version: 1.3.1
|
56
57
|
requirements: []
|
57
58
|
rubyforge_project: leaflet-rails
|
58
|
-
rubygems_version: 1.8.
|
59
|
+
rubygems_version: 1.8.24
|
59
60
|
signing_key:
|
60
61
|
specification_version: 3
|
61
62
|
summary: Use leaflet.js with Rails 3.
|