Select to view content in your preferred language

Routing - road blocks

1274
3
Jump to solution
03-09-2017 08:40 AM
by Anonymous User
Not applicable

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

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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;

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

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;
by Anonymous User
Not applicable

Cool, can this barrier layer be point (road blocks layer) or does it have to be a line feature.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

    That is for point layers there is a separate property for line and polygon barriers.