var path2img='/'; // lang=en var projects = [ // titre, x,y, z-index, path to picture, url ['Health in Bangladesh', 23.37, 90.5, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=132:health-bangladesh&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''], ['Health in Burkina Faso', 12.2, -1.37, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=136:health-burkina-faso&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''], ['Health in Haiti', 18.9, -71, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=142:health-haiti&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''], ['Health in El Salvador', 13.65, -87.9, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=145:health-salvador&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''], ['Health in Madagascar', -18.77, 46.87, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=168:health-madagascar&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''], ['Health in Tanzania', -6.36, 34.88, 1, '',0,0, '../index.php?option=com_weblinks&view=weblink&id=169:health-tanzania&catid=546:nos-actions-dans-le-monde-en&task=weblink.go', ''] ]; function initialize() { var myOptions = { zoom: 2, center: new google.maps.LatLng(25, -8), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); setMarkers(map, projects); } window.onload = function(){ initialize(); } // ---------------------------------------------------------------------------------------------------------------------------------- function setMarkers(map, locations) { // Add markers to the map var image = new google.maps.MarkerImage(path2img+'images/stories/icons/gmap-marker.png', new google.maps.Size(31, 50), // This marker is 20 pixels wide by 32 pixels tall. new google.maps.Point(0,0), // origin for this image new google.maps.Point(15, 46)); // anchor for this image var shadow = new google.maps.MarkerImage(path2img+'images/stories/icons/gmap-shadow.png', new google.maps.Size(31, 29), new google.maps.Point(0,0), new google.maps.Point(1, 26)); var shape = { coord: [15,0, 0,9, 0,22, 10,31, 15,50, 21,31, 29,22, 30,9, 15,0], // Shapes define the clickable region of the icon. type: 'poly' }; for (var i = 0; i < projects.length; i++) { var project = projects[i]; var myLatLng = new google.maps.LatLng(project[1], project[2]); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, shape: shape, zIndex: project[3] }); titre=project[0]; imgpath=project[4]; iWidth=project[5]; iHeight=project[6]; url=project[7]; text=project[8]; var contentString='
' +'' +'' +'

'+titre+'

' +'' +'
' +'

'+text+'

' +'
'; MarkerAttach(marker, contentString); } function MarkerAttach(marker, content) { var infowindow=new google.maps.InfoWindow({ content: content /*, maxWidth: 250*/ }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); infowindow.setZIndex(999); }); } }