<?php
$project = menu_get_object();
$locationTextandLatLong = _deliver_get_project_location_and_latlong($project);
drupal_add_js('http://maps.google.com/maps/api/js?sensor=false', 'external');
?>

<!--<div id="location-text"><?php //print $locationTextandLatLong['locationtext']; ?></div>-->
<div id="map_of_project_location"><img src="/sites/all/themes/delivertheme/images/ajax_loader.gif" id="ajax_loader"></div>

<script>
mapOptions = {
	zoom: 5,
	center: new google.maps.LatLng(<?php print $locationTextandLatLong['lat'] .','. $locationTextandLatLong['long']; ?>),
	mapTypeId: google.maps.MapTypeId.ROADMAP,
};
projectMarker = new google.maps.Marker({
	position: new google.maps.LatLng(<?php print $locationTextandLatLong['lat'] .','. $locationTextandLatLong['long']; ?>),
	title: '<?php print str_replace("'", "\'", $project->title); ?>'
});
projectMap = new google.maps.Map(document.getElementById("map_of_project_location"), mapOptions);
projectMarker.setMap(projectMap);
</script>