Created
March 19, 2014 21:52
-
-
Save ziadoz/9652215 to your computer and use it in GitHub Desktop.
Generating a Static Google Map with 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
<?php | |
$url = 'http://maps.googleapis.com/maps/api/staticmap?'; | |
$bits = array( | |
'center' => 'Calgary Tower, Calgary, AB, Canada', | |
'zoom' => '16', | |
'size' => '800x600', | |
'maptype' => 'roadmap', | |
'markers' => 'color:0x576d4e|label:N|49.6967179,-112.8450119', | |
'sensor' => 'false', | |
); | |
echo '<img src="' . $url . http_build_query($bits) . '" alt="" />'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment