update build with regression fixes

This commit is contained in:
Vladimir Agafonkin 2012-07-30 12:31:09 +03:00
parent b2adb29cf1
commit b1db46a307
4 changed files with 38 additions and 31 deletions

View File

@ -16,20 +16,12 @@
<div id="map"></div> <div id="map"></div>
<script> <script>
var map = L.map('map') var map = L.map('map');
.setView([51.505, -0.09], 13);
var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
maxZoom: 18,
key: 'BC9A493B41014CAABB98F0471D759707',
styleId: 997
}).addTo(map);
var marker = L.marker([51.5, -0.09]) var marker = L.marker([51.5, -0.09])
.bindPopup("<b>Hello world!</b><br />I am a popup.") .bindPopup("<b>Hello world!</b><br />I am a popup.")
.addTo(map) .addTo(map);
.openPopup(); //.openPopup();
var circle = L.circle([51.508, -0.11], 500, {color: '#f03', opacity: 0.7}) var circle = L.circle([51.508, -0.11], 500, {color: '#f03', opacity: 0.7})
.bindPopup("I am a circle.") .bindPopup("I am a circle.")
@ -41,6 +33,16 @@
[51.51, -0.047]]) [51.51, -0.047]])
.bindPopup("I am a polygon.") .bindPopup("I am a polygon.")
.addTo(map); .addTo(map);
map.setView([51.505, -0.09], 13);
var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
maxZoom: 18,
key: 'BC9A493B41014CAABB98F0471D759707',
styleId: 997
}).addTo(map);
</script> </script>
</body> </body>
</html> </html>

7
dist/leaflet-src.js vendored
View File

@ -3588,7 +3588,9 @@ L.Path = L.Class.extend({
this.projectLatlngs(); this.projectLatlngs();
this._updatePath(); this._updatePath();
if (this._container) {
this._map._pathRoot.appendChild(this._container); this._map._pathRoot.appendChild(this._container);
}
map.on({ map.on({
'viewreset': this.projectLatlngs, 'viewreset': this.projectLatlngs,
@ -4520,6 +4522,9 @@ L.Polyline = L.Path.extend({
_convertLatLngs: function (latlngs) { _convertLatLngs: function (latlngs) {
var i, len; var i, len;
for (i = 0, len = latlngs.length; i < len; i++) { for (i = 0, len = latlngs.length; i < len; i++) {
if (latlngs[i] instanceof Array && typeof latlngs[i][0] !== 'number') {
return;
}
latlngs[i] = L.latLng(latlngs[i]); latlngs[i] = L.latLng(latlngs[i]);
} }
return latlngs; return latlngs;
@ -4674,7 +4679,7 @@ L.Polygon = L.Polyline.extend({
L.Polyline.prototype.initialize.call(this, latlngs, options); L.Polyline.prototype.initialize.call(this, latlngs, options);
if (latlngs && (latlngs[0] instanceof Array) && (typeof latlngs[0][0] !== 'number')) { if (latlngs && (latlngs[0] instanceof Array) && (typeof latlngs[0][0] !== 'number')) {
this._latlngs = latlngs[0]; this._latlngs = this._convertLatLngs(latlngs[0]);
this._holes = latlngs.slice(1); this._holes = latlngs.slice(1);
} }
}, },

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long