Difference between revisions of "Template:LegDist"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
{{LegDist|from=val1|to=val2}}
 
{{LegDist|from=val1|to=val2}}
 
[[Category:Template]]
 
[[Category:Template]]
</noinclude><includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon #|format=plain |headers=hide }}}}
+
</noinclude><includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain |headers=hide }}}}
{{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon #|format=plain |headers=hide }}}}
+
{{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain |headers=hide }}}}
 
{{#var:from_latlon}}{{#var:to_latlon}}
 
{{#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>

Revision as of 15:38, 27 November 2024

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

Usage

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


San Sebastian-Zumaia Via Verde Round (43° 17' 23.13" N, 1° 59' 50.81" W)San Sebastian-Zumaia Via Verde Round (43° 16' 28.74" N, 2° 1' 16.69" W)

Fatal error: Required parameter 'location1' is missing