A fully functional Google Map API for PHP.

Demo

How to use


<?php
require('GoogleMapAPI.class.php');
$map = new GoogleMapAPI('map1');
$map->setAPIKey('ABQIAAAAPOHd09dXhJtbKHeZpxlh6BTdM_BGb_HRDyhTa-
dAuFdRUQ382BTsqAFfGu_x3jaT_hgEvzyEiREMIg');
$map->setMapType('hybrid');
$map->enableInfoWindow();
$map->enableDirections();
$map->setInfoWindowTrigger('mouseover');
$map->setWidth('600px');
$map->setHeight('600px');

$map->addMarkerByCoords(100.70954024791717,14.670748432532
,'Saraburi.','<b>Nongdon Home</b>');
$map->addMarkerByCoords(100.60327649116516,13.782933913199501
,'Bangkok','<b>Wangthonglang Home</b>');
$map->addMarkerByCoords(104.5806,16.1585,'Yasothon.','<b>Nong Meen</b>');
$map->addPolyLineByCoords(100.70954024791717,14.670748432532,100.60327649116516
,13.782933913199501,'#980e0e',5,50);
$map->addPolyLineByCoords(100.70954024791717,14.670748432532,104.5806
,16.1585,'#00FF00',5,50);

?>

<html>
<head>
<?php $map->printHeaderJS(); ?>
<?php $map->printMapJS(); ?>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
</head>
<body onload="onLoad()">
<table border=0>
<tr><td>
<?php $map->printMap(); ?>
</td>

</tr>
</table>
</body>
</html>

More info
http://www.phpinsider.com/php/code/GoogleMapAPI/