Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to center a script map of Google Maps
    primarykey
    data
    text
    <p>I'm trying to center a map on a LatLng I specify, but I'm not sure on how to do so. I've got this <b>iframe</b> link:</p> <pre><code>&lt;iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.es/maps?f=q&amp;amp;source=embed&amp;amp; hl=es&amp;amp;geocode=&amp;amp;q=Cam%C3%AD+Vell+d'Altea,+33,+L'Alf%C3%A0s+del+Pi&amp;amp; aq=0&amp;amp;oq=cam%C3%AD+vell+d'altea+33&amp;amp; sll=40.396764,-3.713379&amp;amp;sspn=13.49375,19.753418&amp;amp;ie=UTF8&amp;amp;hq=&amp;amp; hnear=Cam%C3%AD+Vell+d'Altea,+33,+03581+L'Alf%C3%A0s+del+Pi,+Alicante,+Comunidad+ Valenciana&amp;amp;t=m&amp;amp;ll=38.570757,-0.076316&amp;amp;spn=0.001743,0.004128&amp;amp; z=14&amp;amp;layer=c&amp;amp;cbll=38.570736,-0.076335&amp;amp;panoid=DplK9JGOu0KAPqoT95VMgQ&amp;amp; cbp=12,309.4,,0,8.19&amp;amp;output=svembed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt; </code></pre> <p>I want it to be a script position using the Google API. I have this code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt; &lt;style type="text/css"&gt; html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } &lt;/style&gt; &lt;script type="text/javascript" http://maps.googleapis.com/maps/api/js?key=MY_KEY&amp;sensor=false&amp;callback=initialize&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; function initialize() { var myOptions = { center: new google.maps.LatLng(13.49375,19.75341), zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } function loadScript() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.googleapis.com/maps/api/js?key=MY_KEY&amp;sensor=false&amp;callback=initialize"; document.body.appendChild(script); } window.onload = loadScript; &lt;/script&gt; </code></pre> <p> </p> <p>But I want to put the specific address of the iframe to the Google API I just copied. I don't know hot to do this.</p> <p>So, how can I link the map on the Google maps API?</p> <p>Thanks so much.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload