// Find the map div
var map_container = document.getElementById('map');

// Find the static map tile and remove it
var static_map = map_container.getElementsByTagName('img')[0];
static_map.parentNode.removeChild(static_map);

// Geocode the address
var geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'address': 'Thornhill, UK'}, function(results, status) {
	if (status == google.maps.GeocoderStatus.OK) {

		// Set up our map options
		var opts = {
			zoom: 16,
			center: new google.maps.LatLng(55.240937,-3.765741),
			disableDefaultUI: true,
			mapTypeId: google.maps.MapTypeId.ROADMAP
		};

		// Create the map
		var map = new google.maps.Map(map_container, opts);

		// Add the marker
		var myLatlng = new google.maps.LatLng(55.240937,-3.765741);
		var marker = new google.maps.Marker({
			position: myLatlng,
			color: 0x8FB209,
			map: map, 
			title: "Sensor Studios"
		});
	}
});
