Select to view content in your preferred language

Directions Breaking Changes

669
0
05-31-2023 06:04 AM
Noah-Sager
Esri Regular Contributor
2 0 669

At version 4.24, the old workflow of creating a Directions widget without a RouteLayer was deprecated, and will be a breaking change at version 4.27, due to arrive in June 2023.

https://developers.arcgis.com/javascript/latest/4.24/#routing

See the Directions widget sample for how it looks to create a Directions widget with a RouteLayer.

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-directions

Directions widget code snippet with RouteLayer:

Screen Shot 2023-05-31 at 8.00.33 AM.png

 

Also at version 4.24, we deprecated several properties on the Directions widget and DirectionsViewModel. We typically remove deprecated things after 3 or more releases. At version 4.27, we are removing the following deprecated properties.

This is a breaking change. The replacement to use is listed alongside the deprecated property.

Version DeprecatedPropertyReplacementVersion Removed
4.24Directions.routeServiceUrl

RouteLayer.url

via

Directions.layer

4.27
4.24Directions.routeSymbol

RouteSymbols.directionLines

via

Directions.layer

4.27
4.24Directions.stopSymbols

RouteStopSymbols

via

Directions.layer

4.27
4.24DirectionsViewModel.highlightSegment

DirectionsViewModel.highlight

4.27
4.24DirectionsViewModel.routeServiceUrl

RouteLayer.url

via

DirectionsViewModel.layer

4.27
4.24DirectionsViewModel.routeSymbol

RouteSymbols.directionLines

via

DirectionsViewModel.layer

4.27
4.24DirectionsViewModel.stops

RouteLayer.stops

via

DirectionsViewModel.layer

4.27
4.24DirectionsViewModel.stopSymbols

RouteStopSymbols

via

DirectionsViewModel.layer

4.27 
Contributors
About the Author
Noah Sager is a Senior Product Engineer on the ArcGIS Maps SDK for JavaScript team at Esri. He specializes in labeling, routing, printing, and maybe more. Prior to joining Esri, he mapped utility lines around Appalachia, investigated public restroom access in Chicago, and studied foraging behavior in squirrels in Canada.