Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Google Maps Draggable Marker Get Coordinates

Keywords | google Maps Draggable Marker get coordinates, google maps drag marker get coordinates, google maps marker draggable get position

  • Keep reading on Calculate Distance Between Two Points Google Maps

Google Maps Draggable Marker

A Marker identifies a location on a map. By default, a marker uses a standard image. You can allow users to move a marker on the map by setting the marker’s draggable property to true

Make a marker draggable

To allow users to drag a marker to a different location on the map, set draggable to true in the marker options.

var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
  zoom: 4,
  center: myLatlng
}
var map = new google.maps.Map(document.getElementById("map"), mapOptions);

// Place a draggable marker on the map
var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    draggable:true,
    title:"Drag me!"
});

Google Maps Draggable Marker Get Coordinates

The following google maps javascript API example will demonstrate you how to use google maps drag marker get coordinates. Let’s create a Google map with a draggable marker and when you drag the marker lets generate the Latitude and Longitude of that location where you place the marker. Find the below source code:-



    Google Maps Drag Marker Get Coordinates

Google Maps Draggable Marker Get Coordinates




Download Code

What do you think?

I hope you liked this article on google maps draggable marker get coordinates. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.



This post first appeared on Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps API Developer, please read the originial post: here

Share the post

Google Maps Draggable Marker Get Coordinates

×

Subscribe to Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps Api Developer

Get updates delivered right to your inbox!

Thank you for your subscription

×