Tinderbox v10 Icon

distanceTo(startItem, endItem)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Data Type Returned: 

Operator First Added: 

Operator in Current Baseline: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Data manipulation  [other Data manipulation operators]

 Number [about Number data type]

 v8.0.4

 Baseline

 As at baseline


distanceTo(startItem, endItem)

distanceTo computes the approximate distance in kilometres between two notes for which a $Latitude and $Longitude are known. startItem and endItem are a name, path, attribute value or expression returning a unique reference to a single note.

For example, if note startItem 'Boston' has the latitude and longitude of Boston and note endItem 'Paris' has the latitude a longitude of Paris, then for

$MyNumber = distanceTo("Boston","Paris"); 

$MyNumber is about 5582 (km).

Long distances should use a great circle route.

Note the measurement is approximate and not intended for precise navigation.