From 7559b1ef789376de38690d305de27744eb55e8d1 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Wed, 1 Apr 2020 16:29:44 +0200 Subject: [PATCH] fixed sample and now working because of shapetogeotifftask fix --- FarmmapsApiSamples/NitrogenService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FarmmapsApiSamples/NitrogenService.cs b/FarmmapsApiSamples/NitrogenService.cs index 5157546..d7fe893 100644 --- a/FarmmapsApiSamples/NitrogenService.cs +++ b/FarmmapsApiSamples/NitrogenService.cs @@ -157,10 +157,12 @@ namespace FarmmapsApiSamples } var geotiffItems = await - _farmmapsApiService.GetItemChildrenAsync(cropfieldItem.Code, GEOTIFF_ITEMTYPE); + _farmmapsApiService.GetItemChildrenAsync(cropfieldItem.Code, GEOTIFF_PROCESSED_ITEMTYPE); + + // maybe poll here to, to wait for geotiff task process to be finished? // how to uniquely know which item is really created!? - var nitrogenItem = geotiffItems.SingleOrDefault(i => i.Name.Contains("nitrogen")); + var nitrogenItem = geotiffItems.SingleOrDefault(i => i.Name.Contains("nitrogen") && i.Updated >= itemTask.Finished); if (nitrogenItem == null) { _logger.LogError("Could not find the nitrogen geotiff child item under cropfield");