Subversion Repositories Applications.papyrus

Rev

Rev 1442 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1442 Rev 1455
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.1 2007-06-04 15:26:57 alexandre_tb Exp $
22
// CVS : $Id: bazar.carte_google.php,v 1.2 2007-06-13 10:02:47 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.1 $
30
*@version       $Revision: 1.2 $
31
// +------------------------------------------------------------------------------------------------------+
31
// +------------------------------------------------------------------------------------------------------+
32
*/
32
*/
Line 33... Line 33...
33
 
33
 
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
Line 67... Line 67...
67
$script = '
67
$script = '
68
    // Variables globales
68
    // Variables globales
69
    var map = null;
69
    var map = null;
70
	var lat = document.getElementById("latitude");
70
	var lat = document.getElementById("latitude");
71
    var lon = document.getElementById("longitude");
71
    var lon = document.getElementById("longitude");
-
 
72
    // Pour gerer la taille  
-
 
73
    var winW = 630, winH = 460;
-
 
74
    var deltaH = 320;
-
 
75
    var deltaW = 320;
-
 
76
    
-
 
77
    function setWinHW() {
-
 
78
	if (window.innerHeight) {
-
 
79
	    winW = window.innerWidth  - deltaW;
-
 
80
	    winH = window.innerHeight - deltaH;
-
 
81
        } else {
-
 
82
	    winW = document.documentElement.offsetWidth  - 20 - deltaW;
-
 
83
	    winH = document.documentElement.offsetHeight - 20 - deltaH ; 
-
 
84
        }
-
 
85
        
-
 
86
	var me = document.getElementById("map");
-
 
87
	if (me != null) {
-
 
88
	    me.style.width= \'\' + winW + \'px\';
-
 
89
	    me.style.height= \'\' + winH + \'px\';
-
 
90
        }
-
 
91
    }
-
 
92
 
-
 
93
    window.onresize = function () {
-
 
94
	setWinHW();
-
 
95
	if (map)  map.checkResize();
-
 
96
    }
Line 72... Line 97...
72
    
97
    
73
    function createMarker(point, chaine) {
98
    function createMarker(point, chaine) {
74
	  	var marker = new GMarker(point);
99
	  	var marker = new GMarker(point);
75
	  	GEvent.addListener(marker, "click", function() {
100
	  	GEvent.addListener(marker, "click", function() {
76
	    	marker.openInfoWindowHtml(chaine);
101
	    	marker.openInfoWindowHtml(chaine);
77
	  	});
102
	  	});
78
	  	return marker;
103
	  	return marker;
79
	}
104
	}
-
 
105
    function load() {
80
    function load() {
106
    setWinHW();
81
    if (GBrowserIsCompatible()) {
107
    if (GBrowserIsCompatible()) {
82
      map = new GMap2(document.getElementById("map"));
108
      map = new GMap2(document.getElementById("map"));
83
      map.addControl(new GSmallMapControl());
109
      map.addControl(new GSmallMapControl());
84
	  map.addControl(new GMapTypeControl());
110
	  map.addControl(new GMapTypeControl());
Line 106... Line 132...
106
 
132
 
107
 
133
 
108
/* +--Fin du code ----------------------------------------------------------------------------------------+
134
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
135
*
-
 
136
* $Log: not supported by cvs2svn $
-
 
137
* Revision 1.1  2007-06-04 15:26:57  alexandre_tb
109
*
138
* version initiale
110
* $Log: not supported by cvs2svn $
139
*
111
* +-- Fin du code ----------------------------------------------------------------------------------------+
140
* +-- Fin du code ----------------------------------------------------------------------------------------+