reduce circles when higher zoom
This commit is contained in:
parent
a004d47392
commit
9f7f31f03a
14
js/main.js
14
js/main.js
@ -25,7 +25,6 @@ const tileServer_stamen = 'https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png
|
||||
// Initialisation de la carte avec la vue centrée sur la ville choisie
|
||||
let map = L.map('map')
|
||||
L.control.scale().addTo(map)
|
||||
//L.control.zoom().addTo(map)
|
||||
|
||||
/**
|
||||
* filtres à toggle par des boutons dans la page
|
||||
@ -410,19 +409,20 @@ function displayPointsFromApi(points = geojsondata) {
|
||||
let ratio_circle = 10
|
||||
|
||||
// quand on est loin, montrer d'avantage de couleur, pas le centre
|
||||
if (zoom > 13) {
|
||||
if (zoom < 13) {
|
||||
ratio_circle = 5
|
||||
}
|
||||
else if (zoom > 15) {
|
||||
else if (zoom < 15) {
|
||||
ratio_circle = 1
|
||||
opacity = 0.25
|
||||
}
|
||||
else if (zoom >= 16) {
|
||||
else if (zoom <= 16) {
|
||||
ratio_circle = 0.5
|
||||
}
|
||||
else if (zoom >= 18) {
|
||||
else if (zoom <= 18) {
|
||||
ratio_circle = 0.25
|
||||
}
|
||||
console.log('ratio_circle', ratio_circle)
|
||||
if (outPowerGuessed >= 300) {
|
||||
radius = 70 * ratio_circle
|
||||
} else if (outPowerGuessed >= 200) {
|
||||
@ -480,9 +480,7 @@ function displayPointsFromApi(points = geojsondata) {
|
||||
}
|
||||
|
||||
function makeCssClassFromTags(tags) {
|
||||
// console.log('tags', tags)
|
||||
let tagKeys = Object.keys(tags)
|
||||
// console.log('tagKeys', tagKeys)
|
||||
if (!tags) {
|
||||
return ''
|
||||
}
|
||||
@ -592,7 +590,7 @@ $(document).ready(function () {
|
||||
})
|
||||
|
||||
function showActiveFilter(filterVariableName, selectorId) {
|
||||
$(selectorId).className = 'filter-state-' + filterVariableName
|
||||
$(selectorId).attr('class', 'filter-state-' + filterVariableName )
|
||||
}
|
||||
|
||||
function cycleVariableState(filterVariableName, selectorId) {
|
||||
|
Loading…
Reference in New Issue
Block a user