"Disable move map pin from changing address fields" enhancement

This topic contains 1 reply, has 2 voices, and was last updated by  Stiofan O’Connor 8 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #49347

    Rick Vandenberg
    Expired Member
    Post count: 2

    Hi,

    Preventing updates to the address while we fine-tune pin locations is critical in our application, and the ability to disable those updates works fine when moving the pin. But if you drag the map, the pin re-centers and updates the address.

    The fix is to use the same logic to prevent the update on the map movement; in geodirectory/geodirectory-functions/map-functions/map_on_add_listing_page.php, around line 563:

    
    
            google.maps.event.addListener($.goMap.map, 'dragend', function () {
    // updateMarkerStatus('Drag ended');
                <?php if($auto_change_address_fields_pin_move){?>
                geocodePosition(baseMarker.getPosition());
                centerMarker();
                updateMarkerPosition(baseMarker.getPosition());
                <?php }?>
            });
    

    I suppose the entire code to add the listener to this event could be wrapped instead. Anyways, there you have it; problem solved.

    Thanks for all the work you folks have been putting into this system 🙂

    #49358

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Rick,

    Thanks for spotting this, i have wrapped it to only not change the address on map drag but keep the centre of the marker to the screen. This change will be in the next version.

    I appreciate you pointing this out, it’s good to have you on board 🙂

    Thanks,

    Stiofan

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket