Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 354 → Rev 355

/branches/livraison_aha/bazar.carte_google.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.carte_google.php,v 1.5.2.1 2007-12-04 16:19:32 jp_milcent Exp $
// CVS : $Id: bazar.carte_google.php,v 1.5.2.2 2007-12-14 09:57:15 alexandre_tb Exp $
/**
*
*@package bazar
27,7 → 27,7
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2007
*@version $Revision: 1.5.2.1 $
*@version $Revision: 1.5.2.2 $
// +------------------------------------------------------------------------------------------------------+
*/
 
100,12 → 100,13
// Variables globales
var map = null;
var lat = document.getElementById("latitude");
var lon = document.getElementById("longitude");
var lon = document.getElementById("longitude");';
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
// Pour gerer la taille
var winW = 630, winH = 560;
var deltaH = 220;
var deltaW = 270;
 
function setWinHW() {
if (window.innerHeight) {
winW = window.innerWidth - deltaW;
114,7 → 115,7
winW = document.documentElement.offsetWidth - 20 - deltaW;
winH = document.documentElement.offsetHeight - 20 - deltaH ;
}
 
var me = document.getElementById("map");
if (me != null) {
me.style.width= \'\' + winW + \'px\';
125,7 → 126,8
window.onresize = function () {
setWinHW();
if (map) map.checkResize();
}
}';
$script .= '
function createMarker(point, chaine) {
var icon = new GIcon();
141,8 → 143,10
});
return marker;
}
function load() {
setWinHW();
function load() {';
if (BAZ_GOOGLE_MAXIMISE_TAILLE) $script .= '
setWinHW();';
$script .= '
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
170,7 → 174,8
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']);
$html = $modele->getTemplate(BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE, $GLOBALS['_BAZAR_']['langue']);
$res = str_replace ('{CARTE}', '<div id="map" style="width: 600px; height: 450px"></div>', $html);
$res = str_replace ('{CARTE}', '<div id="map" style="width: '.BAZ_GOOGLE_IMAGE_LARGEUR.
'px; height: '.BAZ_GOOGLE_IMAGE_HAUTEUR.'px"></div>', $html);
 
return $res;
}
179,6 → 184,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5.2.1 2007-12-04 16:19:32 jp_milcent
* Ajout de la prise en charge de l'applette body_attributs
*
* Revision 1.5 2007-10-01 12:07:03 alexandre_tb
* utilisation de constantes du fichier de conf pour centrer la carte
*