We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b6c9ab commit f5bf324Copy full SHA for f5bf324
1 file changed
src/OutSystems/Maps/MapAPI/Directions.ts
@@ -53,7 +53,14 @@ namespace OutSystems.Maps.MapAPI.Directions {
53
export async function SetDirections(mapId: string, options: string): Promise<string> {
54
const map = MapManager.GetMapById(mapId, true);
55
const directionOptions = JSON.parse(options);
56
- return map.features.directions.setRoute(directionOptions).then((response) => JSON.stringify(response));
+ return map.features.directions
57
+ .setRoute(directionOptions)
58
+ .then((result) => {
59
+ return JSON.stringify(result);
60
+ })
61
+ .catch((error) => {
62
+ return JSON.stringify(error);
63
+ });
64
}
65
66
/**
0 commit comments