The AreasAndLengths method is not executed with the result of simplify method while working with GeometryService Class.
上次发布: May 7, 2019ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000117806
已提交
October 30, 2018
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
4.9
操作系统
Windows OS
操作系统版本
10.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
Use the following function:
geometryService.simplify([polygon]).then(function(simplifiedGeometries){
var areasAndLengthParams = new AreasAndLengthsParameters({
areaUnit: "square-kilometers",
lengthUnit: "kilometers",
polygons: simplifiedGeometries //notice no array here since simplifiedGeometries is already an array
});
geometryService.areasAndLengths(areasAndLengthParams).then(function(results){
console.log("area: ", results.areas[0]);
console.log("length: ", results.lengths[0]);
});
});