diff --git a/dist/leaflet.polylineDecorator.js b/dist/leaflet.polylineDecorator.js index e791107..4072141 100644 --- a/dist/leaflet.polylineDecorator.js +++ b/dist/leaflet.polylineDecorator.js @@ -217,6 +217,11 @@ function interpolateBetweenPoints(ptA, ptB, ratio) { })(); // enable rotationAngle and rotationOrigin support on L.Marker +/** +* Defines several classes of symbol factories, +* to be used with L.PolylineDecorator +*/ + L.Symbol = L.Symbol || {}; /** @@ -509,7 +514,7 @@ L.PolylineDecorator = L.FeatureGroup.extend({ var directionPoints = void 0, symbols = void 0; - var mapBounds = this._map.getBounds(); + var mapBounds = this._map.getBounds().pad(0.1); return this._paths.map(function (path, i) { directionPoints = _this4._getDirectionPoints(i, pattern) // filter out invisible points diff --git a/src/L.PolylineDecorator.js b/src/L.PolylineDecorator.js index 42ccbeb..5627ea0 100644 --- a/src/L.PolylineDecorator.js +++ b/src/L.PolylineDecorator.js @@ -178,7 +178,7 @@ L.PolylineDecorator = L.FeatureGroup.extend({ */ _getPatternLayers: function(pattern) { let directionPoints, symbols; - const mapBounds = this._map.getBounds(); + const mapBounds = this._map.getBounds().pad(0.1); return this._paths.map((path, i) => { directionPoints = this._getDirectionPoints(i, pattern) // filter out invisible points