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 34... Line 34...
34
*/
34
*/
Line 35... Line 35...
35
 
35
 
36
$script = '
36
$script = '
37
    // Variables globales
37
    // Variables globales
-
 
38
    var map = null;
-
 
39
    // Variables globales
-
 
40
    // cette fonction peut déjà être présente
-
 
41
	if (typeof(addListener) != \'function\') {
-
 
42
		// fonction portable pour ajout de listeners
-
 
43
		function addListener(element, baseName, handler)
-
 
44
		{
-
 
45
			if (element.addEventListener) {
-
 
46
				element.addEventListener(baseName, handler, false) ;
-
 
47
			} else if (element.attachEvent) {
-
 
48
				element.attachEvent(\'on\'+baseName, handler) ;
-
 
49
			}
-
 
50
		}
-
 
51
	}
-
 
52
    addListener(window,\'load\',loadMap) ;
38
    var map = null;
53
    //var isMap = true ;		
39
	var geocoder = null;
54
	var geocoder = null;
40
	var lat = document.getElementById("latitude");
55
	var lat = document.getElementById("latitude");
Line 41... Line 56...
41
    var lon = document.getElementById("longitude");
56
    var lon = document.getElementById("longitude");
42
    
57
    
43
    function load() {
58
    function loadMap() {
-
 
59
    if (GBrowserIsCompatible()) {
44
    if (GBrowserIsCompatible()) {
60
      map = new GMap2(document.getElementById("map"));
45
      map = new GMap2(document.getElementById("map"));
61
      map.setMapType(G_HYBRID_MAP) ;
46
      map.addControl(new GSmallMapControl());
62
      map.addControl(new GSmallMapControl());
47
	  map.addControl(new GMapTypeControl());
63
	  map.addControl(new GMapTypeControl());
Line 48... Line 64...
48
	  map.addControl(new GScaleControl());
64
	  map.addControl(new GScaleControl());
49
	  map.enableContinuousZoom();
65
	  map.enableContinuousZoom();
50
	
66
	
51
	  // On centre la carte sur le languedoc roussillon
67
	  // On centre la carte sur le languedoc roussillon
52
	  center = new GLatLng(43.84245116699036, 3.768310546875);
68
	  center = new GLatLng(47.0833015, 2.4000001);
53
      map.setCenter(center, 7);
69
      map.setCenter(center, 6);
54
	  //marker = new GMarker(center, {draggable: true}) ;
70
	  //marker = new GMarker(center, {draggable: true}) ;
55
      GEvent.addListener(map, "click", function(marker, point) {
71
      GEvent.addListener(map, "click", function(marker, point) {