.NET Standard wrapper around the Here API
All users of HERE APIs must obtain authentication and authorization credentials and provide them as values for the parameters app_id and app_code. The credentials are assigned per application.
To obtain the credentials for an application, visit plans to register with HERE.
If you wish to explore the API, use the API Explorer.
Calculate a Route:
HereAPI.HereAPI.Register(appId, appCode, true);
CalculateRouteRequest request = new CalculateRouteRequest()
{
RoutingMode = new RequestRoutingMode(RoutingType.Fastest, TransportModeType.Car),
Waypoints = new WaypointParameter[]
{
new GeoWaypointParameter(0, new GeoCoordinate(38.711428, -9.240167)),
new GeoWaypointParameter(1, new GeoCoordinate(38.857363, -9.165800))
},
Departure = new DateTime(2018, 05, 15, 19, 00, 00),
RouteAttributes = new RouteAttributeType[] { RouteAttributeType.Shape, RouteAttributeType.Legs,
RouteAttributeType.Incidents, RouteAttributeType.Groups },
LegAttributes = new RouteLegAttributeType[] { RouteLegAttributeType.Links },
ManeuverAttributes = new ManeuverAttributeType[] { ManeuverAttributeType.Time, ManeuverAttributeType.TrafficTime,
ManeuverAttributeType.BaseTime, ManeuverAttributeType.Notes },
InstructionFormat = InstructionFormatType.Text
};
CalculateRouteResponse calculateRoute = request.Get();
Console.WriteLine(calculateRoute.Routes.First().Summary.Text);