title: Get full address of clicked marker in google maps
body: <p>Can you please help me out with <em>google maps</em>.</p>
  
  <p>I need to get the <strong>full address of the clicked marker and display the address details in  ASP label controls</strong>. In fact I am showing only one marker at a time.</p>
  
  <p>E.g Stand No or House Number : 15
  Street Name: St Joseph Street
  Suburb: Silverton
  City: Johannesburg
  Latitude: 24.8545
  Longitude: -28.23565</p>
  
  <p>I am using the following JavaScript code for the map and its working fine.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var map;
      var marker;
      var address;
  
      function initialize() {
  
          var latitude = document.getElementById('&lt;%= hdnLat.ClientID%&gt;').value;
          var longitude = document.getElementById('&lt;%= hdnLng.ClientID%&gt;').value;
  
          var myLatlng = new google.maps.LatLng(longitude, latitude);
          var mapOptions = {
              zoom: 18,
              center: myLatlng
          }
          map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  
          marker = new google.maps.Marker({
              position: myLatlng,
              map: map,
              draggable:true,
              animation: google.maps.Animation.DROP
          });
          google.maps.event.addListener(marker, 'click', toggleBounce);
      }
  
      function toggleBounce() {
  
          if (marker.getAnimation() != null) {
              marker.setAnimation(null);
          } else {
              marker.setAnimation(google.maps.Animation.BOUNCE);
          }
      }
  
      google.maps.event.addDomListener(window, 'load', initialize);
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I am using the following ASP controls to work with the map.</p>
  
  <pre><code>&lt;asp:HiddenField ID="hdnLng" runat="server" /&gt;
  &lt;asp:HiddenField ID="hdnLat" runat="server" /&gt;
  
  &lt;div id="map-canvas" style="height:425px;"&gt;&lt;/div&gt;
  
  &lt;asp:Label ID="addressStandNo" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressStreetName" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressSuburb" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressCity" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressLatitude" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressLongitude" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="addressPostalCode" runat="server"&gt;&lt;/asp:Label&gt;
  </code></pre>
  
  <p>I just need to get the details (the address) of the <strong>clicked marker</strong> on the map and assign those values to the ASP controls listed above.</p>
  
  <p>Thank you in advance.</p>