Subversion Repositories Applications.bazar

Rev

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

Rev 471 Rev 476
Line 47... Line 47...
47
		if ($GLOBALS['pas_de_carte']) return;
47
		if ($GLOBALS['pas_de_carte']) return;
48
		$html = '';
48
		$html = '';
49
		$val = $this->options['nom_bdd'];
49
		$val = $this->options['nom_bdd'];
50
    	$script = '
50
    	$script = '
51
    // Variables globales
51
    // Variables globales
52
    // cette fonction peut déjà être présente
52
    // cette fonction peut d�j� �tre pr�sente
53
	if (typeof(addListener) != \'function\') {
53
	if (typeof(addListener) != \'function\') {
54
		// fonction portable pour ajout de listeners
54
		// fonction portable pour ajout de listeners
55
		function addListener(element, baseName, handler)
55
		function addListener(element, baseName, handler)
56
		{
56
		{
57
			if (element.addEventListener) {
57
			if (element.addEventListener) {
Line 71... Line 71...
71
	var point =  new google.maps.LatLng('.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_latitude'].', '.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_longitude'].');
71
	var point =  new google.maps.LatLng('.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_latitude'].', '.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_longitude'].');
72
	var optionsGoogleMapsv3 = {
72
	var optionsGoogleMapsv3 = {
73
		// On centre la carte sur le languedoc roussillon
73
		// On centre la carte sur le languedoc roussillon
74
		center: point,
74
		center: point,
75
		zoom: 7,
75
		zoom: 7,
-
 
76
		mapTypeId: "OSM",
-
 
77
		mapTypeControlOptions: {
-
 
78
			mapTypeIds: ["OSM", 
-
 
79
				google.maps.MapTypeId.ROADMAP,
76
		mapTypeId: google.maps.MapTypeId.G_HYBRID_MAP,
80
				google.maps.MapTypeId.HYBRID,
-
 
81
				google.maps.MapTypeId.SATELLITE,
-
 
82
				google.maps.MapTypeId.TERRAIN]
-
 
83
		},
77
		mapTypeControl: true,
84
		mapTypeControl: true,
78
		scaleControl: true
85
		scaleControl: true
79
	};
86
	};
80
        map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3);
87
	map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3);
-
 
88
	map.mapTypes.set("OSM", new google.maps.ImageMapType({
-
 
89
		getTileUrl: function(coord, zoom) {
-
 
90
 			return "http://osm.tela-botanica.org/tile/" + // cache de tuiles avec nginx
-
 
91
 			zoom + "/" + coord.x + "/" + coord.y + ".png";
-
 
92
 		},
-
 
93
 		tileSize: new google.maps.Size(256, 256),
-
 
94
 		isPng: true,
-
 
95
 		alt: "OpenStreetMap",
-
 
96
 		name: "OSM",
-
 
97
		maxZoom: 19
-
 
98
	}));
Line 81... Line 99...
81
 
99
 
82
	marker = new google.maps.Marker({
100
	marker = new google.maps.Marker({
83
	position: point,
101
	position: point,
84
		map: map
102
		map: map