【发布时间】:2021-12-05 08:02:41
【问题描述】:
我正在使用 ArcGIS API for JavaScript。我想知道在我使用 ArcGiS API 中的 Sketch 工具绘制之后,我可以使用什么功能来获取每个顶点的坐标?
更新
我尝试使用 webmercator 方法,但它一直出现这个错误给我 "webMercatorUtils.webMercatorToGeographic 不是函数"
这是我为解析它而编写的代码。
sketch.on("create", (e: __esri.SketchCreateEvent) => {
if (e.state === "complete") {
// this.rings = e.graphic.geometry.toJSON().rings.webMercatorUtils.webMercatorToGeographic();
this.rings = webMercatorUtils.webMercatorToGeographic(e.graphic.geometry);
}
});
错误
【问题讨论】:
标签: gis arcgis arcgis-js-api