@@ -37,11 +37,11 @@ import joshuatee.wx.objects.PolygonType
3737import  joshuatee.wx.objects.ProjectionType 
3838import  joshuatee.wx.settings.RadarPreferences 
3939import  joshuatee.wx.util.ProjectionNumbers 
40- import  joshuatee.wx.util.To 
4140import  joshuatee.wx.util.UtilityCanvasProjection 
4241import  joshuatee.wx.util.UtilityCities 
4342import  joshuatee.wx.util.UtilityLog 
4443import  java.nio.ByteBuffer 
44+ import  kotlin.math.abs 
4545
4646internal  object  CanvasDraw {
4747
@@ -98,17 +98,17 @@ internal object CanvasDraw {
9898        }
9999        paint.textSize =  textSize.toFloat()
100100        UtilityCities .list.forEach {
101-             val  coordinates =  Projection .computeMercatorNumbers (it.x, it.y, projectionNumbers)
101+             val  coordinates =  Projection .computeMercatorNumbersF (it.x, it.y, projectionNumbers)
102102            if  (textSize >  0 ) {
103103                canvas.drawText(
104104                    RegExp .comma.split(it.city)[0 ],
105-                     coordinates[0 ].toFloat()  +  4.0f ,
106-                     coordinates[1 ].toFloat()  -  4.0f ,
105+                     coordinates[0 ] +  4.0f ,
106+                     coordinates[1 ] -  4.0f ,
107107                    paint
108108                )
109-                 canvas.drawCircle(coordinates[0 ].toFloat() , coordinates[1 ].toFloat() , 2.0f , paint)
109+                 canvas.drawCircle(coordinates[0 ], coordinates[1 ], 2.0f , paint)
110110            } else  {
111-                 canvas.drawCircle(coordinates[0 ].toFloat() , coordinates[1 ].toFloat() , 1.0f , paint)
111+                 canvas.drawCircle(coordinates[0 ], coordinates[1 ], 1.0f , paint)
112112            }
113113        }
114114    }
@@ -128,18 +128,18 @@ internal object CanvasDraw {
128128        if  (projectionType.needsCanvasShift) {
129129            canvas.translate(CanvasMain .xOffset, CanvasMain .yOffset)
130130        }
131-         val  x =  To .double( Location .x) 
132-         val  y =  To .double (Location .y.replace( " - " ,  " " ) )
133-         val  coordinates =  Projection .computeMercatorNumbers (x, y, projectionNumbers)
131+         val  x =  Location .latLon.lat 
132+         val  y =  abs (Location .latLon.lon )
133+         val  coordinates =  Projection .computeMercatorNumbersF (x, y, projectionNumbers)
134134        paint.color =  RadarPreferences .colorLocdot
135135	    // elys mod
136136        // custom locationdot//
137137        if  (RadarPreferences .locationDotFollowsGps) {
138138            val  locationicon:  Bitmap  =  BitmapFactory .decodeFile(GlobalVariables .FilesPath  +  " location.png" 
139139            val  locationiconresized:  Bitmap  =  Bitmap .createScaledBitmap(locationicon, RadarPreferences .locIconSize, RadarPreferences .locIconSize, false )
140-             canvas.drawBitmap(locationiconresized, coordinates[0 ].toFloat() , coordinates[1 ].toFloat() , null )
140+             canvas.drawBitmap(locationiconresized, coordinates[0 ], coordinates[1 ], null )
141141        } else  {
142-         canvas.drawCircle(coordinates[0 ].toFloat() , coordinates[1 ].toFloat() , 2.0f , paint)
142+         canvas.drawCircle(coordinates[0 ], coordinates[1 ], 2.0f , paint)
143143	}
144144    }    
145145    fun  mcd (
0 commit comments