Update polyline auto scaling width.
This commit is contained in:
		
							parent
							
								
									6ae4e88d23
								
							
						
					
					
						commit
						bc70c4267d
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		|  | @ -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; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue