| Line 33... |
Line 33... |
| 33 |
<!-- Javascript : appli carto -->
|
33 |
<!-- Javascript : appli carto -->
|
| 34 |
<script type="text/javascript">
|
34 |
<script type="text/javascript">
|
| 35 |
//<![CDATA[
|
35 |
//<![CDATA[
|
| 36 |
var pointImageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png';
|
36 |
var pointImageUrl = 'http://chart.apis.google.com/chart?cht=mm&chs=24x32&chco=FFFFFF,008CFF,000000&ext=.png';
|
| 37 |
var pointsOrigine = null;
|
37 |
var pointsOrigine = null;
|
| - |
|
38 |
var boundsOrigine = null;
|
| 38 |
var markerClusterer = null;
|
39 |
var markerClusterer = null;
|
| 39 |
var map = null;
|
40 |
var map = null;
|
| 40 |
var nt = '<?=$num_taxon?>';
|
41 |
var nt = '<?=$num_taxon?>';
|
| 41 |
var infoBulle = new google.maps.InfoWindow();
|
42 |
var infoBulle = new google.maps.InfoWindow();
|
| 42 |
google.maps.event.addListener(infoBulle, 'domready', function() {
|
43 |
google.maps.event.addListener(infoBulle, 'domready', function() {
|
| Line 45... |
Line 46... |
| 45 |
}
|
46 |
}
|
| 46 |
});
|
47 |
});
|
| 47 |
var carteCentre = new google.maps.LatLng(46.4, 3.10);
|
48 |
var carteCentre = new google.maps.LatLng(46.4, 3.10);
|
| 48 |
var carteOptions = {
|
49 |
var carteOptions = {
|
| 49 |
zoom: 6,
|
50 |
zoom: 6,
|
| 50 |
center: carteCentre,
|
- |
|
| 51 |
mapTypeId: google.maps.MapTypeId.ROADMAP
|
51 |
mapTypeId: google.maps.MapTypeId.ROADMAP
|
| 52 |
};
|
52 |
};
|
| 53 |
var ctaLayer = null;
|
53 |
var ctaLayer = null;
|
| 54 |
|
54 |
|
| 55 |
function refreshMap() {
|
55 |
function refreshMap() {
|
| 56 |
var points = [];
|
56 |
var points = [];
|
| - |
|
57 |
var bounds = new google.maps.LatLngBounds();
|
| 57 |
for (var i = 0; i < obs.nombre; ++i) {
|
58 |
for (var i = 0; i < obs.nombre; ++i) {
|
| 58 |
var maLatLng = new google.maps.LatLng(obs.points[i].coord_x, obs.points[i].coord_y);
|
59 |
var maLatLng = new google.maps.LatLng(obs.points[i].coord_x, obs.points[i].coord_y);
|
| 59 |
var pointImage = new google.maps.MarkerImage(pointImageUrl, new google.maps.Size(24, 32));
|
60 |
var pointImage = new google.maps.MarkerImage(pointImageUrl, new google.maps.Size(24, 32));
|
| 60 |
var point = new google.maps.Marker({
|
61 |
var point = new google.maps.Marker({
|
| 61 |
position: maLatLng,
|
62 |
position: maLatLng,
|
| 62 |
map: map,
|
63 |
map: map,
|
| 63 |
icon: pointImage,
|
64 |
icon: pointImage,
|
| 64 |
stationId: obs.points[i].id
|
65 |
stationId: obs.points[i].id
|
| 65 |
});
|
66 |
});
|
| Line -... |
Line 67... |
| - |
|
67 |
|
| - |
|
68 |
bounds.extend(maLatLng);
|
| 66 |
|
69 |
|
| 67 |
google.maps.event.addListener(point, 'click', function() {
|
70 |
google.maps.event.addListener(point, 'click', function() {
|
| 68 |
afficherMsgChargement();
|
71 |
afficherMsgChargement();
|
| 69 |
infoBulle.open(map, this);
|
72 |
infoBulle.open(map, this);
|
| 70 |
chargerFormatObs(this.stationId, '*');
|
73 |
chargerFormatObs(this.stationId, '*');
|
| Line 71... |
Line 74... |
| 71 |
});
|
74 |
});
|
| 72 |
|
75 |
|
| Line 73... |
Line 76... |
| 73 |
points.push(point);
|
76 |
points.push(point);
|
| 74 |
}
|
77 |
}
|
| - |
|
78 |
|
| 75 |
|
79 |
if (pointsOrigine == null && boundsOrigine == null) {
|
| Line 76... |
Line 80... |
| 76 |
if (pointsOrigine == null) {
|
80 |
pointsOrigine = points;
|
| 77 |
pointsOrigine = points;
|
81 |
boundsOrigine = bounds;
|
| Line 78... |
Line 82... |
| 78 |
}
|
82 |
}
|
| 79 |
|
83 |
|
| 80 |
executerMarkerClusterer(points);
|
84 |
executerMarkerClusterer(points, bounds);
|
| 81 |
}
|
85 |
}
|
| 82 |
|
86 |
|
| - |
|
87 |
function executerMarkerClusterer(points, bounds) {
|
| 83 |
function executerMarkerClusterer(points) {
|
88 |
if (markerClusterer) {
|
| Line 84... |
Line 89... |
| 84 |
if (markerClusterer) {
|
89 |
markerClusterer.clearMarkers();
|
| 85 |
markerClusterer.clearMarkers();
|
90 |
}
|
| 86 |
}
|
91 |
markerClusterer = new MarkerClusterer(map, points);
|
| Line 122... |
Line 127... |
| 122 |
document.getElementById('panneau-lateral').style.display = 'none';
|
127 |
document.getElementById('panneau-lateral').style.display = 'none';
|
| 123 |
document.getElementById('pl-ouverture').style.display = 'block';
|
128 |
document.getElementById('pl-ouverture').style.display = 'block';
|
| 124 |
google.maps.event.trigger(map, 'resize');
|
129 |
google.maps.event.trigger(map, 'resize');
|
| 125 |
};
|
130 |
};
|
| Line -... |
Line 131... |
| - |
|
131 |
|
| - |
|
132 |
function ouvrirPopUp(url, nom) {
|
| - |
|
133 |
window.open(url, nom, 'directories=no, location=no, menubar=no, scrollbars=no, status=no, toolbar=no, width=550,height=600');
|
| - |
|
134 |
};
|
| 126 |
|
135 |
|
| 127 |
function filtrerParTaxon(ntAFiltrer) {
|
136 |
function filtrerParTaxon(ntAFiltrer) {
|
| 128 |
$('#taxon-'+nt).removeClass('taxon-actif');
|
137 |
$('#taxon-'+nt).removeClass('taxon-actif');
|
| 129 |
if (nt == ntAFiltrer) {
|
138 |
if (nt == ntAFiltrer) {
|
| 130 |
nt = '*';
|
139 |
nt = '*';
|
| 131 |
executerMarkerClusterer(pointsOrigine);
|
140 |
executerMarkerClusterer(pointsOrigine, boundsOrigine);
|
| 132 |
} else {
|
141 |
} else {
|
| 133 |
var url = '<?=$url_cel_carto?>/carte-defaut-json/<?=$utilisateur?>/<?=$projet?>/<?=$dept?>/'+ntAFiltrer+'?formatRetour=jsonp&callback=?';
|
142 |
var url = '<?=$url_cel_carto?>/carte-defaut-json/<?=$utilisateur?>/<?=$projet?>/<?=$dept?>/'+ntAFiltrer+'?formatRetour=jsonp&callback=?';
|
| 134 |
$.getJSON(url, function (observations) {
|
143 |
$.getJSON(url, function (observations) {
|
| 135 |
obs = observations;
|
144 |
obs = observations;
|
| Line 151... |
Line 160... |
| 151 |
<? endforeach; ?>
|
160 |
<? endforeach; ?>
|
| 152 |
<? endif; ?>
|
161 |
<? endif; ?>
|
| Line 153... |
Line 162... |
| 153 |
|
162 |
|
| 154 |
// Create the DIV to hold the control and call the HomeControl()
|
163 |
// Create the DIV to hold the control and call the HomeControl()
|
| - |
|
164 |
// constructor passing in this DIV.
|
| 155 |
// constructor passing in this DIV.
|
165 |
|
| 156 |
var panneauDiv = document.getElementById('panneau-lateral');
|
166 |
var panneauDiv = document.getElementById('panneau-lateral');
|
| 157 |
panneauDiv.index = 0;
|
167 |
panneauDiv.index = 0;
|
| Line 158... |
Line 168... |
| 158 |
map.controls[google.maps.ControlPosition.TOP_LEFT].push(panneauDiv);
|
168 |
map.controls[google.maps.ControlPosition.TOP_LEFT].push(panneauDiv);
|
| 159 |
|
169 |
|
| 160 |
var ouverturePanneauDiv = document.getElementById('pl-ouverture');
|
170 |
var ouverturePanneauDiv = document.getElementById('pl-ouverture');
|
| Line -... |
Line 171... |
| - |
|
171 |
ouverturePanneauDiv.index = 0;
|
| 161 |
ouverturePanneauDiv.index = 0;
|
172 |
map.controls[google.maps.ControlPosition.TOP_LEFT].push(ouverturePanneauDiv);
|
| 162 |
map.controls[google.maps.ControlPosition.TOP_LEFT].push(ouverturePanneauDiv);
|
173 |
|
| Line 163... |
Line 174... |
| 163 |
|
174 |
|
| 164 |
var ouvertureDiv = document.getElementById('pl-ouverture');
|
175 |
var ouvertureDiv = document.getElementById('pl-ouverture');
|
| Line 176... |
Line 187... |
| 176 |
<!-- CSS -->
|
187 |
<!-- CSS -->
|
| 177 |
<link href="<?=$url_base?>modules/carto/squelettes/css/carto.css" rel="stylesheet" type="text/css" media="screen" />
|
188 |
<link href="<?=$url_base?>modules/carto/squelettes/css/carto.css" rel="stylesheet" type="text/css" media="screen" />
|
| 178 |
</head>
|
189 |
</head>
|
| Line 179... |
Line 190... |
| 179 |
|
190 |
|
| - |
|
191 |
<body onload="initialize()">
|
| 180 |
<body onload="initialize()">
|
192 |
<div id="zone-titre">
|
| 181 |
<h1 id="carte-titre">
|
193 |
<h1 id="carte-titre">
|
| - |
|
194 |
Observations issues des membres de <a href="http://www.tela-botanica.org/" onclick="window.open(this.href); arreter(event); return false;">Tela Botanica</a>
|
| 182 |
<img rel="icon" type="image/png" src="http://www.tela-botanica.org/sites/commun/generique/images/favicones/tela_botanica.png" alt="logo Tela Botanica"/>
|
195 |
</h1>
|
| - |
|
196 |
<div id="zone-info">
|
| 183 |
Observations issues des membres de Tela Botanica
|
197 |
<a href="<?=$url_base?>carto?carte=avertissement" onClick="ouvrirPopUp('<?=$url_base?>carto?carte=avertissement', 'Avertissement'); arreter(event); return false;">
|
| 184 |
<img src="<?=$url_base?>modules/carto/squelettes/images/information-icone.png" align="right";
|
198 |
<img src="<?=$url_base?>modules/carto/squelettes/images/information.png"
|
| 185 |
alt="Données provenant du carnet en ligne" title="Données provenant du carnet en ligne"
|
- |
|
| - |
|
199 |
alt="Avertissement" title="Avertissement" />
|
| - |
|
200 |
</a>
|
| 186 |
onClick="window.open('./popup.htm', 'InfoDonnees', 'directories=no, location=no, menubar=no, scrollbars=no, status=no, toolbar=no, width=550,height=600')" />
|
201 |
</div>
|
| 187 |
</h1>
|
202 |
</div>
|
| 188 |
<div id="panneau-lateral">
|
203 |
<div id="panneau-lateral">
|
| 189 |
<div id="pl-ouverture" title="Ouvrir le panneau latéral"><span>Panneau >></span></div>
|
204 |
<div id="pl-ouverture" title="Ouvrir le panneau latéral"><span>Panneau >></span></div>
|
| 190 |
<div id="pl-fermeture" title="Fermer le panneau latéral"><span><< Fermer [x]</span></div>
|
205 |
<div id="pl-fermeture" title="Fermer le panneau latéral"><span><< Fermer [x]</span></div>
|
| 191 |
<div id="pl-entete">
|
206 |
<div id="pl-entete">
|