Link to google map in HTML [closed]

0

I have the following query; I've seen in many places that people include google maps on their websites with some marked point on the map. Well, instead of this, I need to make a link in html (with a tag for example), that when the user clicks it, it takes it to another tab and opens it to google maps with the location that I want selected.

As you can see, the concern is a bit far-fetched, I think that's why I could not find a solution by searching the web.

Thank you in advance.

    
asked by Alejandro Zbrun 15.03.2018 в 18:41
source

1 answer

0

To be opened by another window add the attribute target="_blank"

<label>Con Vínculo </label>
<a href="https://www.google.com.gt/maps/place/Parqueo+AGEXPORT/@14.5824309,-90.5210567,15z/data=!4m5!3m4!1s0x0:0x3c37246f94a217c5!8m2!3d14.5842843!4d-90.5234009" target="_blank">Vínculo</a>


<label>Incrustado en tu sitio </label>
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d15445.167938361248!2d-90.52105674999999!3d14.582430949999997!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x3c37246f94a217c5!2sParqueo+AGEXPORT!5e0!3m2!1ses-419!2sgt!4v1521136049859" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>

If you need to change the coordinates, according to the previous example, you must replace the following parameters:

<a href="https://www.google.com.gt/maps/@14.5824309,-90.5210567,15z" target="_blank">Original</a>

With the parameters that you must replace, imagining that it is php since you do not specify, it would look like this:

 <a href="https://www.google.com.gt/maps/@<?php echo $valor1 ?>,<?php echo $valor2 ?>,15z" target="_blank">Parametrizado</a>
    
answered by 15.03.2018 / 18:50
source