Difference between revisions of "Template:LegDist"
Jump to navigation
Jump to search
(Created page with "<includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain |headers=hide }}}} {{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc...") |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain |headers=hide }}}} | + | <noinclude> |
| − | {{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain |headers=hide }}}} | + | Template to calculate the distance between two Loc subobjects using their ids. |
| + | |||
| + | === Usage === | ||
| + | <pre>{{LegDist | ||
| + | |from=locationId1 | ||
| + | |to=locationId2 | ||
| + | }}</pre> | ||
| + | {{LegDist|from=val1|to=val2}} | ||
| + | [[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 }}}} | ||
{{#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