Difference between revisions of "Template:LegDist"
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 | mainlabel=- |headers=hide }}}}{{#vardefine:to_latlon|{{#ask: [[Loc id::{{{to|}}}]] |?Loc latlon |format=plain | mainlabel=- |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:42, 27 November 2024
Template to calculate the distance between two Loc subobjects using their ids.
Usage
{{LegDist |from=locationId1 |to=locationId2 }}
43° 17' 23.13" N, 1° 59' 50.81" W43° 16' 28.74" N, 2° 1' 16.69" W 2.56 km