Route4MeSDKLibrary 1.0.0.3
See the version list below for details.
dotnet add package Route4MeSDKLibrary --version 1.0.0.3
NuGet\Install-Package Route4MeSDKLibrary -Version 1.0.0.3
<PackageReference Include="Route4MeSDKLibrary" Version="1.0.0.3" />
<PackageVersion Include="Route4MeSDKLibrary" Version="1.0.0.3" />
<PackageReference Include="Route4MeSDKLibrary" />
paket add Route4MeSDKLibrary --version 1.0.0.3
#r "nuget: Route4MeSDKLibrary, 1.0.0.3"
#:package Route4MeSDKLibrary@1.0.0.3
#addin nuget:?package=Route4MeSDKLibrary&version=1.0.0.3
#tool nuget:?package=Route4MeSDKLibrary&version=1.0.0.3
Usage Example of the Route4Me C# SDK (.net core)
This simple console c# (.net core) project demonstrates the process of creating a new route with 10 destinations.
The project is done in the Visual Studio 2019.
Project Implementation Steps
Create console c# (.net core) project;
Search NuGet for the library Route4MeSDKLibrary and install it in the project;
Add to the project the file RunExamples.cs with the content:
using System;
using System.Collections.Generic;
using System.Text;
using Route4MeSDK;
using Route4MeSDK.DataTypes;
using Route4MeSDK.QueryTypes;
namespace TestRoute4MeSharpSDKCore
{
public class RunExamples
{
public string c_ApiKey { get; set; }
/// <summary>
/// The example demonstrates the process of creating a new route with 10 destinations.
/// </summary>
public void SingleDriverRoute10Stops()
{
Console.WriteLine("SingleDriverRoute10Stops");
// Create the manager with the api key
Route4MeManager route4Me = new Route4MeManager(c_ApiKey);
// Prepare the addresses
Address[] addresses = new Address[]
{
#region Addresses
new Address() { AddressString = "151 Arbor Way Milledgeville GA 31061",
//indicate that this is a departure stop
//single depot routes can only have one departure depot
IsDepot = true,
//required coordinates for every departure and stop on the route
Latitude = 33.132675170898,
Longitude = -83.244743347168,
//the expected time on site, in seconds. this value is incorporated into the optimization engine
//it also adjusts the estimated and dynamic eta's for a route
Time = 0,
//input as many custom fields as needed, custom data is passed through to mobile devices and to the manifest
CustomFields = new Dictionary<string, string>() {{"color", "red"}, {"size", "huge"}}
},
new Address() { AddressString = "230 Arbor Way Milledgeville GA 31061",
Latitude = 33.129695892334,
Longitude = -83.24577331543,
Time = 0 },
new Address() { AddressString = "148 Bass Rd NE Milledgeville GA 31061",
Latitude = 33.143497,
Longitude = -83.224487,
Time = 0 },
new Address() { AddressString = "117 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.141784667969,
Longitude = -83.237518310547,
Time = 0 },
new Address() { AddressString = "119 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.141086578369,
Longitude = -83.238258361816,
Time = 0 },
new Address() { AddressString = "131 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.142036437988,
Longitude = -83.238845825195,
Time = 0 },
new Address() { AddressString = "138 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.14307,
Longitude = -83.239334,
Time = 0 },
new Address() { AddressString = "139 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.142734527588,
Longitude = -83.237442016602,
Time = 0 },
new Address() { AddressString = "145 Bill Johnson Rd NE Milledgeville GA 31061",
Latitude = 33.143871307373,
Longitude = -83.237342834473,
Time = 0 },
new Address() { AddressString = "221 Blake Cir Milledgeville GA 31061",
Latitude = 33.081462860107,
Longitude = -83.208511352539,
Time = 0 }
#endregion
};
// Set parameters
RouteParameters parameters = new RouteParameters();
parameters.AlgorithmType = AlgorithmType.TSP;
parameters.RouteName = "Single Driver Route 10 Stops";
parameters.RouteDate = R4MeUtils.ConvertToUnixTimestamp(DateTime.UtcNow.Date.AddDays(1));
parameters.RouteTime = 60 * 60 * 7;
parameters.Optimize = Optimize.Distance.Description();
parameters.DistanceUnit = DistanceUnit.MI.Description();
parameters.DeviceType = DeviceType.Web.Description();
OptimizationParameters optimizationParameters = new OptimizationParameters()
{
Addresses = addresses,
Parameters = parameters
};
// Run the query
DataObject dataObject = route4Me.RunOptimization(optimizationParameters, out string errorString);
// Check the result
if (dataObject == null)
{
Console.WriteLine("SingleDriverRoute10Stops failed: " + errorString);
}
else
{
Console.WriteLine(dataObject.OptimizationProblemId);
}
}
}
}
- Write in the Program.cs the code:
using System;
namespace TestRoute4MeSharpSDKCore
{
class Program
{
/// <summary>
/// Make sure to replace the 11111111111111111111111111111111 (32 characters) demo API key with your API key.
/// With the demo API key, the Route4Me system provides only limited functionality.
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
RunExamples runExamples = new RunExamples();
runExamples.c_ApiKey = "11111111111111111111111111111111";
runExamples.SingleDriverRoute10Stops();
Console.ReadKey();
}
}
}
- Run the project. You can expect to get a generated route with the optimized sequence of the destinations.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.2 is compatible. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.2
- fastJSON (>= 2.2.4)
- Microsoft.AspNetCore.Http.Connections.Client (>= 1.1.0)
- Microsoft.EntityFrameworkCore (>= 2.2.6)
- Microsoft.EntityFrameworkCore.SqlServer (>= 2.2.6)
- Newtonsoft.Json (>= 12.0.2)
- System.Configuration.ConfigurationManager (>= 4.5.0)
- System.Net.Http.WinHttpHandler (>= 4.5.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Route4MeSDKLibrary:
| Package | Downloads |
|---|---|
|
Route4MeDbLibrary
The library enables to create/use different engine databases for consuming Route4Me system. Supported database engines: - MsSql (SqlExpress, LocalDb) - MySql - PostgrSql - SQLite The library is done in the c# (.net core) envirnoment and it's platform-independent. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.13.1 | 0 | 11/14/2025 |
| 7.13.0 | 219 | 11/4/2025 |
| 7.12.1 | 620 | 8/7/2024 |
| 7.12.0 | 193 | 8/7/2024 |
| 7.11.2 | 212 | 7/21/2024 |
| 7.11.1 | 182 | 7/18/2024 |
| 7.11.0 | 488 | 1/31/2024 |
| 7.10.0 | 214 | 1/29/2024 |
| 7.9.0 | 234 | 1/16/2024 |
| 7.8.4 | 316 | 1/4/2024 |
| 7.8.3 | 286 | 12/22/2023 |
| 7.8.2 | 238 | 12/21/2023 |
| 7.8.1 | 266 | 12/18/2023 |
| 7.8.0 | 265 | 12/15/2023 |
| 7.7.5 | 280 | 11/21/2023 |
| 7.7.4 | 176 | 11/17/2023 |
| 7.7.3 | 726 | 9/7/2023 |
| 7.7.2 | 325 | 9/6/2023 |
| 7.7.1 | 454 | 7/14/2023 |
| 7.7.0 | 350 | 7/4/2023 |
| 7.6.0 | 472 | 5/23/2023 |
| 7.5.3 | 392 | 5/5/2023 |
| 7.5.2 | 364 | 4/20/2023 |
| 7.5.1 | 318 | 4/19/2023 |
| 7.5.0 | 335 | 4/14/2023 |
| 7.4.2 | 345 | 4/6/2023 |
| 7.4.1 | 379 | 3/9/2023 |
| 7.4.0 | 405 | 3/6/2023 |
| 7.3.0 | 408 | 2/23/2023 |
| 7.2.3 | 415 | 2/8/2023 |
| 7.2.2 | 470 | 1/13/2023 |
| 7.2.1 | 606 | 1/11/2023 |
| 7.2.0 | 462 | 1/11/2023 |
| 7.1.0 | 544 | 1/11/2023 |
| 7.0.0 | 625 | 10/6/2022 |
| 6.0.0 | 617 | 9/2/2022 |
| 5.1.1 | 617 | 8/29/2022 |
| 5.1.0 | 758 | 8/26/2022 |
| 5.0.0 | 606 | 8/23/2022 |
| 4.1.0 | 641 | 7/29/2022 |
| 4.0.0 | 635 | 7/15/2022 |
| 3.3.0 | 662 | 6/30/2022 |
| 3.2.0 | 628 | 5/11/2022 |
| 3.1.0 | 629 | 3/2/2022 |
| 3.0.1 | 639 | 2/23/2022 |
| 3.0.0 | 622 | 2/9/2022 |
| 2.0.0 | 732 | 12/16/2021 |
| 1.1.3 | 489 | 12/14/2021 |
| 1.1.2 | 593 | 11/19/2021 |
| 1.1.1.1 | 1,328 | 11/10/2021 |
| 1.1.1 | 544 | 11/10/2021 |
| 1.0.1.9 | 553 | 9/7/2021 |
| 1.0.1.8 | 468 | 9/1/2021 |
| 1.0.1.7 | 491 | 8/18/2021 |
| 1.0.1.6 | 514 | 8/11/2021 |
| 1.0.1.3 | 529 | 3/29/2021 |
| 1.0.1.1 | 723 | 1/23/2021 |
| 1.0.0.5 | 730 | 5/14/2020 |
| 1.0.0.4 | 827 | 4/2/2020 |
| 1.0.0.3 | 984 | 12/15/2019 |
| 1.0.0.2 | 845 | 12/13/2019 |
| 1.0.0.1 | 1,140 | 11/29/2019 |
| 1.0.0 | 685 | 11/28/2019 |
Changed the type of the AddressNote property 'CustomTypes'
from 'CustomNoteType[]' to 'AddressCustomNote[]'