I have to change the position of a marker on Google map from a javascript function. How can I achieve that?
You can use setPosition function of the marker class
function changeMarkerPosition(marker) { var latlng = new google.maps.LatLng(-24.397, 140.644); marker.setPosition(latlng); }
2.1m questions
2.1m answers
60 comments
57.0k users