Commit 48a2db1e authored by Daniel STAN's avatar Daniel STAN
Browse files

[wifimap] Ajout d'une icône point

Et correction d'un bug qui n'affichait que les bornes positionnées
parent a2aab80a
......@@ -114,8 +114,10 @@ WifiMap = {
}
catch(e){
this.mapPosition = undefined;
this.update_borne_infos(xml);
return;
}
this.mapPosition = new OpenLayers.LonLat(x,y);
this.mapPosition.transform(that.projections.gps,that.projections.map);
......@@ -221,13 +223,18 @@ WifiMap = {
}
//
getElementsByClassName(html,'pan_to')[0].addEventListener('click',
(function () {
if(this.mapPosition) {
this.wifiMap.map.panTo(this.mapPosition);
this.wifiMap.highlight(this.hostname);
}
}).bind(this));
if(this.mapPosition) {
panTo = getElementsByClassName(html,'pan_to')[0]
panTo.addEventListener('click',
(function (event) {
if(this.mapPosition) {
this.wifiMap.map.panTo(this.mapPosition);
this.wifiMap.highlight(this.hostname);
}
event.preventDefault();
}).bind(this));
panTo.className = panTo.className.replace(/ *template ?/,'');
}
//On fixe la nouvelle bar d'info
if(this.html_list)
......
......@@ -12,10 +12,12 @@ Dernière mise à jour il y a <label id="last_update"> </label>
<div id="toolbar">
<div id="borne_template" class="borne template">
<h3><img src="/static/img/borne.png" alt="[borne wifi]" />
<a class="hostname pan_to"></a></h3>
<a class="hostname"></a>
<a href="#" class="pan_to template"><img src="/static/img/point.png"/></a></h3>
<ul>
<li class="comment template">Liste commentaire</li>
</ul>
<ul>
</div>
</div>
<div id="map">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment