@mapquest/directions
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -85,3 +85,4 @@ 'use strict'; | ||
var trafficSegments = [], legSegments = [], maneuvers = []; | ||
let trafficSegments = [], legSegments = []; | ||
let maneuvers = route.legs.reduce((sum, leg) => sum.concat(leg.maneuvers), []); | ||
@@ -115,6 +116,6 @@ routeFeatures.forEach(routeLineString => { | ||
routeLineString.properties.maneuverIndexes.forEach( (index, idx) => { | ||
maneuvers = zip(maneuvers, routeLineString.properties.maneuverIndexes).map(([maneuver,index]) => { | ||
let pt = routeLineString.geometry.coordinates[index]; | ||
maneuvers.push(Point(pt, {id: routeLineString.properties.id, maneuverIndex: idx, component:'maneuver'})) | ||
}) | ||
return Point(pt, Object.assign({id: routeLineString.properties.id, maneuverIndex: maneuver.index, component:'maneuver'}, maneuver)); | ||
}); | ||
}); | ||
@@ -121,0 +122,0 @@ |
{ | ||
"name": "@mapquest/directions", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "JS interface to MapQuest Directions API. Returns GeoJSON with traffic segments.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
40244
465
0