From 8cbb9efd39b0c21c1a7237cee39b52d3dba587f4 Mon Sep 17 00:00:00 2001 From: Code WvS Date: Sun, 22 Mar 2015 18:04:10 +0100 Subject: add distanceFromTo block --- threads.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 519922c..2817144 100644 --- a/threads.js +++ b/threads.js @@ -2509,6 +2509,12 @@ Process.prototype.reportDistanceTo = function (name) { return 0; }; +Process.prototype.reportDistanceFromTo = function (lon1, lat1, lon2, lat2) { + var thisPoint = L.latLng(lat1, lon1), + thatPoint = L.latLng(lat2, lon2); + return thisPoint.distanceTo(thatPoint); +}; + Process.prototype.reportAttributeOf = function (attribute, name) { var thisObj = this.blockReceiver(), thatObj, -- cgit v1.3.1