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 |
|---|---|---|
| 8.19.1 | 147 | 4/28/2026 |
| 8.19.0 | 125 | 4/28/2026 |
| 8.18.0 | 146 | 4/10/2026 |
| 8.16.0 | 217 | 3/20/2026 |
| 8.15.0 | 199 | 3/11/2026 |
| 8.14.1 | 110 | 3/4/2026 |
| 8.14.0 | 207 | 2/25/2026 |
| 8.13.0 | 146 | 2/20/2026 |
| 8.12.0 | 143 | 2/16/2026 |
| 8.11.0 | 167 | 2/5/2026 |
| 8.10.0 | 127 | 2/2/2026 |
| 8.9.0 | 210 | 1/22/2026 |
| 8.8.1 | 127 | 1/21/2026 |
| 8.8.0 | 155 | 1/21/2026 |
| 8.7.0 | 125 | 1/20/2026 |
| 8.6.0 | 158 | 1/20/2026 |
| 8.5.0 | 131 | 1/19/2026 |
| 8.4.0 | 274 | 12/25/2025 |
| 1.0.0.3 | 1,043 | 12/15/2019 |
Changed the type of the AddressNote property 'CustomTypes'
from 'CustomNoteType[]' to 'AddressCustomNote[]'