function initialize(eventCenter, overlay, requestId) { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(52.0912623, 5.1227478), 12); map.addControl(new GSmallMapControl()); //map.addControl(new GMapTypeControl()); // Add markers to the map at event locations if checked in ui var f = document.forms["cat_control"]; var f2 = document.forms["cat_control_people"]; //crew - shop if(overlay == 1) { for (id in vipbusPeople) { var point = new GLatLng(vipbusPeople[id].lat, vipbusPeople[id].lng); if(f2.elements["passie"].checked && vipbusPeople[id].cat == 6) { map.addOverlay(createMarkerPeople(point, 6, vipbusPeople[id].name, vipbusPeople[id].descr, vipbusPeople[id].int_url, vipbusPeople[id].url)); } if(f2.elements["gastro"].checked && vipbusPeople[id].cat == 7) { map.addOverlay(createMarkerPeople(point, 7, vipbusPeople[id].name, vipbusPeople[id].descr, vipbusPeople[id].int_url, vipbusPeople[id].url)); } } } //kaart voor single evenement else if(overlay == 2) { for (id in vipbusEvents) { if (vipbusEvents[id].id == requestId) { if(vipbusEvents[id].cal == "true") map.setCenter(new GLatLng(vipbusEvents[id].lat, vipbusEvents[id].lng), 15); var point = new GLatLng(vipbusEvents[id].lat, vipbusEvents[id].lng); if(vipbusEvents[id].cal != "true") map.addOverlay(createMarker(point, vipbusEvents[id].cat, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } } } else { //hoofdkaart op homepage for (id in vipbusEvents) { var point = new GLatLng(vipbusEvents[id].lat, vipbusEvents[id].lng); if(f.elements["people"].checked && vipbusEvents[id].cat == 1 && vipbusEvents[id].cal != "true" && vipbusEvents[id].history != "true") { map.addOverlay(createMarker(point, 1, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } if(f.elements["philo"].checked && vipbusEvents[id].cat == 3 && vipbusEvents[id].cal != "true" && vipbusEvents[id].history != "true") { map.addOverlay(createMarker(point, 3, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } if(f.elements["products"].checked && vipbusEvents[id].cat == 2 && vipbusEvents[id].cal != "true" && vipbusEvents[id].history != "true") { map.addOverlay(createMarker(point, 2, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } if(f.elements["places"].checked && vipbusEvents[id].cat == 5 && vipbusEvents[id].cal != "true" && vipbusEvents[id].history != "true") { map.addOverlay(createMarker(point, 5, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } if(f.elements["projects"].checked && vipbusEvents[id].cat == 4 && vipbusEvents[id].cal != "true" && vipbusEvents[id].history != "true") { map.addOverlay(createMarker(point, 4, vipbusEvents[id].name, vipbusEvents[id].date, vipbusEvents[id].time, vipbusEvents[id].descr, vipbusEvents[id].location, vipbusEvents[id].id)); } } if (eventCenter > 0) { for (id in vipbusEvents) { if (vipbusEvents[id].id == requestId && vipbusEvents[id].cal != "true") map.setCenter(new GLatLng(vipbusEvents[id].lat, vipbusEvents[id].lng), 14); } } } } }