Solved google map marker coordinates

Posted on 2009-12-18
Last Modified: 2013-12-17
I need to display a google map on an web page

1) when the page loads the map has to be show with a MARKER and the user can move the marker and it shows the coordinates in textboxes (latitiude and longitude)
when the marker is moved.

Can the code be shown for that or any URL which exactly shows what I am looking for.

thanks in advance.
Question by:dotnet0824
    LVL 13

    Accepted Solution

    you can use , it's easy to use and its free.
    LVL 1

    Assisted Solution

    Use this javascript functions for movable markers

    function placeMarker() {
      var listener = GEvent.addListener(map, "click", function(overlay, latlng) {
        if (latlng) {
          var color = getColor(true);
          var marker = new GMarker(latlng, {icon: getIcon(color), draggable: true});
          var cells = addFeatureEntry("Placemark " + (++markerCounter_), color);
          updateMarker(marker, cells);
          GEvent.addListener(marker, "dragend", function() {
            updateMarker(marker, cells);
          GEvent.addListener(marker, "click", function() {
            updateMarker(marker, cells, true);

    function updateMarker(marker, cells, opt_changeColor) {
      if (opt_changeColor) {
        var color = getColor(true);
        marker.setImage(getIcon(color).image); = color;
      var latlng = marker.getPoint();
      cells.desc.innerHTML = "(" + Math.round(latlng.y * 100) / 100 + ", " +
      Math.round(latlng.x * 100) / 100 + ")";

    source :

    and use


    to see lat/long on mousemove.
    You can use these two solutions to get your desired solution.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now