Difference between revisions of "Template:LegDist"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
 
Line 10: Line 10:
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude><includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain | mainlabel=- |headers=hide }}}}{{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain | mainlabel=- |headers=hide }}}}
 
</noinclude><includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain | mainlabel=- |headers=hide }}}}{{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain | mainlabel=- |headers=hide }}}}
{{#var:from_latlon}}{{#var:to_latlon}}
 
 
{{#geodistance:{{#var:from_latlon}}|{{#var:to_latlon}}|unit=km}}
 
{{#geodistance:{{#var:from_latlon}}|{{#var:to_latlon}}|unit=km}}
 
</includeonly>
 
</includeonly>

Latest revision as of 15:43, 27 November 2024

Template to calculate the distance between two Loc subobjects using their ids.

Usage

{{LegDist
|from=locationId1
|to=locationId2
}}

2.56 km