title: Google Info Windows To show default content
body: <p>I have an application where a user can enter the location of a place in a text area and then it gets the information from this place from the Google Maps JavaScript API; so it gets the address, latitude, longitude, etc.</p>
  
  <p>I have it load this map on the page and it shows a marker on the lat/long coordinates. when the page is loaded it opens a Info Window. However I don't want to have to create custom content for each place. I want to get the information from googles api and just display it.</p>
  
  <p>Is there anything like this available?</p>
  
  <p>Below is my code for the map/marker/info window</p>
  
  <pre><code>var lat = parseFloat(latitude);
      var lng = parseFloat(longitude);
  
      var map;
  
      function initMap() {
          var myLatLng = {lat: lat, lng: lng};
  
          map = new google.maps.Map(document.getElementById('location-map'), {
              center: myLatLng,
              scrollwheel: false,
              zoom: 15
          });
  
          var marker = new google.maps.Marker({
              position: myLatLng,
              map: map
          });
          var infowindow = new google.maps.InfoWindow({
              content: "Use pin to point your exact locality"
          });
          google.maps.event.addListener(marker, 'click', function () {
              infowindow.open(map, marker);
          });
          infowindow.open(map, marker);
      }
  </code></pre>