Last active
October 29, 2021 19:05
-
-
Save drikusroor/a973906c25e6b4dfa35523af259993a1 to your computer and use it in GitHub Desktop.
Easy full-width embedded Google Maps in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- In PHP --> | |
<iframe | |
src=" | |
<?php | |
$search_terms = rawurlencode("3 Abbey Road, London, GB NW8 9AY"); | |
$src = | |
"https://www.google.com/maps?q=2880%20" . | |
$search_terms . | |
"&t=&z=15&ie=UTF8&iwloc=&output=embed"; | |
echo $src; | |
?>" | |
width="600" | |
height="500" | |
style="border:0; width: 100% !important;" | |
frameborder="0" | |
scrolling="no" | |
marginheight="0" | |
marginwidth="0" | |
allowfullscreen="" | |
loading="lazy"> | |
</iframe> | |
<!-- Or, in raw HTML --> | |
<iframe | |
src="https://www.google.com/maps?q=2880%203%20Abbey%20Road%2C%20London%2C%20GB%20NW8%209AY&t=&z=15&ie=UTF8&iwloc=&output=embed" | |
style="border: 0px none; width: 100% !important; max-width: 100%;" | |
scrolling="no" | |
marginheight="0" | |
marginwidth="0" | |
allowfullscreen="" | |
loading="lazy" | |
width="600" | |
height="500" | |
frameborder="0" | |
> | |
</iframe> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment