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
Point - add time/distance OR prohibit travel along the street or through the point
Line - prohibits travel through the line
Polygon - add time/distance OR prohibit travel along the street or through the polygon
My question is should be model these as 3 distinct classes with concrete methods like addTravelTime(2, 'Miles')?
L.esri.Routing.Barriers.Point
L.esri.Routing.Barriers.Polyline
L.esri.Routing.Barriers.Point
or should we only allow simple barrier (GeoJSON) that prohibit travel and call it a day?
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.
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')
?L.esri.Routing.Barriers.Point
L.esri.Routing.Barriers.Polyline
L.esri.Routing.Barriers.Point
or should we only allow simple barrier (GeoJSON) that prohibit travel and call it a day?