small fix
This commit is contained in:
parent
5066969e98
commit
f972699fe9
@ -3,6 +3,6 @@ namespace FarmmapsHaulmkilling.Models
|
||||
public class InputParameter
|
||||
{
|
||||
public string ItemCode { get; set; }
|
||||
public string ItemLayer { get; set; }
|
||||
public string LayerName { get; set; }
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ using FarmmapsApi.Services;
|
||||
using FarmmapsHaulmkilling.Models;
|
||||
using FarmmapsZonering.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using static FarmmapsApi.Extensions;
|
||||
using static FarmmapsApiSamples.Constants;
|
||||
|
||||
@ -27,6 +28,11 @@ namespace FarmmapsZonering.Services
|
||||
public async Task<Item> CreateApplicationMapAsync(Item cropfieldItem, string formula, Output output, params InputParameter[] inputItemCodes)
|
||||
{
|
||||
var zoneringTaskRequest = new TaskRequest() {TaskType = VRAZONERING_TASK};
|
||||
zoneringTaskRequest.attributes["formula"] = formula;
|
||||
zoneringTaskRequest.attributes["inputCode"] = cropfieldItem.Code;
|
||||
zoneringTaskRequest.attributes["output"] = JsonConvert.SerializeObject(output);
|
||||
zoneringTaskRequest.attributes["inputs"] = JsonConvert.SerializeObject(inputItemCodes);
|
||||
|
||||
var taskCode = await _farmmapsApiService.QueueTaskAsync(cropfieldItem.Code, zoneringTaskRequest);
|
||||
|
||||
await PollTask(TimeSpan.FromSeconds(5), async (tokenSource) =>
|
||||
|
@ -92,7 +92,7 @@ namespace FarmmapsZonering
|
||||
}, new InputParameter()
|
||||
{
|
||||
ItemCode = geotiffItem.Code,
|
||||
ItemLayer = geotiffItem.Data["layers"][0]["name"].ToString()
|
||||
LayerName = geotiffItem.Data["layers"][0]["name"].ToString()
|
||||
});
|
||||
|
||||
_logger.LogInformation("Downloading output");
|
||||
|
Loading…
Reference in New Issue
Block a user