Rewrote opacity alg for clusters

This commit is contained in:
efarooqui
2020-10-13 11:04:07 -07:00
parent d649ba99ed
commit b5bb7472ac
3 changed files with 22 additions and 9 deletions

View File

@@ -168,8 +168,12 @@ export function calcOpacity (num) {
return base + (Math.min(0.5, 0.08 * (num - 1)))
}
export function calcClusterSize (pointCount, numClusters) {
return Math.min(50, 10 + (pointCount / numClusters) * 10)
export function calcClusterOpacity (pointCount, totalPoints) {
return Math.min(0.8, 0.08 + (pointCount / totalPoints) * 50)
}
export function calcClusterSize (pointCount, totalPoints) {
return Math.min(50, 10 + (pointCount / totalPoints) * 75)
}
export function isLatitude (lat) {