Closed DenisCarriere closed 6 years ago
Pulled from sharedstreets-conflator, core methods such as geometry & others core methods should be included in the main sharedstreets-js library.
sharedstreets-conflator
geometry
sharedstreets-js
js example
const line = [[110, 45], [115, 50], [120, 55]]; const geom = sharedstreets.geometry(line); geom.id; // => "ce9c0ec1472c0a8bab3190ab075e9b21" geom.lonlats; // => [ 110, 45, 115, 50, 120, 55 ]
output
{ backReferenceId: "197cb60a06518f4d616fea25b5e81266", forwardReferenceId: "79aad7fa7e4fec23ff2c97d0b33086ce", fromIntersectionId: "71f34691f182a467137b3d37265cb3b6", id: "ce9c0ec1472c0a8bab3190ab075e9b21", lonlats: [ 110, 45, 115, 50, 120, 55 ], roadClass: "Other", toIntersectionId: "42286ee839cf23904b00acfc7d13a2e2", }
Add geometry method to core js library
Pulled from
sharedstreets-conflator
, core methods such asgeometry
& others core methods should be included in the mainsharedstreets-js
library.js example
output