Code to generate this page:

<?php
include_once("../include/GoogleMap.php");
include_once("../include/JSMin.php");


//Set defaults
$DIRECTIONS_CONTAINER_ID = "map_directions";
$DESTINATION_ADDRESS = "Boulder, CO";
$MARKER_HTML = "
Boulder, CO<br />
Need directions?
<form action=''>
<input type='text' name='start' />
<input type='submit' value='Get Directions' />
</form>
";

//Get posted variables
$START_ADDRESS = isset($_REQUEST["start"])?$_REQUEST["start"]:"";

//Instantiate Object.
$MAP_OBJECT = new GoogleMapAPI(); $MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
$MAP_OBJECT->setDSN("mysql://user:[email protected]/db_name");

//Show directions or just marker.
$MAP_OBJECT->disableSidebar();
if( $START_ADDRESS != "" ){
$MAP_OBJECT->addDirections($START_ADDRESS, $DESTINATION_ADDRESS, $DIRECTIONS_CONTAINER_ID);
}else{
$MAP_OBJECT->addMarkerByAddress($DESTINATION_ADDRESS,"Marker in Boulder, CO", $MARKER_HTML);
}
?>
<html>
<head>
<?=$MAP_OBJECT->getHeaderJS();?>
<?=$MAP_OBJECT->getMapJS();?>
</head>
<body>
<?=$MAP_OBJECT->printOnLoad();?>
<?php if($START_ADDRESS != ""){?>
<a href='advanced_marker_directions.php'>Remove directions</a><br />
<?php } ?>

<?=$MAP_OBJECT->printMap();?>
<div id="<?=$DIRECTIONS_CONTAINER_ID?>"></div>


</body>
</html>