Hi all,
I have points feature layer that represent road blocks. I would like to allow users to be using the direction widget to be rerouted. Is it possible?
Thanks,
Alex
Solved! Go to Solution.
Alex,
Sure, you would just have to add the features from your roadblock layer to the directions dijit using the esri private object called _barriersLayer
So it would look like:
var directions = new Directions({
map: map
},"dir");
directions.startup();
directions._barriersLayer = yourBarriersLayer;
Alex,
Sure, you would just have to add the features from your roadblock layer to the directions dijit using the esri private object called _barriersLayer
So it would look like:
var directions = new Directions({
map: map
},"dir");
directions.startup();
directions._barriersLayer = yourBarriersLayer;
Cool, can this barrier layer be point (road blocks layer) or does it have to be a line feature.
Alex,
That is for point layers there is a separate property for line and polygon barriers.