Learn

distance_in_km_from

Calculate the distance in kilometers between a variable's location and a given center point.

Sample Usage

{{ home|distance_in_km_from:42.036922,-71.683501 }}

This will output the distance in kilometers between the location of the home variable and the given coordinates.

Important notes:

  • You cannot use spaces between coordinates, they must be formatted as above
  • Will only work if your variable has a latitude and longitude named subvariable

Parameters

This modifier expects one parameter, the coordinates from which to measure the distance from your variable.

This article was last updated on March 30th, 2016. Find an error? Please let us know!