ArcGIS for JS 获取两点之间的距离

1  distance: function (p1, p2) {
2             var result = Math.sqrt(Math.pow(Math.abs(p1.x - p2.x), 2) + Math.pow(Math.abs(p1.y - p2.y), 2));
3             return result;
4         }

 

posted @ 2020-12-17 08:52  Coderlhx  阅读(782)  评论(0编辑  收藏  举报