mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
update build
This commit is contained in:
13
dist/leaflet-src.js
vendored
13
dist/leaflet-src.js
vendored
@ -4335,6 +4335,8 @@ L.Polyline = L.Path.extend({
|
||||
},
|
||||
|
||||
_updatePath: function () {
|
||||
if (!this._map) { return; }
|
||||
|
||||
this._clipPoints();
|
||||
this._simplifyPoints();
|
||||
|
||||
@ -6300,16 +6302,15 @@ L.Control.Scale = L.Control.extend({
|
||||
_update: function () {
|
||||
var bounds = this._map.getBounds(),
|
||||
centerLat = bounds.getCenter().lat,
|
||||
|
||||
left = new L.LatLng(centerLat, bounds.getSouthWest().lng),
|
||||
right = new L.LatLng(centerLat, bounds.getNorthEast().lng),
|
||||
halfWorldMeters = new L.LatLng(centerLat, 0).distanceTo(new L.LatLng(centerLat, 180)),
|
||||
dist = halfWorldMeters * (bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 180,
|
||||
|
||||
size = this._map.getSize(),
|
||||
options = this.options,
|
||||
maxMeters = 0;
|
||||
maxMeters = 0;
|
||||
|
||||
if (size.x > 0) {
|
||||
maxMeters = left.distanceTo(right) * (options.maxWidth / size.x);
|
||||
maxMeters = dist * (options.maxWidth / size.x);
|
||||
}
|
||||
|
||||
if (options.metric && maxMeters) {
|
||||
@ -6356,7 +6357,7 @@ L.Control.Scale = L.Control.extend({
|
||||
var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),
|
||||
d = num / pow10;
|
||||
|
||||
d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 2 ? 2 : 1;
|
||||
d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;
|
||||
|
||||
return pow10 * d;
|
||||
}
|
||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user