﻿//JScript Google Map
function createMarker(point,text) 
{
  var marker = new GMarker(point);
  GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(text); });
  return marker;    //Fonction qui affiche l'info bulle légende sur le marqueur
}

function load() 
{
  if (GBrowserIsCompatible()) 
  {
    //javascript:void(prompt('',gApplication.getMap().getCenter()));
    //Utiliser la ligne de commande ci-dessus dans google map pour obtenir la longitude et latitude d'une adresse
    
    var Lat=25.79423064944907                                  //Rentrez ici votre longitude
	var Lng=-80.37265062332153                                  //Rentrez ici votre lattitude
	var Zoom=14                                                 //Rentrez ici le zoom  entre 1 et 16
	var TextAffiche="<b>Comtech Imp Exp LLC</b><br>" +
	                "10900 NW 21 street, Unit 130<br>" +
                    "Miami, FL 33172, United States<br><br>" +
                    "Off.: 305-278-2224<br>" +
                    "Mob.: 305-343-4970<br>" +
                    "E-mail: <a href='mailto:info@comtechllc.us'>info@comtechllc.us</a>";
	
	var map = new GMap2(document.getElementById('g_map'));      //Affiche le module
	    
                                                    //49.891235,-97.15369
	map.setCenter(new GLatLng(Lat,Lng),Zoom );      //Affiche la carte au lieu précis (centrer)
	map.setCenter(point,Zoom );      //Affiche la carte au lieu précis (centrer)
	map.addControl(new GSmallMapControl());         //Affiche le curseur de zoom
	map.addControl(new GMapTypeControl());          //Affiche le curseur de déplacement
	 
	var point = new GLatLng(Lat,Lng);
	var marker = createMarker(point,TextAffiche);
	map.addOverlay(marker);                         
	marker.openInfoWindowHtml(TextAffiche);         //Toujours afficher l'info-Bulle
	
  }
}

