The results are not shown in the iframe

0

I have this code and I do not know why the results are not shown in the iframe. I have hardly any knowledge and what I am reading on the web does not help anything. Thanks.

<script>
function enviar(){
  dato1 = document.getElementById('dato1').value;
  dato2 = document.getElementById('dato2').value;
  document.getElementById("myform").target = "iframeUpload";
  document.myform.action = 
  "http://www.google.es/maps/search/"+dato1+"+"+dato2;
 document.myform.submit();
}
</script>
<form name="myform" action="" method="get">
<input type="text" value="" id="dato1" />
<input type="text" value="" id="dato2" />
<input type="button" value="enviar" onclick="enviar();" />
 </form>
 <iframe id="iframeUpload" name="iframeUpload"></iframe>
    
asked by antonio 18.02.2018 в 11:38
source

1 answer

0

It does not load the result because Google does not allow it to do so.

You should check the Google Maps documentation for developers to see how to do it. Actually, you only need to register to obtain a personal key to use the API and include this key in the urls.

Both this key and its use are free as long as they are not used in commercial applications or exceed a number of requests.

Reference:

Google Maps Embed API

    
answered by 18.02.2018 в 12:04