mirror of
https://forge.chapril.org/tykayn/libre-charge-map
synced 2025-06-20 01:34:43 +02:00
up display details
This commit is contained in:
parent
cacc382924
commit
6ac7a95020
2 changed files with 21 additions and 2 deletions
|
@ -135,6 +135,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div id="current_station_infos"></div>
|
||||
<div id="infos_carte"></div>
|
||||
|
||||
<div id="filters">
|
||||
|
@ -198,7 +199,10 @@
|
|||
À propos de ce plan</h2>
|
||||
<p>
|
||||
La carte thématique proposant des points de charge pour véhicule électrique, basée sur les données
|
||||
d'OpenStreetMap.
|
||||
d'OpenStreetMap. Voir la documentation OSM concernant <a href="https://wiki.openstreetmap.org/wiki/Key:socket:*">les sockets</a> et les
|
||||
<a href="https://wiki.openstreetmap.org/wiki/FR:Tag:amenity%3Dcharging_station">
|
||||
stations de recharge pour véhicules électriques
|
||||
</a>.
|
||||
</p>
|
||||
<br>
|
||||
Fait par <a href="https://mastodon.cipherbliss.com/@tykayn">Tykayn</a> - <a href="https://www.cipherbliss.com">www.cipherbliss.com</a>.
|
||||
|
|
|
@ -412,6 +412,7 @@ function eachFeature(feature, layer) {
|
|||
<a href="${panoramaxLink}" target="_blank" class="panoramax-link" title="Voir sur Panoramax">
|
||||
<img src="styles/images/panoramax.ico" alt="icone"></a>
|
||||
<span class="color-indication" style="background-color: ${color};">${displayOutPowerGuessed}</span>
|
||||
<button id="fullDetails" >détails</button>
|
||||
<span class="popup-content">${popupContent}</span>`;
|
||||
|
||||
let zoom = map.getZoom();
|
||||
|
@ -462,7 +463,10 @@ function eachFeature(feature, layer) {
|
|||
|
||||
let keys = Object.keys(feature.properties)
|
||||
console.log('feature.properties', keys)
|
||||
if(keys.indexOf('type2_cable') === -1 ){
|
||||
/**
|
||||
* on considère l'information de câble manquante uniquement dans le cas où une info de socket de type 2 est présente mais pas le tag socket:type2_cable.
|
||||
*/
|
||||
if(keys.indexOf('socket:type2') !==-1 && keys.indexOf('socket:type2_cable') === -1 ){
|
||||
let circle_alert = L.circle(layer._latlng, {
|
||||
color: 'red',
|
||||
fillColor: 'orange',
|
||||
|
@ -476,6 +480,8 @@ function eachFeature(feature, layer) {
|
|||
mouseover: function () {
|
||||
this.openPopup();
|
||||
bindEventsOnJosmRemote();
|
||||
updateExternalEditorsLinks();
|
||||
bindFullDetails(feature);
|
||||
},
|
||||
mouseout: function () {
|
||||
// setTimeout(() => this.closePopup(), 15000);
|
||||
|
@ -483,6 +489,9 @@ function eachFeature(feature, layer) {
|
|||
click: function () {
|
||||
this.openPopup();
|
||||
bindEventsOnJosmRemote();
|
||||
updateExternalEditorsLinks();
|
||||
bindFullDetails(feature);
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -526,7 +535,13 @@ function eachFeature(feature, layer) {
|
|||
});
|
||||
|
||||
}
|
||||
function bindFullDetails(feature){
|
||||
|
||||
$('#fullDetails'.on('click', ()=>{
|
||||
|
||||
$('#current_station_infos').html('<pre>'+feature.properties+'</pre>')
|
||||
}))
|
||||
}
|
||||
function makeCssClassFromTags(tags) {
|
||||
let tagKeys = Object.keys(tags)
|
||||
if (!tags) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue