Results 1 to 9 of 9

Thread: BUG - Vantage 1.2 - Find on Map code in listing-edit.js & event-edit.js needs fixing

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

    BUG - Vantage 1.2 - Find on Map code in listing-edit.js & event-edit.js needs fixing

    Hi,

    There are lot of posts regarding issues with google maps and "Find on Maps" not working correctly, example post:

    http://forums.appthemes.com/report-v...-52122/page-3/


    There is a BUG in the "listing-edit.js" and "event-edit.js" javascript files that needs to be fixed:


    listing-edit.js

    Code:
        jQuery('#listing-find-on-map').click(function(ev) {
    
            jQuery.getJSON( Vantage.ajaxurl, {
                action: 'vantage_create_listing_geocode',
                address: jQuery('#listing-address').val(),
            }, function(response) {
                if ( response.formatted_address ) { 
                    jQuery('#listing-address').val(response.formatted_address);
                }
    
                jQuery('input[name="lat"]').val(response.coords.lat); // <-- fixed this line
                jQuery('input[name="lng"]').val(response.coords.lng); // <-- fixed this line
    
                update_position( response.coords.lat, response.coords.lng, 0 );
            } );
    
        });

    event-edit.js

    Code:
        jQuery('#event-find-on-map').click(function(ev) {
    
            jQuery.getJSON( Vantage.ajaxurl, {
                action: 'vantage_create_event_geocode',
                address: jQuery('#event-address').val(),
            }, function(response) {
                if ( response.formatted_address ) { 
                    jQuery('#event-address').val(response.formatted_address);
                }
    
                jQuery('input[name="lat"]').val(response.coords.lat);  //<-- fixed this line
                jQuery('input[name="lng"]').val(response.coords.lng); //<-- fixed this line
    
                update_position( response.coords.lat, response.coords.lng, 0 );
            } );
    
        });

  2. #2
    Thread Starter
    Veteran joes's Avatar
    Join Date
    Nov 2012
    Location
    Australia
    Posts
    875
    Thanks
    12
    Thanked 358 Times in 261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. The Following User Says Thank You to joes For This Useful Post:

    cllzor (June 9th, 2013)

  4. #3
    cllzor's Avatar
    Join Date
    Jun 2011
    Location
    Ecuador
    Posts
    41
    Thanks
    11
    Thanked 2 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Thread Starter
    Veteran joes's Avatar
    Join Date
    Nov 2012
    Location
    Australia
    Posts
    875
    Thanks
    12
    Thanked 358 Times in 261 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,618
    Thanks
    222
    Thanked 1,865 Times in 1,765 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #6
    Expired Customer suporteon's Avatar
    Join Date
    Mar 2013
    Location
    Brazil
    Posts
    46
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #7
    magaek's Avatar
    Join Date
    May 2013
    Location
    France
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #8
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,618
    Thanks
    222
    Thanked 1,865 Times in 1,765 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. The Following User Says Thank You to dimitris For This Useful Post:

    joes (June 19th, 2013)

  11. #9
    magaek's Avatar
    Join Date
    May 2013
    Location
    France
    Posts
    25
    Thanks
    5
    Thanked 0 Times in 0 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. Cost Per Listing, Where to find/edit?
    By joshthomas80 in forum ClassiPress General Discussion
    Replies: 12
    Last Post: August 21st, 2013, 11:34 AM
  2. Dimitris Edit Event > Contact Information
    By beergeek in forum Report Vantage Bugs (Legacy)
    Replies: 1
    Last Post: May 23rd, 2013, 02:24 PM
  3. How do I allow users to edit their listing without having to find their listing first
    By margas in forum Vantage General Discussion (Legacy)
    Replies: 5
    Last Post: March 3rd, 2013, 07:59 AM
  4. Cost Per Listing, Where to find/edit?
    By joshthomas80 in forum Help Using ClassiPress
    Replies: 2
    Last Post: December 31st, 1969, 07:00 PM