Example #1
0
?>
	
	<div class="row">
		<div class="col-xs-12">
			<h2><?php 
echo $box->getAttributeLabel('location');
?>
</h2>
			<div id="map" style="width: 100%; height: 250px;"></div>
			<script src="https://maps.googleapis.com/maps/api/js?v=3&libraries=geometry"></script> 
		</div>
	</div>

</div>
<?php 
View::beginJS();
?>
<script>
	/* Google Maps */
	var element = document.getElementById("map");
	var mapTypeIds = ["OSM"];
    for(var type in google.maps.MapTypeId)
        mapTypeIds.push(google.maps.MapTypeId[type]);
	var map = new google.maps.Map(element, {
	    zoom: 8,
	    streetViewControl: false,
	    mapTypeId: "OSM",
        mapTypeControlOptions: {
            mapTypeIds: mapTypeIds
        }
	});