Angular Map - routes
An array of routes shown on the map.
If provider is "osm", define providerConfig.calculateRoute to display routes.
color
Specifies the color of the line displaying the route.
This property supports the following colors:
- Hexadecimal colors
- RGB colors
- RGBA colors
- Predefined/cross-browser color names
- Predefined SVG colors
- Paint server address
locations[]
Contains an array of objects making up the route.
You can specify the locations value in one of the following formats.
- { lat: 40.749825, lng: -73.987963}
- "40.749825, -73.987963"
- [40.749825, -73.987963]
- "Brooklyn Bridge,New York,NY"
If provider is "osm" and you specify routes[].locations[] as address strings, implement providerConfig.calculateLocation to convert these addresses to coordinates. The Map does not display routes with unresolved locations.
mode
Specifies a transportation mode to be used in the displayed route.
You can choose between two predefined modes— 'driving' or 'walking'—regardless of the current provider. Additionally, provider-specific modes are available:
-
DRIVINGBICYCLINGTRANSITWALKING
-
bicyclebuscarmotorcyclepedestriantaxitruckvan
-
drivingtransittruckwalking
If the route does not render as expected, consider the following:
- Not every provider supports all possible route modes. Make sure that you specify a supported mode.
- Check that you specify a provider-specific spelling (compare Google's
BICYCLINGand Azure'sbicycle). - DevExtreme Map allows partial access to provider’s API. If you changed configuration, the provider may no longer support the route mode you specified.