Subversion Repositories Applications.bazar

Rev

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

Rev 349 Rev 356
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: bazar.carte_google.php,v 1.6 2007-12-04 16:20:23 jp_milcent Exp $
22
// CVS : $Id: bazar.carte_google.php,v 1.7 2007-12-14 09:59:15 alexandre_tb Exp $
23
/**
23
/**
24
* 
24
* 
25
*@package bazar
25
*@package bazar
26
//Auteur original :
26
//Auteur original :
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
28
//Autres auteurs :
28
//Autres auteurs :
29
*@copyright     Tela-Botanica 2000-2007
29
*@copyright     Tela-Botanica 2000-2007
30
*@version       $Revision: 1.6 $
30
*@version       $Revision: 1.7 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
Line 98... Line 98...
98
 
98
 
99
$script = '
99
$script = '
100
    // Variables globales
100
    // Variables globales
101
    var map = null;
101
    var map = null;
102
	var lat = document.getElementById("latitude");
102
	var lat = document.getElementById("latitude");
-
 
103
    var lon = document.getElementById("longitude");';
103
    var lon = document.getElementById("longitude");
104
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
104
    // Pour gerer la taille  
105
    // Pour gerer la taille  
105
    var winW = 630, winH = 560;
106
    var winW = 630, winH = 560;
106
    var deltaH = 220;
107
    var deltaH = 220;
Line 123... Line 124...
123
    }
124
    }
Line 124... Line 125...
124
 
125
 
125
    window.onresize = function () {
126
    window.onresize = function () {
126
	setWinHW();
127
	setWinHW();
127
	if (map)  map.checkResize();
128
	if (map)  map.checkResize();
-
 
129
    }';
Line 128... Line 130...
128
    }
130
$script .= '
129
    
131
    
130
    function createMarker(point, chaine) {
132
    function createMarker(point, chaine) {
131
	  	var icon = new GIcon();
133
	  	var icon = new GIcon();
Line 139... Line 141...
139
	  	GEvent.addListener(marker, "click", function() {
141
	  	GEvent.addListener(marker, "click", function() {
140
	    	marker.openInfoWindowHtml(chaine);
142
	    	marker.openInfoWindowHtml(chaine);
141
	  	});
143
	  	});
142
	  	return marker;
144
	  	return marker;
143
	}
145
	}
144
    function load() {
146
    function load() {';
-
 
147
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
145
    setWinHW();
148
    setWinHW();';
-
 
149
$script .= '
146
    if (GBrowserIsCompatible()) {
150
    if (GBrowserIsCompatible()) {
147
      map = new GMap2(document.getElementById("map"));
151
      map = new GMap2(document.getElementById("map"));
148
      map.addControl(new GSmallMapControl());
152
      map.addControl(new GSmallMapControl());
149
	  map.addControl(new GMapTypeControl());
153
	  map.addControl(new GMapTypeControl());
150
	  map.addControl(new GScaleControl());
154
	  map.addControl(new GScaleControl());
Line 168... Line 172...
168
function afficherContenuCorps() {
172
function afficherContenuCorps() {
Line 169... Line 173...
169
	
173
	
170
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
174
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
171
    $modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
175
    $modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
172
    $html = $modele->getTemplate(BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE, $GLOBALS['_BAZAR_']['langue']);
176
    $html = $modele->getTemplate(BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE, $GLOBALS['_BAZAR_']['langue']);
-
 
177
	$res = str_replace ('{CARTE}', '<div id="map" style="width: '.BAZ_GOOGLE_IMAGE_LARGEUR.
Line 173... Line 178...
173
	$res = str_replace ('{CARTE}', '<div id="map" style="width: 600px; height: 450px"></div>', $html);
178
							'px; height: '.BAZ_GOOGLE_IMAGE_HAUTEUR.'px"></div>', $html);
174
 
179
 
Line 175... Line 180...
175
	return $res;
180
	return $res;
176
}
181
}
177
 
182
 
-
 
183
 
-
 
184
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
185
*
178
 
186
* $Log: not supported by cvs2svn $
179
/* +--Fin du code ----------------------------------------------------------------------------------------+
187
* Revision 1.6  2007-12-04 16:20:23  jp_milcent
180
*
188
* Fusion avec la livraison AHA : 4 décembre 2007
181
* $Log: not supported by cvs2svn $
189
*
182
* Revision 1.5.2.1  2007-12-04 16:19:32  jp_milcent
190
* Revision 1.5.2.1  2007-12-04 16:19:32  jp_milcent