[BUG] Google maps driving drirections only shows Kilometers - not Miles
There is a thread in the Vantage General Discussion that complains about the Google map driving directions functionality ONLY displays the directions in
Kilometers. Changing the Vantage GEO settings to "Miles" does not make a difference to the driving directions.
http://forums.appthemes.com/vantage-...driving-56062/
This is a BUG in Vantage - Vantage does not honor the settings set by the user.
This needs to be fixed in Vantage.
For those who want to display "Miles" in the driving directions here is a quick fix:
Find the following code in "\vantage\includes\geo\map-providers\google-maps.
js":
Code:
jQuery('#' + options.get_directions_btn ).click( function(){
var start = jQuery('#' + options.directions_from).val();
var end = options.end_address; // This is the address for the listing/event
var request = {
origin: start,
destination: end,
travelMode: google.maps.TravelMode.DRIVING
};
and change it to the following:
Code:
jQuery('#' + options.get_directions_btn ).click( function(){
var start = jQuery('#' + options.directions_from).val();
var end = options.end_address; // This is the address for the listing/event
var request = {
origin: start,
destination: end,
travelMode: google.maps.TravelMode.DRIVING,
unitSystem: google.maps.UnitSystem.IMPERIAL
};
The highlighted RED text is what is added to get driving directions in "Miles".