use google maps on my site

Asked

Viewed 96 times

0

Hello, I have a system , and I need every time I open this box , change the address of google maps according to the address that appears of each record as follows in the photo : inserir a descrição da imagem aqui

This is a box that shows various information from a record , and one of the results of the record is the location, as I would change the maps according to this address ?

2 answers

1


The easiest way is possibly using an iframe and PHP.

<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.it/maps?q=<?php echo $localizacao; ?>&output=embed"></iframe>

Replaces the $localizacao by your location variable and make the necessary adjustments to the iframe dimension.

0

You can leave the pattern on the form: https://www.google.com/maps/search/, and insert the query code into the DB in sequence with echo as in the rest of the page.

Example: https://www.google.com/maps/search/<?php echo $consulta['mapa'];?>/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.