Can I dynamically updated the marker location google map by using below code :     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
             
    <script src="https://maps.googleapis.com/maps/api/js?key=hgter...&libraries=places" type="text/javascript">
                    </script> <script>
var map = new google.maps.Map(document.getElementById('map-canvas'), {

center:{

lat: 12.971599,

lng: 77.594563

},

zoom:15

});

var marker = new google.maps.Marker({

position: {

lat: 12.971599,

lng: 77.594563

}, 
map: map,

draggable: true

});
                    
var searchBox = new 

google.maps.places.SearchBox(document.getElementById('searchmap'));
                      google.maps.event.addListener(searchBox,'places_changed',function(){

var places = searchBox.getPlaces();

var bounds = new google.maps.LatLngBounds();

var i,place;

for(i=0; place=places[i]; i++){

bounds.extend(place.geometry.location);

marker.setPosition(place.geometry.location);

}
map.fitBounds(bounds);

map.setZoom(15);

});
                    
                
            
//here Latitude and Longitude value gets updated dynamically as the users drag

// and drop marker

google.maps.event.addListener(marker,'position_changed',function(){

var lat = marker.getPosition().lat();

var lng = marker.getPosition().lng();

$('#lat').val(lat);

$('#lng').val(lng);

});

</script>