/**
 * Markante punten rondom Cadier en Keer
 */
 
/**
 * The markers array.
 * @type {Object}
 */
var markers = [
  	{
      'name': 'bijenweide',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=9\">Foto\'s bijenweide<\/a>',
      'location': [50.82001412185781, 5.77724641922103]
    },
    {
      'name': 'de Fontein',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=10\">Foto\'s de Fontein<\/a>',
      'location': [50.82018944704246, 5.758323857196569]
    },
    {
      'name': 'Julianagroeve',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=12\">Foto\'s de Julianagroeve<\/a>',
      'location': [50.83081974516552, 5.779640870052077]
    },
    {
      'name': 'Orenberg',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=14\">Foto\'s de Orenberg<\/a>',
      'location': [50.82441428276758, 5.764050194269967]
    },
    {
      'name': 'Schiepersberg',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=15\">Foto\'s de Schiepersberg<\/a>',
      'location': [50.82679549489133, 5.786746181596286]
    },
    {
      'name': 'waterput groeve het Rooth',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=25\">Foto\'s waterput groeve \'t Rooth<\/a>',
      'location': [50.8395936356729, 5.773212947035532]
    },
    {
      'name': 'Wolfskop',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=16\">Foto\'s Wolfskop<\/a>',
      'location': [50.82024328044601, 5.777398078748291]
    },
    {
      'name': 'Kalkoven',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=21\">Foto\'s Kalkoven<\/a>',
      'location': [50.840653, 5.770694]
    },
		{
      'name': 'De Beuk boswachterswoning',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=17\">Foto\'s De Beuk boswachterswoning<\/a>',
      'location': [50.815164,5.741932]
    },
		{
      'name': 'Heerderberg',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=11\">Foto\'s Heerderberg<\/a>',
      'location': [50.831386078016564,5.7480838894844055]
    },
    {
      'name': 'Koeberg',
      'tekst': '<a href=\"index.php?topic=mi_fotos&onderwerp=13\">Foto\'s Koeberg<\/a>',
      'location': [50.83197780000001,5.777564]
    }
    
];

  			
/**
 * Initializes the map and listeners.
 */
function laadmap() 
{

var cadier = new google.maps.LatLng(50.827872, 5.768786);

  map = new google.maps.Map(document.getElementById('google_map'), 
  {
    center: cadier,
    zoom: 13,
    mapTypeId: 'terrain'
  });
  
//  var bikeLayer = new google.maps.BicyclingLayer();
//	bikeLayer.setMap(map);

  // Prepares the marker object, creating a google.maps.Marker object for each
  // location, place and country
  
  var aantal = markers.length;
  var punten = new Array(aantal);

	
		var info = new google.maps.InfoWindow(
		{
			content: 'onbekend',
			position: cadier
		});

    for (var i = 0; i < aantal; i++) 
    {		
				punten[i] = new google.maps.Marker(
				{
      		position: new google.maps.LatLng(markers[i].location[0], markers[i].location[1]), 
      		map: map, 
      		title: markers[i].name,
          clickable: true,
          html: markers[i].tekst,
          icon: 'images/google/vtnflag.png'
  			}); 
      			
  			google.maps.event.addListener(punten[i], 'mouseover', function()
  			{
	  			var tekst = '<div id=\"google_info\"><b>' + this.title + '</b><br/>' + this.html + '</div>';
  			
  				info.setContent(tekst);
					info.open(map, this);
  			});

  			google.maps.event.addListener(punten[i], 'click', function()
  			{
	  			var tekst = '<div id=\"google_info\"><b>' + this.title + '</b><br/>' + this.html + '</div>';
  			
  				info.setContent(tekst);
					info.open(map, this);
  			});
			
    }

  
}


function laadmaprt() 
{
    var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
    var myOptions = {
      zoom: 4,
      center: myLatlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("google_map"), myOptions);
    
    var marker = new google.maps.Marker({
        position: myLatlng, 
        map: map,
        title:"Hello World!"
    });   
  }

