title: Google Maps API Javascript in Wordpress
body: <p>Hope you guys can answer this question!  I'm thinking it should be relatively easy but I just can't seem to get to grips with it.</p>
  
  <p>How do you go about loading the Google Maps API Javascript within a Wordpress post/page?</p>
  
  <p>The Wordpress Codex would seem to suggest that having referred to your javascript file in the header of your theme you then need to call the functions within the post.</p>
  
  <p>I've referred to the Google Javascript files in the header as follows:</p>
  
  <pre><code>&lt;script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBuU_0_uLMnFM-2oWod_fzC0atPZj7dHlU&amp;sensor=false"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  </code></pre>
  
  <p>and then to my javascript file with all the API code in the header too:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://runforlifeuk.com/rhedeg/wp-content/javascript/trefilmap.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I've then used the following code in the post:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://runforlifeuk.com/rhedeg/wp-content/javascript/trefilmap.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  &lt;/script&gt;
  &lt;div id="map-canvas"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But this just creates an empty box.  I've tried calling the predefined Google JS functions within the post but this doesn't appear to have worked either.</p>
  
  <p>Is there anybody implementing Google Maps on Wordpress that has already done this?  I can paste all the code directly into the post but the Google Map comes out full of bugs.</p>
  
  <p>Any ideas would be greatly appreciated!
  Many thanks.</p>