Results 1 to 4 of 4

Thread: [BUG] Google maps driving drirections only shows Kilometers - not Miles

  1. #1
    Thread Starter
    joes's Avatar
    Join Date
    Nov 2012
    Location
    Australia
    Posts
    877
    Thanks
    12
    Thanked 358 Times in 261 Posts

    [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".

  2. #2
    kidztipis's Avatar
    Join Date
    Jun 2013
    Location
    United States
    Posts
    329
    Thanks
    29
    Thanked 41 Times in 34 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    kidztipis's Avatar
    Join Date
    Jun 2013
    Location
    United States
    Posts
    329
    Thanks
    29
    Thanked 41 Times in 34 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    aj270303's Avatar
    Join Date
    Dec 2011
    Location
    United Kingdom
    Posts
    2,106
    Thanks
    56
    Thanked 99 Times in 81 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change unit in Google maps driving drirections
    By gcdesign in forum Vantage General Discussion (Legacy)
    Replies: 2
    Last Post: September 4th, 2013, 01:17 AM
  2. Replies: 1
    Last Post: April 14th, 2013, 06:25 AM
  3. Change radius of miles kilometers in job search field
    By hansbaak in forum JobRoller General Discussion
    Replies: 2
    Last Post: November 14th, 2012, 08:08 AM
  4. Change radius of miles kilometers in job search field
    By hansbaak in forum Report JobRoller Bugs
    Replies: 1
    Last Post: November 14th, 2012, 07:42 AM
  5. Miles/kilometers Radius Info
    By zemartin in forum Report JobRoller Bugs
    Replies: 12
    Last Post: June 22nd, 2011, 09:37 AM