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 }
得即高歌失即休,多愁多恨亦悠悠。今朝有酒今朝醉,明日愁来明日愁
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 }