I am using MapBox iOS SDK. I have an database with objects in coordinate system from -20 000 000 to 20 000 000 both for latitude and longitude.
I am trying to draw lines. But i don't know how to transform coordinates. My map tiles is -180/180 -85/85.
I try this.
let startLongDouble = Double(entry[startLong])! * 180 / 20000000
let startLatDouble = Double(entry[startLat])! * 85 / 20000000
but then i realized that it bad because 10 000 000 line have in pixels differs. It is longer on the edge , because this formula transform 1 to 1. But the length of (180; 85 ) to (180;45) is longer then (180;45) to (180;0) because its a map so the distance on Polyus is longer