title: Google Map javascript api key
body: <p>I am using a cordova application and have a browser key for map.</p>
  
  <pre><code>&lt;script async defer
  
          src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBHJxzPHD_egYnhxntqcvfem35YRjruzAg&amp;callback=initMap"&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>but I want to take my key from server , I took and I store this key as</p>
  
  <pre><code>localStorage.getItem("MapCode")
  </code></pre>
  
  <p>this locastorage gives </p>
  
  <blockquote>
    <p>"<a href="https://maps.googleapis.com/maps/api/js?key=AIzaSyBHJxzPHD_egYnhxntqcvfem35YRjruzAg&amp;callback=initMap" rel="nofollow">https://maps.googleapis.com/maps/api/js?key=AIzaSyBHJxzPHD_egYnhxntqcvfem35YRjruzAg&amp;callback=initMap</a>"</p>
  </blockquote>
  
  <p>so I want to write this to src but I couldn't do it.</p>
  
  <pre><code>&lt;script async defer
  
              src=localStorage.getItem("MapCode")&gt;
      &lt;/script&gt;
  </code></pre>
  
  <p>How can I solve this?Thanks in advance</p>