// google singapore map
gothere.load("maps");
function initialize() {
	if (GBrowserIsCompatible()) {
		// Create the Gothere map object.
		var map = new GMap2(document.getElementById("map"));
		// Set the center of the map.
		map.setCenter(new GLatLng(1.362083, 103.819836), 11);
		// Add zoom controls on the top left of the map.
		map.addControl(new GSmallMapControl());
		// Add a scale bar at the bottom left of the map.
		map.addControl(new GScaleControl());
		
		// Create a new base icon for our custom markers.
		var baseIcon = new GIcon();
		baseIcon.image = "http://www.google.com/mapfiles/markerA.png";
		baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
		baseIcon.iconSize = new GSize(20, 34);
		baseIcon.shadowSize = new GSize(37, 34);
		baseIcon.iconAnchor = new GPoint(9, 34);
		baseIcon.infoWindowAnchor = new GPoint(5, 29);
		
		var locations = [
			["<b>Bugis Junction</b><p>230 Victoria Street #02-10A<br>Parco Bugis Junction<br>Singapore 188024</p>", [1.299402, 103.855666]],
			["<b>Causeway Point</b><p>1 Woodlands Square<br>#02-12 Causeway Point S.C.<br>Singapore 738099</p>", [1.436092, 103.785906]],
			["<b>Compass Point</b><p>No. 1 Sengkang Square<br>#02-19/20 Compass Point<br>Singapore 738099</p>", [1.392030, 103.894994]],
			["<b>Heeren</b><p>No. 260 Orchard Road<br>#03-05 The Heeren<br>Singapore 238855</p>", [1.302655, 103.837393]],
			["<b>Junction 8</b><p>9 Bishan Place #02-27<br>Junction 8 Shopping Centre<br>Singapore 579837</p>", [1.350644, 103.848775]],
			["<b>Jurong Point</b><p>#02-22/23 Jurong Point S.C.<br>Singapore 648886</p>", [1.339891, 103.706690]],
			["<b>Lot One Shopper's Mall</b><p>21 Choa Chu Kang Avenue 4<br>#02-13<br>Singapore 689812</p>", [1.385180, 103.745060]],
			["<b>Orchard Central</b><p>181 Orchard Road<br>#03-03/04 Orchard Central<br>Singapore 238896</p>", [1.303132, 103.835307]],
			["<b>Orchard ION</b><p>2 Orchard Turn<br>#03-26 ION Orchard<br>Singapore 238801</p>", [1.302760, 103.833731]],
			["<b>Queensway</b><p>1 Queensway, #01-57k<br>Queensway Shopping Centre<br>Singapore 149053</p>", [1.287361, 103.803109]],
			//["<b>Suntec City</b><p>3 Temasek Boulevard<br>Suntec City Mall #02-114<br>Singapore 083983</p>", [1.293061, 103.857087]],
			["<b>Serangoon Nex</b><p>23 Serangoon Central<br>#01-06<br>Singapore 556083</p>", [1.351107, 103.872793]],
			["<b>Tampines Mall</b><p>#02-22 Tampines Mall<br>Singapore 529510</p>", [1.352602, 103.944635]],
			["<b>Vivo City</b><p>1 Harbourfront Walk<br>#02-59 Vivo City<br>Singapore 099253</p>", [1.264424, 103.822533]],
			//["<b>West Mall</b><p>1 Bukit Batok Central Link<br>#01-06 West Mall S.C.<br>Singapore 658713", [1.350038, 103.749182]],
		];
		// Create a marker for each location.
		for (var i = 0, n = locations.length; i < n; i++) {
			var location = locations[i];
			// Create an icon for this particular location.
			var customIcon = new GIcon(baseIcon);
			var letter = String.fromCharCode("A".charCodeAt(0) + i);
			customIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
			var marker = new GMarker(new GLatLng(location[1][0], location[1][1]), {icon:customIcon});
			map.addOverlay(marker);
			// Show an infowindow when the marker is clicked.
			//marker.bindInfoWindow("<h4>" + location[0] + "</h4>");
			marker.bindInfoWindow(location[0]);
		}
	  }
}
gothere.setOnLoadCallback(initialize);
