mirror of
https://forge.chapril.org/tykayn/libre-charge-map
synced 2025-06-20 01:34:43 +02:00
quality control stuff
This commit is contained in:
parent
59ec02284a
commit
afb71cbd6a
6 changed files with 114 additions and 10 deletions
|
@ -476,7 +476,7 @@ function displayStatsFromGeoJson(resultAsGeojson, stats) {
|
|||
// Ajouter une fonction pour mettre à jour les compteurs
|
||||
function updateCounters() {
|
||||
const stationsCount = geojsondata ? geojsondata.features.length : 0;
|
||||
console.log("osmoseIssuesList", lcm_config.osmoseIssuesList);
|
||||
|
||||
const osmoseText = lcm_config.osmoseIssuesList.length > 0 ? ` <span class="osmose-counter">(+ ${lcm_config.osmoseIssuesList.length} ?)</span>` : '';
|
||||
$('#count_features_fond').html(`⚡${stationsCount}${osmoseText} stations`);
|
||||
}
|
||||
|
@ -869,9 +869,13 @@ function fillDetailsWithFeature(feature) {
|
|||
|
||||
<a class="edit-button" href="https://www.openstreetmap.org/edit?editor=id&node=${feature.properties.id}">✏️</a>
|
||||
<a class="edit-button josm" data-href="${link_josm}" href="#">JOSM</a>
|
||||
<a href="${makeMapCompleteUrl(feature)}" target="_blank" class="edit-button mapcomplete-link" title="Voir sur MapComplete">
|
||||
<img src="https://mapcomplete.org/assets/themes/charging_stations/plug.svg" alt="icone">
|
||||
</a>
|
||||
<a href="${panoramaxLink}" target="_blank" class="panoramax-link" title="Voir sur Panoramax">
|
||||
<img src="styles/images/panoramax.ico" alt="icone">
|
||||
</a>
|
||||
|
||||
|
||||
<div class="socket-list">
|
||||
${displaySocketsList(feature)}
|
||||
|
@ -879,10 +883,20 @@ function fillDetailsWithFeature(feature) {
|
|||
<div class="table-details" >
|
||||
${table_details}
|
||||
</div>
|
||||
<div class="bad-tags">
|
||||
<h3>Problèmes de qualité</h3>
|
||||
${lcm_utils.displayBadTagsFromFeature(feature)}
|
||||
</div>
|
||||
`
|
||||
$('#current_station_infos').html(`<div class='island irve-details'><h2>Détails</h2>${content}</div>`);
|
||||
}
|
||||
|
||||
function makeMapCompleteUrl(feature) {
|
||||
// https://mapcomplete.org/charging_stations.html?z=16.3&lat=48.85770772656571&lon=2.353630884174322#node/123454656
|
||||
const center = map.getCenter()
|
||||
const zoom = map.getZoom()
|
||||
return `https://mapcomplete.org/charging_stations.html?z=${zoom}&lat=${center.lat}&lon=${center.lng}#node/${feature.properties.id}`
|
||||
}
|
||||
function bindFullDetails(feature) {
|
||||
|
||||
$('#fullDetails').on('click', () => {
|
||||
|
@ -1326,6 +1340,7 @@ function init() {
|
|||
$('#chercherButton').on('click', function () {
|
||||
supprimerMarqueurs();
|
||||
loadOverpassQuery();
|
||||
geoDataPointsFromApi();
|
||||
});
|
||||
$('#setRandomView').on('click', function () {
|
||||
setRandomView();
|
||||
|
@ -1351,7 +1366,7 @@ function init() {
|
|||
|
||||
// Initialisation des états des checkboxes des filtres selon les valeurs de configuration
|
||||
Object.keys(lcm_config.filterConfigs).forEach(filterId => {
|
||||
console.log("checbox ", $(`#${filterId}`), lcm_config.filterConfigs[filterId], lcm_config)
|
||||
|
||||
$(`#${filterId}`).prop('checked', lcm_config.filterConfigs[filterId]);
|
||||
});
|
||||
// Écouteurs pour les filtres
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue