I've got a little problem. I have a GPX-Track containing LatLon coordinates based on WGS84. The track should be drawn on a cropped map, and for this, I need the pixel coordinates. The map tiles are from OSM
I'm not quite sure how to do this, but I figured out a way (without implementing it yet, since I don't have the formulars right now).
1.) Convert LatLon to Spherical Mercator which is used by OSM 2.) Linear transformation spherical mercator -> pixel coordinates. For step 2., 2 identical points are needed. I guess I can use the map's corner points.
Is there a better way to do this? As this is a homework, I am not allowed to use a library. (Since I am not at home right now, where my formulary is, is there any good site containing ellipsoid parameters and the formulars?)