summaryrefslogtreecommitdiff
path: root/htdocs/mapscript.js
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/mapscript.js')
-rw-r--r--htdocs/mapscript.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js
index 7d7d940..735dcd9 100644
--- a/htdocs/mapscript.js
+++ b/htdocs/mapscript.js
@@ -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;
}