Esri / esri-leaflet-routing

Draft API for using Esri routing engine in Leaflet
0 stars 5 forks source link

How to model barriers? #12

Open patrickarlt opened 9 years ago

patrickarlt commented 9 years ago

In a closer reading of the routing API it looks like barriers can also have some attributes that control things like adding travel time/distance or prohibiting travel through a barrier altogether.

It looks like there are 3 kinds of barriers

My question is should be model these as 3 distinct classes with concrete methods like addTravelTime(2, 'Miles')?

or should we only allow simple barrier (GeoJSON) that prohibit travel and call it a day?

jgravois commented 9 years ago

using barriers to tack on a time/distance penalty is much less common than complete prohibition so i think implementing simple barriers in the intial release would be entirely sufficient.