mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 09:16:39 +00:00
more complex route
This commit is contained in:
@@ -65,7 +65,7 @@ public class RouteService : IRouteService
|
||||
totalDistance += distanceFromPrevious.Value;
|
||||
}
|
||||
|
||||
var pointType = isStart ? "start" : (isEnd ? "end" : "waypoint");
|
||||
var pointType = isStart ? "start" : (isEnd ? "end" : "action");
|
||||
|
||||
allPoints.Add(new RoutePointDto
|
||||
{
|
||||
@@ -147,26 +147,8 @@ public class RouteService : IRouteService
|
||||
|
||||
if (request.RequestMaps)
|
||||
{
|
||||
_logger.LogInformation("Route {RouteId}: Requesting regions for all {Count} points",
|
||||
request.Id, allPoints.Count);
|
||||
|
||||
foreach (var point in allPoints)
|
||||
{
|
||||
var regionId = Guid.NewGuid();
|
||||
|
||||
await _regionService.RequestRegionAsync(
|
||||
regionId,
|
||||
point.Latitude,
|
||||
point.Longitude,
|
||||
request.RegionSizeMeters,
|
||||
request.ZoomLevel,
|
||||
stitchTiles: false);
|
||||
|
||||
await _routeRepository.LinkRouteToRegionAsync(request.Id, regionId);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Route {RouteId}: {Count} regions requested",
|
||||
request.Id, allPoints.Count);
|
||||
_logger.LogInformation("Route {RouteId}: Maps requested. Regions will be processed sequentially by background service.",
|
||||
request.Id);
|
||||
}
|
||||
|
||||
_logger.LogInformation("Route {RouteId} created successfully", request.Id);
|
||||
|
||||
Reference in New Issue
Block a user