for循环并没有给我的积分收集增加任何价值。
Esri.ArcGISRuntime.Geometry.PointCollection VMM40Points = new Esri.ArcGISRuntime.Geometry.PointCollection(Spatialreference);
for (int i = 1; i == xyz.Count/3; i += 3)
{
VMM40Points.Add(xyz[i - 1], xyz[i], xyz[i + 1]);
}
for循环的 "while "部分是不正确的:它运行的是 而 条件是真的,而不是 直到.
我不知道为什么你有 [i -1]
. 是否有特殊原因?如果没有,你把循环条件弄得比必要的复杂多了。
var VMM40Points = new Esri.ArcGISRuntime.Geometry.PointCollection(Spatialreference);
for (int i = 0; i < xyz.Count; i+=3)
{
VMM40Points.Add(xyz[i], xyz[i + 1], xyz[i + 2]);
}
将你的条件改为 i < xyz.Count/3
.