
googleMap = true;

var map;
var baseIcon;
var gmarkers = [];
var htmls = [];
function ShowMap(){
	var bounds = new GLatLngBounds();

	map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(52.368682,4.889946), 14);
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());

	baseIcon = new GIcon();
	baseIcon.image = "../Images/Markers/marker.png";
	baseIcon.shadow = "../Images/Markers/shadow50.png";
	baseIcon.iconSize = new GSize(20, 34);
	baseIcon.shadowSize = new GSize(37, 34);
	baseIcon.iconAnchor = new GPoint(9, 34);
	baseIcon.infoWindowAnchor = new GPoint(9, 2);
	baseIcon.infoShadowAnchor = new GPoint(18, 25);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.372984,4.892998);
	bounds.extend(point);
	var marker = createMarker(point, "Dam Square", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Dam Square</b><br/>Dam Square, or simply the Dam. The town square is<br/>surrounded with notable buildings and is host to<br/>frequent events, making it one of the most well-known<br/>and important locations in the city.</p>", 1);
	gmarkers[0] = marker;
	htmls[0] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Dam Square</b><br/>Dam Square, or simply the Dam. The town square is<br/>surrounded with notable buildings and is host to<br/>frequent events, making it one of the most well-known<br/>and important locations in the city.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.363664,4.881985);
	bounds.extend(point);
	var marker = createMarker(point, "Leidse Square", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leidse Square</b><br>A popular center for nightlife, Amsterdam's Leidseplein<br/>attracts a vibrant crowd of both locals and visitors. The<br/>square boasts a large number of shops, restaurants, cafes,<br/>cinemas, a casino, theaters, live music venues &amp; nightclubs.</p>", 2);
	gmarkers[1] = marker;
	htmls[1] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Leidse Square</b><br>A popular center for nightlife, Amsterdam's Leidseplein<br/>attracts a vibrant crowd of both locals and visitors. The<br/>square boasts a large number of shops, restaurants, cafes,<br/>cinemas, a casino, theaters, live music venues &amp; nightclubs.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.365806,4.896678);
	bounds.extend(point);
	var marker = createMarker(point, "Rembrandt Square", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Rembrandt Square</b><br>A central square known as the Rembrandtplein is always<br/>bustling with activity; providing shopping, dining, and<br/>entertainment for visitors and locals alike. The square is<br/>surrounded by shops and restaurants along with a number<br/>of bars and nightclubs.</p>", 3);
	gmarkers[2] = marker;
	htmls[2] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Rembrandt Square</b><br>A central square known as the Rembrandtplein is always<br/>bustling with activity; providing shopping, dining, and<br/>entertainment for visitors and locals alike. The square is<br/>surrounded by shops and restaurants along with a number<br/>of bars and nightclubs.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.367817,4.902885);
	bounds.extend(point);
	var marker = createMarker(point, "Waterloo Square", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Waterloo Square</b><br>Traditionally a market square, the Waterlooplein is<br/>today dominated by the white building of the opera<br/>and the Town Hall.</p>", 4);
	gmarkers[3] = marker;
	htmls[3] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Waterloo Square</b><br>Traditionally a market square, the Waterlooplein is<br/>today dominated by the white building of the opera<br/>and the Town Hall.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.358593,4.880848);
	bounds.extend(point);
	var marker = createMarker(point, "Van Gogh Museum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Van Gogh Museum</b><br>The largest collection of paintings by Vincent van Gogh<br/>in the world. Provides the opportunity to track the artist’s<br/>developments and compare his paintings to works by other<br/>artists from the 19th century in the collection.</p>", 5);
	gmarkers[4] = marker;
	htmls[4] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Van Gogh Museum</b><br>The largest collection of paintings by Vincent van Gogh<br/>in the world. Provides the opportunity to track the artist’s<br/>developments and compare his paintings to works by other<br/>artists from the 19th century in the collection.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.375272,4.884163);
	bounds.extend(point);
	var marker = createMarker(point, "The Anne Frank House & Museum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Anne Frank House & Museum</b><br>The Anne Frank House and museum is dedicated to Jewish<br/>wartime diarist Anne Frank. As well as the preservation of<br/>the hiding place and an exhibition on the life and times of<br/>Anne Frank, the museum acts as an exhibition space to<br/>highlight all forms of persecution and discrimination.</p>", 6);
	gmarkers[5] = marker;
	htmls[5] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Anne Frank House & Museum</b><br>The Anne Frank House and museum is dedicated to Jewish<br/>wartime diarist Anne Frank. As well as the preservation of<br/>the hiding place and an exhibition on the life and times of<br/>Anne Frank, the museum acts as an exhibition space to<br/>highlight all forms of persecution and discrimination.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.357951,4.891384);
	bounds.extend(point);
	var marker = createMarker(point, "The Heineken Experience", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Heineken Experience</b><br>The original Heineken brewery in Amsterdam. Located at one of<br/>the most impressive industrial heritage sites of the Netherlands.<br/>You'll experience Heineken's rich history and the tradition and<br/>craft of brewing, along with the extraordinary story of the people<br/>behind this remarkable company, now the most international of<br/>its kind in the world.</p>", 7);
	gmarkers[6] = marker;
	htmls[6] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>The Heineken Experience</b><br>The original Heineken brewery in Amsterdam. Located at one of<br/>the most impressive industrial heritage sites of the Netherlands.<br/>You'll experience Heineken's rich history and the tradition and<br/>craft of brewing, along with the extraordinary story of the people<br/>behind this remarkable company, now the most international of<br/>its kind in the world.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.358874,4.885043);
	bounds.extend(point);
	var marker = createMarker(point, "Rijksmuseum", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Rijksmuseum</b><br>The Rijksmuseum (State Museum) is a Dutch national museum,<br/>located on the Museumplein. Founded in 1800 the museum is<br/>dedicated to arts, crafts, and history. It has a large collection<br/>of paintings from the Dutch Golden Age and a substantial<br/>collection of Asian art.</p>", 8);
	gmarkers[7] = marker;
	htmls[7] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Rijksmuseum</b><br>The Rijksmuseum (State Museum) is a Dutch national museum,<br/>located on the Museumplein. Founded in 1800 the museum is<br/>dedicated to arts, crafts, and history. It has a large collection<br/>of paintings from the Dutch Golden Age and a substantial<br/>collection of Asian art.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.366874,4.912289);
	bounds.extend(point);
	var marker = createMarker(point, "Artis Zoo", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Artis Zoo</b><br>Artis is the oldest zoo in the Netherlands, founded in 1838.<br/>The zoo houses around 700 species of animals to provide<br/>a magnificent overview of the entire animal kingdom. Artis<br/>is also a botanical garden containing a diversity of plants,<br/>trees and shrubs from all over the world.</p>", 9);
	gmarkers[8] = marker;
	htmls[8] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Artis Zoo</b><br>Artis is the oldest zoo in the Netherlands, founded in 1838.<br/>The zoo houses around 700 species of animals to provide<br/>a magnificent overview of the entire animal kingdom. Artis<br/>is also a botanical garden containing a diversity of plants,<br/>trees and shrubs from all over the world.</p>";
	map.addOverlay(marker);

	var icon = new GIcon(baseIcon);
	var point = new GLatLng(52.357666,4.864878);
	bounds.extend(point);
	var marker = createMarker(point, "Vondel Park", "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Vondel Park</b><br>The largest city park in Amsterdam, and the most famous<br/>park in the Netherlands, which welcomes about 10 million<br/>visitors every year.</p>", 10);
	gmarkers[9] = marker;
	htmls[9] = "<p style='font-size: smaller; padding: 0; margin: 0;'><b>Vondel Park</b><br>The largest city park in Amsterdam, and the most famous<br/>park in the Netherlands, which welcomes about 10 million<br/>visitors every year.</p>";
	map.addOverlay(marker);


}

function createMarker(point, title, text, index){
	var icon = new GIcon(baseIcon);
	icon.image = "../images/icons/" + index + ".png";
	var marker = new GMarker(point, icon);
	marker.title = "" + title + "";
	GEvent.addListener(marker, "click", function() {
	  marker.openInfoWindowHtml("" + text + "");
	});
	return marker;
}

function myclick(i) {
	gmarkers[i].openInfoWindowHtml(htmls[i]);
}
