title: requesting details with google places api
body: <p>I have been reading quite a bit but still a little muddy.  I am trying to build an app that gets business listings in google places and displays the 'details' such as address, reviews, image, location, description.  </p>
  
  <p>I dont want to perform a search as I already know the business name and location (the user will not be searching but viewing a page navigated to) </p>
  
  <p>I have been following this: <a href="https://developers.google.com/maps/documentation/javascript/places#place_details_requests" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/javascript/places#place_details_requests</a></p>
  
  <p>and using the code form here: 
  <a href="https://stackoverflow.com/questions/9520808/google-places-api-places-detail-request-undefined">Google Places API - Places detail request undefined</a></p>
  
  <pre><code>function initialize() {
      var pyrmont = new google.maps.LatLng(50.458447,-3.509552);
  
      map = new google.maps.Map(document.getElementById('map_canvas'), {
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        center: pyrmont,
        zoom: 15
      });
  
      var request = {
        location: pyrmont,
        radius: 5000,
        types: ['bar']
      };
      infowindow = new google.maps.InfoWindow();
      service = new google.maps.places.PlacesService(map);
      service.search(request, callback);
    }
  
    function callback(results, status) {
      if (status == google.maps.places.PlacesServiceStatus.OK) {
        for (var i = 0; i &lt; results.length; i++) {
          createMarker(results[i]);
        }
      }
    }
  
    function createMarker(place) {
      var placeLoc = place.geometry.location;
      var marker = new google.maps.Marker({
        map: map,
        position: place.geometry.location
      });
  
      google.maps.event.addListener(marker, 'click', function() {
        infowindow.setContent(place.name + "&lt;br /&gt;" + place.formatted_address +"&lt;br /&gt;" + place.website + "&lt;br /&gt;" + place.rating + "&lt;br /&gt;" + place.formatted_phone_number);
        infowindow.open(map, this);
      });
    }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places&amp;sensor=false"&gt;&lt;/script&gt;
  </code></pre>
  
          
  
  <pre><code>&lt;/head&gt;
  &lt;body&gt;
      &lt;div id="content"&gt;
  
          &lt;div id="map_canvas"&gt;
              map
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>What is the easiest way to perform the get request and have it print in the html for specific business listings?</p>