RefTown Home
RefTown Knowledge Base

Driving Distance Methods

Article ID: 228
Last updated: 24 Jul, 2025
Revision: 7
print  Print
share  Share

RefTown supports to modes of driving distances.

The first and default method uses an approximated distanced based on latitude and longitude derived from officials and location addresses. The latitude and longitude of each official and location is stored on RefTown and an equation is used to calculate the line-of-site distance between the two points. That distance is then padded about 20% to account for the fact that the roads are rarely that direct. This number is generally good enough when identifying officials closer or farther from a given game location. This method would be insufficient in the presence of rivers, lakes, mountains or other obstacles that lead to longer driving distances despite the fact that the two locations are not that far apart or when the route might be very straight.

RefTown, also supports a mode that actually queries Google Maps for the actual route between the official's location and the game's location. This provides a very accurate driving distance. This is much more complicated and resource intensive than the simple latitude/longitude calculations but it will be accurate if the addresses in the system are correct and accurate. Enabling this mode also allows for drive time estimations in addition to distance.

THE FOLLOWING OPTION IS NO LONGER AVAILABLE. WE ARE WORKING ON A REPLACEMENT.
To enable the more precise distance mode, your organization must first obtain a "key" from Google Maps that allows access to their service. See the related articles for information on obtaining a key. This key must be entered on RefTown's configuration page under Admin -> Configuration, GAMES, Google API Key: Precise Driving Distances. This key will be string of seemingly random letters and numbers. Once the key is entered, all calculations of distances will use actual routes instead of the approximated distances.

Note that the first accesses after entering this key to pages that reference driving distances will be very slow as the distances are calculated. Depending on the number of officials and locations your organization has, the first accesses may be extremely slow. However, subsequent accesses will process at typical speeds.

Also read
item How is driving distance calculated?

Also listed in
folder Administrator Guide -> Finances -> Travel / Mileage

Prev     Next
Driving Distances       Setting up Reftown and Google Maps for Precise Driving Distances


© 2009-2024 RefTown.com

Powered by

Terms and Conditions