Direction.FormattedInstruction Property
Direction.FormattedInstruction Property
The text of the specified direction with HTML formatting. String.
Public Dim FormattedInstruction As String
Member of [Namespace].Direction
[C#]
public System.String FormattedInstruction
Member of [Namespace].Direction
Remarks
The following line is a FormattedInstruction property:
Turn RIGHT (East) onto W 6th Ave
The only way the FormattedInstruction property differs from the Instruction property is that it includes HTML formatting (bold tags) for emphasis.
Example
[Visual Basic]
'Calculate a route and create a table on
'a Web page using the formatted instruction
Dim latLongs(1) As LatLong
latLongs(0) = New LatLong()
latLongs(0).Latitude = 40
latLongs(0).Longitude = -120
latLongs(1) = New LatLong()
latLongs(1).Latitude = 41
latLongs(1).Longitude = -121
Dim myRoute As Route
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest)
Dim Table1 As New System.Web.UI.WebControls.Table()
Dim i As Integer
For i = 0 To myRoute.Itinerary.Segments(0).Directions.Length - 1
Dim r As New System.Web.UI.WebControls.TableRow()
Dim c As New System.Web.UI.WebControls.TableCell()
c.Text = myRoute.Itinerary.Segments(0).Directions(i).FormattedInstruction
r.Cells.Add(c)
Table1.Rows.Add(r)
Next i
[C#]
//Calculate a route and create a table on
//a Web page using the formatted instruction
LatLong[] latLongs = new LatLong[2];
latLongs[0] = new LatLong();
latLongs[0].Latitude = 40;
latLongs[0].Longitude = -120;
latLongs[1] = new LatLong();
latLongs[1].Latitude = 41;
latLongs[1].Longitude = -121;
Route myRoute;
myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest);
System.Web.UI.WebControls.Table Table1 = new System.Web.UI.WebControls.Table();
for(int i = 0; i < myRoute.Itinerary.Segments[0].Directions.Length ; i++)
{
System.Web.UI.WebControls.TableRow r = new System.Web.UI.WebControls.TableRow();
System.Web.UI.WebControls.TableCell c = new System.Web.UI.WebControls.TableCell();
c.Text = myRoute.Itinerary.Segments[0].Directions[i].FormattedInstruction;
r.Cells.Add(c);
Table1.Rows.Add(r);
}
See Also
Direction Class | Direction.Instruction Property