Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.14 KB

README.md

File metadata and controls

42 lines (26 loc) · 1.14 KB

Static Map

A super simple PHP class for the Google Static Maps API

(c) 2011 Jay Williams
https://github.com/d3designs/StaticMap
License: MIT

Example

<?php

include 'staticmap.class.php';

$options = array('size'=>'300x300');
$map = new StaticMap($options);

$map->add_marker('1600 Pennsylvania Ave NW, Washington D.C., DC 20500');

$styles = array('color'=>'blue');
$map->add_marker('Lincoln Memorial Circle, Washington D.C., DC 20037', $styles);

$styles = array('label'=>'C');
$map->add_marker('38.891300,-77.03000', $styles);

// Display Static Map (using magic methods)
echo "<img src=\"$map\" alt=\"Google Map\" $map->dimensions>";

?>

Result

Google Map

Google Static Maps API Documentation

http://code.google.com/apis/maps/documentation/staticmaps/