diff --git a/leaflet.polylineoffset.js b/leaflet.polylineoffset.js index 855abad..b8bae65 100644 --- a/leaflet.polylineoffset.js +++ b/leaflet.polylineoffset.js @@ -102,9 +102,9 @@ var PolylineOffset = { return offsetSegments; }, - offsetPoints: function(pts, offset) { - var offsetSegments = this.offsetPointLine(pts, offset); - return this.joinLineSegments(offsetSegments, offset); + offsetPoints: function(pts, options) { + var offsetSegments = this.offsetPointLine(L.LineUtil.simplify(pts, options.smoothFactor), options.offset); + return this.joinLineSegments(offsetSegments, options.offset); }, /** @@ -199,7 +199,7 @@ L.Polyline.include({ // Offset management hack --- if (this.options.offset) { - ring = L.PolylineOffset.offsetPoints(ring, this.options.offset); + ring = L.PolylineOffset.offsetPoints(ring, this.options); } // Offset management hack END --- diff --git a/package.json b/package.json index f74e2bf..befd97d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "leaflet-polylineoffset", - "version": "1.1.1", + "name": "leaflet-polylineoffset-lc", + "version": "1.2.0", "description": "Apply a relative pixel offset to polylines without changing their coordinates.", "main": "leaflet.polylineoffset.js", "directories": { @@ -11,7 +11,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/bbecquet/Leaflet.PolylineOffset.git" + "url": "git+https://github.com/Latitude-Cartagene/Leaflet.PolylineOffset.git" }, "keywords": [ "map", @@ -24,7 +24,7 @@ "author": "Benjamin Becquet", "license": "MIT", "bugs": { - "url": "https://github.com/bbecquet/Leaflet.PolylineOffset/issues" + "url": "https://github.com/Latitude-Cartagene/Leaflet.PolylineOffset/issues" }, - "homepage": "https://github.com/bbecquet/Leaflet.PolylineOffset#readme" -} + "homepage": "https://github.com/Latitude-Cartagene/Leaflet.PolylineOffset#readme" +} \ No newline at end of file