<?php
include_once("../include/GoogleMap.php");
include_once("../include/JSMin.php");
$MAP_OBJECT = new GoogleMapAPI();
$MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
$MAP_OBJECT->setDSN("mysql://user:password@localhost/db_name");
$MAP_OBJECT->addMarkerByAddress("620 W. Colfax Ave., Denver, CO","Colfax","Near I-25 and colfax");
$MAP_OBJECT->addMarkerByAddress("Denver, CO","Marker Title", "Marker Description");
$STREETVIEW_ID = "map_streetview";
$MAP_OBJECT->enableStreetViewControls();
$MAP_OBJECT->attachStreetViewContainer($STREETVIEW_ID);
?>
<html>
<head>
<?=$MAP_OBJECT->getHeaderJS();?>
<?=$MAP_OBJECT->getMapJS();?>
<script type="text/javascript">
function loaded(){
<?=$MAP_OBJECT->printOnLoadFunction();?>();
for(i in markersmap){
google.maps.event.addListener(markersmap[i], 'click', function() {
panoramamap_streetviewmap.setPosition(this.position);
});
}
}
</script>
<style type="text/css">
#<?=$STREETVIEW_ID;?>{
width:500px;
height:300px;
}
</style>
</head>
<body onLoad='loaded();'>
<?=$MAP_OBJECT->printMap();?>
<?=$MAP_OBJECT->printSidebar();?>
<div id="<?=$STREETVIEW_ID;?>"></div>
</body>
</html>