title: Adding an image to an info window markerOptions in Google Maps API
body: <p>I have an array of points I want to add:</p>
  
  <pre><code>var arr1 = [
                  [40.664171,-73.983886,"410 7th Ave, Brooklyn, NY, 11215", '&lt;IMG BORDER="0" ALIGN="Left" SRC="images/ShotGlass.png"&gt;'],
                  [40.661113,-73.990103,"652 6th Ave, Brooklyn, NY, 11215", '&lt;IMG BORDER="0" ALIGN="Left" SRC="images/ShotGlass.png"&gt;']
              ];  
  </code></pre>
  
  <p>My markerOptions currently looks like:</p>
  
  <pre><code>                var markerOptions = {
                      position: markerLocation,
                      map: map,
                      title:arr1[i][2],
                      icon: "ShotGlass.png"
                  };
  </code></pre>
  
  <p>Currently the output when the marker is clicked is the address (example: 410 7th Ave, Brooklyn, NY, 11215) if the title:arr1[i][2] is set and a shot glass picture if it is set to title:arr1[i][3]. </p>
  
  <p>How could I get it so that the Address is then followed by an image in the info window?</p>
  
  <p>Thank you.</p>
  
  <p>Here is the full code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Shot Glass Map&lt;/title&gt;
          &lt;link rel="shortcut icon" href="ShotGlass.png"&gt;
  
          &lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=(Key left out of post)&amp;sensor=false"&gt;
          &lt;/script&gt;
  
          &lt;script type="text/javascript"&gt;
  
              var centerLocation = new google.maps.LatLng(39.810456, -98.555407);
              var mapType = google.maps.MapTypeId.ROADMAP;
              var mapOptions = {
                  center: centerLocation,
                  zoom: 5,
                  mapTypeId: mapType
              };
  
              var arr1 = [
                  [41.118459, -75.007712,"Buskhill Falls", '&lt;IMG BORDER="0" ALIGN="Left" SRC="images/BushkillFalls.jpg"&gt;'],
                  [40.661113,-73.990103,"652 6th Ave, Brooklyn, NY, 11215", '&lt;IMG BORDER="0" ALIGN="Left" SRC="images/ShotGlass.png"&gt;']
              ];  
  
              function initialize() {
                  var divElement = document.getElementById("map_canvas");
  
                  var map = new google.maps.Map(divElement, mapOptions);
  
                  for (var i=0; i&lt;arr1.length; i++) {
  
                      var markerLocation = new google.maps.LatLng(arr1[i][0],arr1[i][1]);
  
                      var markerOptions = {
                          position: markerLocation,
                          map: map,
                          title:arr1[i][2],
                          icon: "ShotGlass.png"
                      };
  
  
                      var marker = new google.maps.Marker(markerOptions);
  
                      var infoWindowOptions = {
                          //content: "&lt;strong&gt;Hello&lt;/strong&gt; World",
                          //content: "Central Park &lt;br/&gt; &lt;a href='http://en.wikipedia.org/wiki/Central_Park'&gt;Wikipedia&lt;/a&gt; &lt;br/&gt; &lt;img src='http://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Southwest_corner_of_Central_Park%2C_looking_east%2C_NYC.jpg/240px-Southwest_corner_of_Central_Park%2C_looking_east%2C_NYC.jpg' /&gt;"
                          content:arr1[i][2],
                          maxWidth: 200
                      };
  
                  var infoWindow = new google.maps.InfoWindow(infoWindowOptions);
  
                  google.maps.event.addListener(marker, 'click', function(){
                      infoWindow.setContent(this.title);
                      infoWindow.open(map,this);
                  } );
                  }
  
                  for (var i=0; i&lt;arr2.length; i++) {
  
                      var markerLocation = new google.maps.LatLng(arr2[i][0],arr2[i][1]);
  
                      var markerOptions = {
                          position: markerLocation,
                          map: map,
                          title:arr2[i][2],
                          icon: "latte.png"
                      };
  
  
                      var marker = new google.maps.Marker(markerOptions);
  
                      var infoWindowOptions = {
                          //content: "&lt;strong&gt;Hello&lt;/strong&gt; World",
                          //content: "Central Park &lt;br/&gt; &lt;a     
  
  href='http://en.wikipedia.org/wiki/Central_Park'&gt;Wikipedia&lt;/a&gt; &lt;br/&gt; &lt;img src='http://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Southwest_corner_of_Central_Park%2C_looking_east%2C_NYC.jpg/240px-Southwest_corner_of_Central_Park%2C_looking_east%2C_NYC.jpg' /&gt;"
                      content:arr2[i][2]
                      };
  
                  var infoWindow = new google.maps.InfoWindow(infoWindowOptions);
  
                  google.maps.event.addListener(marker, 'click', function(){
                      infoWindow.setContent(this.title);
                      infoWindow.open(map,this);
                  } );
                  }               
              }
  
          &lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body onload="initialize()"&gt;
          &lt;div id="map_canvas" style="width:100%; height:100%"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>