Update polyline auto scaling width.

This commit is contained in:
Holt59 2018-03-03 12:48:55 +01:00
parent 6ae4e88d23
commit bc70c4267d

View File

@ -22,11 +22,17 @@ public class PaintUtils {
* @param width
* @return
*/
public static int getStrokeWidth(int width, byte zoomLevel) {
int mul = 2;
if (zoomLevel < 8) {
public static float getStrokeWidth(int width, byte zoomLevel) {
float mul = 1;
if (zoomLevel < 6) {
mul = 1;
}
else if (zoomLevel < 10) {
mul += (zoomLevel - 5) * 0.5;
}
else if (zoomLevel < 13) {
mul = 3.5f;
}
else {
mul += 2 * (zoomLevel - 8) / 3;
}