Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 49
Like Tree1Likes

Thread: Draggable Pin

  1. #11
    fstaff's Avatar
    Join Date
    Jan 2012
    Location
    United States
    Posts
    50
    Thanks
    5
    Thanked 7 Times in 3 Posts
    It says the zip file is invalid. Can you repost it?

  2. #12
    Veteran websitu's Avatar
    Join Date
    Feb 2012
    Location
    UK
    Posts
    443
    Thanks
    25
    Thanked 44 Times in 40 Posts
    Just to provide some feed back on this

    This is a very useful plugin and very much appreciated, it works beautifully however I noticed tonight that you can drag the pin to the exact point of the business but this then changes the address. For example I changed the pin for a business that I know in my directory to the exact place it should be and the the address changed from the 'brewery arts centre' to no '7 rycroft gardens' which I know is a distance away from the pin point. The problem then is that the post code changes so users who may want to use the directory to select a post code for sat nav will find themselves not arriving at the correct destination.

    The strange thing is if I enter the address into google for the above business it's accurate - if i do it through Vantage it's at least 800 meters plus out

  3. #13
    fstaff's Avatar
    Join Date
    Jan 2012
    Location
    United States
    Posts
    50
    Thanks
    5
    Thanked 7 Times in 3 Posts
    After you drag the pin to where you want it, then retype your address in the field and it'll save the address you typed and the new pin location.

  4. #14
    Veteran websitu's Avatar
    Join Date
    Feb 2012
    Location
    UK
    Posts
    443
    Thanks
    25
    Thanked 44 Times in 40 Posts
    I thought that but it doesn't least not in my situation - I'll look again a this

  5. #15
    Expired Customer johno69's Avatar
    Join Date
    Sep 2012
    Location
    Australia
    Posts
    576
    Thanks
    47
    Thanked 109 Times in 81 Posts
    Firstly thanks for the plugin, seems to be a step in the right direction.


    Quote Originally Posted by fstaff View Post
    After you drag the pin to where you want it, then retype your address in the field and it'll save the address you typed and the new pin location.
    This works for me, but is not practical top be asking end users to be doing this.

    I think we need to have the address field operate separate to the map. I have a custom site where we do this, we use the address to "Find On Map" then it zooms to close on the map. But it auto fills a lat/long set of fields that the map uses.

    So when you drag the pin, the lat/long updates, but the address stays the same.

    Do you think this plugin, or the theme can be updated this way?

    As it stands now, the user will not be happy either way, wrong address or wrong location.

  6. #16
    fstaff's Avatar
    Join Date
    Jan 2012
    Location
    United States
    Posts
    50
    Thanks
    5
    Thanked 7 Times in 3 Posts
    This is what I did and it works for me.

    If the user types in a valid address that Google Maps can find it will update the map when they click Find on map.

    If the user types in an address Google Maps can't find, then the pin will go to an alternate similar address while the address the user typed in stays the same. The user can then drag the pin to where it needs to be. The whole time the address they typed in stays the same.

    On the admin backend go to Plugins. Find the Draggable Marker Vantage plugin and click Edit. On the right under Plugin Files click draggable-marker-vantage/draggable-marker.js.
    In the code window go down to line 23 and comment out the below code like I have it.

    This will keep it from updating the address when you drop the pin after moving it.
    Code:
    //	function updateAddress(pos){
    //		
    //			geocoder.geocode({latLng: pos }, function(responses) {
    //				if (responses && responses.length > 0) {
    //					 var addr = responses[0].formatted_address;
    //					jQuery('#listing-address').val(addr);
    //				}
    //			});
    //	}
    Go down to line 57 and comment the line like below.

    This will prevent the wrong address from being sent back to the address field overwriting what the user types in if Google can't find it.
    Code:
    //jQuery('#listing-address').val(results[0].formatted_address);
    Click the Update File button.

    I hope this helps.

  7. The Following 3 Users Say Thank You to fstaff For This Useful Post:

    dubya (September 21st, 2012), johno69 (September 17th, 2012), websitu (September 18th, 2012)

  8. #17
    Expired Customer johno69's Avatar
    Join Date
    Sep 2012
    Location
    Australia
    Posts
    576
    Thanks
    47
    Thanked 109 Times in 81 Posts
    BRILLIANT !

    Thank you a lot. It's perfect.

  9. #18
    Veteran websitu's Avatar
    Join Date
    Feb 2012
    Location
    UK
    Posts
    443
    Thanks
    25
    Thanked 44 Times in 40 Posts
    That appears to have sorted that issue - Thank You Still not sure why the results from a direct google map search were different to a listing map search. Not had chance to re visit this but I will and I will report back with findings

    Thanks again Guys and Gals

  10. #19
    Veteran websitu's Avatar
    Join Date
    Feb 2012
    Location
    UK
    Posts
    443
    Thanks
    25
    Thanked 44 Times in 40 Posts
    Might be worth locating 'form-listing.php' navigate to line 32 and add the code in red

    <input id="listing-find-on-map" type="button" value="<?php esc_attr_e( 'Find on map', APP_TD ); ?>">

    <div id="listing-map"></div>
    <label>You can fine-tune the location by dragging the pin on the map.</label>

  11. The Following 2 Users Say Thank You to websitu For This Useful Post:

    dubya (September 21st, 2012), mr_green (September 18th, 2012)

  12. #20
    Expired Customer johno69's Avatar
    Join Date
    Sep 2012
    Location
    Australia
    Posts
    576
    Thanks
    47
    Thanked 109 Times in 81 Posts
    Great work. Surely this should be implemented into the core theme.
    Did this post help you? Click Thanks | Did it help you lots? Then the next time you see someone in need give them $5 for me.

Page 2 of 5 FirstFirst 1234 ... LastLast

Thread Information

Users Browsing this Thread

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