@furkot/directions 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,11 @@
1
- const pathType = require('../model').pathType;
1
+ const { pathType } = require('../model');
2
+ const { default: simplifyPolyline } = require('vis-why');
2
3
  const util = require('./util');
3
4
 
4
5
  module.exports = init;
5
6
 
6
- function init(options) {
7
- options = options || {};
8
-
9
- const algorithm = options.algorithm || require('vis-why');
7
+ function init(options = {}) {
8
+ const algorithm = options.algorithm || simplifyPolyline;
10
9
  const endPoints = options.endPoints || 25; // how many points keep at ends
11
10
  const maxPoints = options.pathPoints || 100; // maximum number of points kept per path
12
11
  const ed = maxPoints / endPoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@furkot/directions",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Directions service for Furkot",
5
5
  "author": {
6
6
  "name": "Damian Krzeminski",