mirror of
https://forge.chapril.org/tykayn/libre-charge-map
synced 2025-06-20 01:34:43 +02:00
up style
This commit is contained in:
parent
d78bd89900
commit
01e6acd3d2
3 changed files with 66 additions and 67 deletions
12
js/utils.js
12
js/utils.js
|
@ -19,35 +19,27 @@ const utils = {
|
|||
|
||||
let found_type_2 = false
|
||||
let found_type_chademo = false
|
||||
// deviner les puissances max selon les capacités de prises
|
||||
for (var tag in feature.properties.tags) {
|
||||
if (tag.indexOf('type2') !== -1) {
|
||||
// console.log('tag type2', tag)
|
||||
|
||||
found_type_2 = true
|
||||
power = 43
|
||||
}
|
||||
if (tag.indexOf('chademo') !== -1) {
|
||||
found_type_chademo = true
|
||||
// console.log('tag chademo', tag)
|
||||
power = 63
|
||||
}
|
||||
let value = feature.properties.tags[tag]
|
||||
if (value && tag.toLowerCase().indexOf('output') !== -1) {
|
||||
// console.log('tag contient output', tag, value)
|
||||
value = '' + value
|
||||
if (value.replace) {
|
||||
value = value.replace(' ')
|
||||
value = value.replace('kW', '')
|
||||
}
|
||||
let power = parseInt(value)
|
||||
// deviner les types de prises présents
|
||||
|
||||
// if (power) {
|
||||
// console.log('power', power)
|
||||
// console.log('outputPower', outputPower)
|
||||
// }
|
||||
if (power > outputPower) {
|
||||
outputPower = power
|
||||
// console.log('power', power)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue