fixed sample and now working because of shapetogeotifftask fix

This commit is contained in:
Mark van der Wal 2020-04-01 16:29:44 +02:00
parent bfbf6ef4bf
commit 7559b1ef78

View File

@ -157,10 +157,12 @@ namespace FarmmapsApiSamples
} }
var geotiffItems = await 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!? // 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) if (nitrogenItem == null)
{ {
_logger.LogError("Could not find the nitrogen geotiff child item under cropfield"); _logger.LogError("Could not find the nitrogen geotiff child item under cropfield");