google-maps – Questions about using dynamic maps

Question:

My sister sells Avon and I decided to do something very simple, which is her customer records. So far so good, but I would like to add the Google Maps map to her website. I found the Google API but with a lot of things, what I want is simple, when opening the customer record it has 3 tabs MAIN | ADDRESS | MAP By clicking on the "map" tab, I would like inside the DIV or IFRAME or other element, to show me the map of her client's address. It's simple, something like this:

https://www.google.com.br/maps/preview/place/AQUI-VAI-O-CEP

If I change the zip code and put the one on my street and copy the link and paste it into the browser it opens the link correctly, now if I put it inside a DIV or an IFRAME it doesn't load.

How to solve?

Answer:

Try to make the URL in this format:

https://www.google.com.br/maps?q=<CEP_COM_TRACO>,%20Brasil&output=embed

An example of what it would look like:

https://www.google.com.br/maps?q=49100-000,%20Brasil&output=embed

This is because the Google Maps Preview (new Google Maps) you are using needs to be used by someone who is logged into Google and has agreed to test this new version!

I hope it helps!

Scroll to Top