// icones :
var iconvert = new GIcon(); 
    iconvert.image = 'img/marqueur_vert.gif';
    iconvert.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconvert.iconSize = new GSize(28, 40);
    iconvert.shadowSize = new GSize(0, 0);
    iconvert.iconAnchor = new GPoint(28, 30);
    iconvert.infoWindowAnchor = new GPoint(5, 1);

var iconblanc = new GIcon(); 
    iconblanc.image = 'img/marqueur_blanc.gif';
    iconblanc.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconblanc.iconSize = new GSize(28, 40);
    iconblanc.shadowSize = new GSize(0, 0);
    iconblanc.iconAnchor = new GPoint(28, 30);
    iconblanc.infoWindowAnchor = new GPoint(5, 1);

var customIcons = [];
customIcons["marqueur_vert"] = iconvert;
customIcons["marqueur_blanc"] = iconblanc;






var markers = Array();
var markersCount=0;

function gm_load(div) {
   	var map = new GMap2(document.getElementById(div));
}

function setCentre(glatlng){
	centre = glatlng;
	map.setCenter(glatlng, zoom);
	loadXmlFile();
}

function setZoom(z){
	zoom = z;
}


function createMarker(point, texte, type) {
    var marker = new GMarker(point, customIcons[type]);
    GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(texte);
    });
	return marker;
}



function addMarker(glatlng){
	m = new GMarker(glatlng,iconvert);
	map.addOverlay(m);
}


function getCoordAndFunc(adresse,callback){
	geocode = new GClientGeocoder();
	geocode.getLatLng(adresse, callback);
}

