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...") |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:from_latlon|{{#ask: [[Loc id::{{{from|}}}]] |?Loc latlon |format=plain |headers=hide }}}} | + | <noinclude> |
+ | 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 |headers=hide }}}} | ||
+ | {{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain |headers=hide }}}} | ||
+ | {{#geodistance:{{#var:from_latlon}}|{{#var:to_latlon}}|unit=km}} | ||
+ | </includeonly><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 }}}} | ||
{{#geodistance:{{#var:from_latlon}}|{{#var:to_latlon}}|unit=km}} | {{#geodistance:{{#var:from_latlon}}|{{#var:to_latlon}}|unit=km}} | ||
</includeonly> | </includeonly> |
Revision as of 15:36, 27 November 2024
Template to calculate the distance between two Loc subobjects using their ids.
Usage
{{LegDist |from=locationId1 |to=locationId2 }}
Fatal error: Required parameter 'location1' is missing
Fatal error: Required parameter 'location1' is missing