use google maps on my site [closed]

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 for each record as follows:

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

    
asked by anonymous 24.10.2016 / 12:44

2 answers

1

The easiest way is possibly to use an iframe and PHP.

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

Replace $localizacao with your location variable and make the necessary adjustments to the iframe dimension.

    
24.10.2016 / 13:08
0

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

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

    
24.10.2016 / 13:05