Is it possible to add more preset stops then just the start and end points in the directions widget? I'd like to have preset directions for multiple points.
Solved! Go to Solution.
Robert,
In the Widget.js file make this change to the _onDirectionsActivate function:
_onDirectionsActivate: function () {
if (this.config.defaultLocations &&
this.config.defaultLocations.length && this.config.defaultLocations.length > 0 &&
false === this._isInitPresetStopsFlag) {
this._isInitPresetStopsFlag = true;
this._dijitDirections.addStops(this.config.defaultLocations);
this._dijitDirections.addStop();
this._dijitDirections.addStop();
this._dijitDirections.addStop();
this._dijitDirections.addStop();
}
},
Robert,
are you asking for the directions widget to open with more then the 2 default stops? If so how many?
Yes, I'd like 6 default stops to be preset.
Robert,
In the Widget.js file make this change to the _onDirectionsActivate function:
_onDirectionsActivate: function () {
if (this.config.defaultLocations &&
this.config.defaultLocations.length && this.config.defaultLocations.length > 0 &&
false === this._isInitPresetStopsFlag) {
this._isInitPresetStopsFlag = true;
this._dijitDirections.addStops(this.config.defaultLocations);
this._dijitDirections.addStop();
this._dijitDirections.addStop();
this._dijitDirections.addStop();
this._dijitDirections.addStop();
}
},
Thanks Robert! Your eSearch is the best btw.