Give cities, towns, and villages different font sizes
This commit is contained in:
parent
1292c1a573
commit
1ddb724140
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user