When click on grid item, I pass lat and long for source and destination and route display on the map.
But everytime I see latitude and longitude on [A] and [B] route point instead of address.
So how to display address on [A] and [B] point instead of lat, long ?
Following is my code.
Microsoft.Maps.loadModule('Microsoft.Maps.Directions', () => {
that.directionsManager = new Microsoft.Maps.Directions.DirectionsManager(that.map);
that.directionsManager.clearAll();
// Set Route Mode to driving
that.directionsManager.setRequestOptions({
routeMode: Microsoft.Maps.Directions.RouteMode.driving
});
that.directionsManager.setRenderOptions({
drivingPolylineOptions: {
strokeThickness: 3
}
});
const waypoint1 = new Microsoft.Maps.Directions.Waypoint({
location: new Microsoft.Maps.Location(that.truckData.currentLat, that.truckData.currentLong)
});
const waypoint2 = new Microsoft.Maps.Directions.Waypoint({
location: new Microsoft.Maps.Location(that.truckData.workLat, that.truckData.workLong)
});
that.directionsManager.addWaypoint(waypoint1);
that.directionsManager.addWaypoint(waypoint2);
that.directionsManager.calculateDirections();