fix addLatLng not affecting bounds

This commit is contained in:
Vladimir Agafonkin 2013-12-16 18:43:22 -05:00
parent 2e9141fa98
commit f750b76e04

View File

@ -25,7 +25,9 @@ L.Polyline = L.Path.extend({
addLatLng: function (latlng) {
// TODO rings
this._latlngs.push(L.latLng(latlng));
latlng = L.latLng(latlng);
this._latlngs.push(latlng);
this._bounds.extend(latlng);
return this.redraw();
},