title: jQuery & Google Maps: How To AJAX It
body: <p>I have a simple task but cannot seem to pull it off.  I will have a page that allows the user to enter their address and have Google return directions to a destination.  So, step number one was to go to the google maps API and see how this is done.  So, from their example, I got the following url:</p>
  
  <pre><code>http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&amp;destination=Los+Angeles,CA&amp;waypoints=Joplin,MO|Oklahoma+City,OK&amp;sensor=false
  </code></pre>
  
  <p>If you put this url in your browser, you will get a json result.  So, my thought was, why can't I call this in a jQuery AJAX request?  Is this possible?  I have tried the request below but get an 'Access Denied' error in the jQuery script:</p>
  
  <pre><code>        $.ajax({
              type: "POST",
              url: "http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&amp;destination=Los+Angeles,CA&amp;waypoints=Joplin,MO|Oklahoma+City,OK&amp;sensor=false",
              success: function (msg) {
                  alert(msg);
              }
          });
  </code></pre>
  
  <p>Does anyone see a problem with the syntax or know why this doesn't work?  And FYI, this is just the first question.  I would like for this question to become a great resource for others to create a google map with directions via jquery and ajax without using php (which it seems as though everyone else is using).</p>