Subversion Repositories Applications.bazar

Rev

Rev 411 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 411 Rev 416
Line 46... Line 46...
46
		if ($GLOBALS['pas_de_carte']) return;
46
		if ($GLOBALS['pas_de_carte']) return;
47
		$html = '';
47
		$html = '';
48
		$val = $this->options['nom_bdd'];
48
		$val = $this->options['nom_bdd'];
49
    	$script = '
49
    	$script = '
50
    // Variables globales
50
    // Variables globales
-
 
51
    // cette fonction peut déjà être présente
-
 
52
	if (typeof(addListener) != \'function\') {
-
 
53
		// fonction portable pour ajout de listeners
-
 
54
		function addListener(element, baseName, handler)
-
 
55
		{
-
 
56
			if (element.addEventListener) {
-
 
57
				element.addEventListener(baseName, handler, false) ;
-
 
58
			} else if (element.attachEvent) {
-
 
59
				element.attachEvent(\'on\'+baseName, handler) ;
-
 
60
			}
-
 
61
		}
-
 
62
	}
51
    var map = null;
63
    var map = null;
-
 
64
    addListener(window,\'load\',loadMap) ;	
52
	var geocoder = null;
65
	var geocoder = null;
53
	var lat = document.getElementById("latitude");
66
	var lat = document.getElementById("latitude");
54
    var lon = document.getElementById("longitude");
67
    var lon = document.getElementById("longitude");
Line 55... Line 68...
55
    
68
    
Line 72... Line 85...
72
  }
85
  }
73
};' ;
86
};' ;
74
    	GEN_stockerCodeScript($script);
87
    	GEN_stockerCodeScript($script);
75
    	GEN_stockerFichierScript('googleMapScript', $this->options['nom_bdd']);
88
    	GEN_stockerFichierScript('googleMapScript', $this->options['nom_bdd']);
76
    	// On ajoute l attribut load a la balise body
89
    	// On ajoute l attribut load a la balise body
77
		GEN_AttributsBody('onload', 'load()');
90
		//GEN_AttributsBody('onload', 'load()');
78
		$html = '<div id="map" style="width: 400px; height: 300px"></div>';
91
		$html = '<div id="map" style="width: 400px; height: 300px"></div>';
79
		return $html;
92
		return $html;
80
	}
93
	}
81
}
94
}