jofomah / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

IProjection unable to translated lon/lat to screen X/Y pixel coordinates #344

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

IMapView map = (MapView) findViewById(R.id.myMapView);
IGeoPoint center = map.getMapCenter();
Point point = map.getProjection().toPixels(center, null);

The center contains the lon and lat of the center of the part of the map shown. 
Bit both point.x and point.y contain values which do not match the screen pixel 
X and Y coordinates of the center of displayed map.

What is the expected output? What do you see instead?

I expect the a screen pixel X/Y coordinate to match the location where the 
lon/lat is rendered.

What version of the product are you using? On what operating system?

osmdroid 3.0.8 / android 4.0.4 Galaxy Nexus

Please provide any additional information below.

Bare example of the problem at:
https://github.com/rcgroot/osmdroidexample

Original issue reported on code.google.com by rcgr...@gmail.com on 17 May 2012 at 7:06