Fixed non-removable attributions regression #488
This commit is contained in:
parent
538dfb4cff
commit
ba5b40cc19
@ -15,6 +15,10 @@ Leaflet Changelog
|
|||||||
|
|
||||||
* Fixed a bug where `TileLayer.WMS` wouldn't take `insertAtTheBottom` option into account (by [@bmcbride](https://github.com/bmcbride)). [#478](https://github.com/CloudMade/Leaflet/pull/478)
|
* Fixed a bug where `TileLayer.WMS` wouldn't take `insertAtTheBottom` option into account (by [@bmcbride](https://github.com/bmcbride)). [#478](https://github.com/CloudMade/Leaflet/pull/478)
|
||||||
|
|
||||||
|
## 0.3.2 RC
|
||||||
|
|
||||||
|
* Fixed a regression where removeLayer would not remove corresponding attribution. [#488](https://github.com/CloudMade/Leaflet/issues/488)
|
||||||
|
|
||||||
## 0.3.1 (14.02.2012)
|
## 0.3.1 (14.02.2012)
|
||||||
|
|
||||||
* Fixed a regression where default marker icons wouldn't work if Leaflet include url contained a query string.
|
* Fixed a regression where default marker icons wouldn't work if Leaflet include url contained a query string.
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
<link rel="stylesheet" href="../../dist/leaflet.css" />
|
||||||
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
|
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/screen.css" />
|
<link rel="stylesheet" href="../css/screen.css" />
|
||||||
|
|
||||||
<script src="../leaflet-include.js"></script>
|
<script src="../leaflet-include.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -15,23 +15,23 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function getCloudMadeUrl(styleId) {
|
function getCloudMadeUrl(styleId) {
|
||||||
return 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/' + styleId + '/256/{z}/{x}/{y}.png';
|
return 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/' + styleId + '/256/{z}/{x}/{y}.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
var cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
var cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
|
||||||
cloudmade = new L.TileLayer(getCloudMadeUrl(997), {attribution: cloudmadeAttribution}),
|
cloudmade = new L.TileLayer(getCloudMadeUrl(997), {attribution: cloudmadeAttribution}),
|
||||||
cloudmade2 = new L.TileLayer(getCloudMadeUrl(998), {attribution: cloudmadeAttribution});
|
cloudmade2 = new L.TileLayer(getCloudMadeUrl(998), {attribution: 'Hello world'});
|
||||||
|
|
||||||
var map = new L.Map('map').addLayer(cloudmade).setView(new L.LatLng(50.5, 30.51), 15);
|
var map = new L.Map('map').addLayer(cloudmade).setView(new L.LatLng(50.5, 30.51), 15);
|
||||||
|
|
||||||
var marker = new L.Marker(new L.LatLng(50.5, 30.505));
|
var marker = new L.Marker(new L.LatLng(50.5, 30.505));
|
||||||
map.addLayer(marker);
|
map.addLayer(marker);
|
||||||
|
|
||||||
var marker2 = new L.Marker(new L.LatLng(50.502, 30.515));
|
var marker2 = new L.Marker(new L.LatLng(50.502, 30.515));
|
||||||
map.addLayer(marker2);
|
map.addLayer(marker2);
|
||||||
|
|
||||||
var layersControl = new L.Control.Layers({
|
var layersControl = new L.Control.Layers({
|
||||||
'CloudMade Fresh': cloudmade,
|
'CloudMade Fresh': cloudmade,
|
||||||
'CloudMade Pale Dawn': cloudmade2
|
'CloudMade Pale Dawn': cloudmade2
|
||||||
@ -39,9 +39,9 @@
|
|||||||
'Some marker': marker,
|
'Some marker': marker,
|
||||||
'Another marker': marker2
|
'Another marker': marker2
|
||||||
});
|
});
|
||||||
|
|
||||||
map.addControl(layersControl);
|
map.addControl(layersControl);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
2
dist/leaflet-src.js
vendored
2
dist/leaflet-src.js
vendored
@ -4912,7 +4912,7 @@ L.Control.Attribution = L.Class.extend({
|
|||||||
var attribs = [];
|
var attribs = [];
|
||||||
|
|
||||||
for (var i in this._attributions) {
|
for (var i in this._attributions) {
|
||||||
if (this._attributions.hasOwnProperty(i)) {
|
if (this._attributions.hasOwnProperty(i) && this._attributions[i]) {
|
||||||
attribs.push(i);
|
attribs.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
@ -51,7 +51,7 @@ L.Control.Attribution = L.Class.extend({
|
|||||||
var attribs = [];
|
var attribs = [];
|
||||||
|
|
||||||
for (var i in this._attributions) {
|
for (var i in this._attributions) {
|
||||||
if (this._attributions.hasOwnProperty(i)) {
|
if (this._attributions.hasOwnProperty(i) && this._attributions[i]) {
|
||||||
attribs.push(i);
|
attribs.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user