Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    How to Get formatted Address, Latitude, and Longitude from Dragged Google Map Marker

    In this blog, we will learn how to get a formatted address with latitude and longitude after dragging the Google map marker.

    How to create a draggable marker on Google Map

    You need to insert the following div where you want to display the map and create the input fields to display City, Post Code, Country, Region / State, Latitude and Longitude. 

    JavaScript Code

    The following code will generate a draggable marker on the Google map and when you drag the marker it will display city, postcode, country_id, zone_id, Latitude, and Longitude in the input fields.

    *Note:- We have converted Country and Region / State on the basis of country_id and zone_id.

    By this code, you can add a draggable marker on Google Map

    By this code, The dragend event is fired.

    Complete Code


    So here we end with this blog.


    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again