DirectionsConstructorOptions
Options that you may provide when creating a directions object.
Declaration
interface DirectionsConstructorOptionsOverview
Use DirectionsConstructorOptions to set options when creating a Directions object.
If you set language to a language ID, such as fr-CA or en-GB, MapKit JS returns step-by-step directions in the specified language, if available. If you don’t set language when initializing a Directions object, the directions default to the language ID you provide when initializing the map with init(options). If the map doesn’t have a specified language upon initialization, MapKit JS returns directions in the browser’s language setting.
Set the language option when creating a Directions object as in the code below:
const directions = new mapkit.Directions({
language: "en-GB"
});