Give cities, towns, and villages different font sizes

This commit is contained in:
Markus Koch 2020-04-26 17:01:26 +02:00
parent 1292c1a573
commit 1ddb724140

View File

@ -45,9 +45,28 @@ streetLabelsRenderer._getDynamicFontSize = function (layer) {
return 2**(zoom - 9) * 11;
break;
case "Polygon":
var size;
if (zoom >= 4)
return 30;
return 20;
size = 30;
else
size = 20;
switch (layer.properties.type) {
case "city":
break;
case "town":
size *= 2/3;
break;
case "village":
size *= 1/3;
break;
case "district":
size *= 2/3;
break;
default:
size *= 0.5/3;
break;
}
return size;
default:
break;
}