fromLatLngToContainerPixel doesn't return the right value

5 views
Skip to first unread message

shawiz

unread,
Feb 1, 2009, 6:31:32 PM2/1/09
to iphone-map-view
Hi all. I am using mapview to develop an app that displays some
overlays on the map. I tried to use fromLatLngToContainerPixel to get
a position in pixels on the device where I can draw circles over the
map; however, I got some odd results after I do

GPoint centerPixel = [self.mapView.map fromLatLngToContainerPixel:
center];
NSLog(@"%ld %ld"", centerPixel.x, centerPixel.y);

// prints
33212 5521536

Isn't GPoints always have small values for iPhone? Say 0 ~ 480.
Or is this just due to my incorrect formatting strings?

I get the same odd results after I call getCenterPixel. Should it
always return the center pixel of my screen?

Thanks in advanced.

shawiz

unread,
Feb 1, 2009, 6:31:32 PM2/1/09
to iphone-map-view

dstites

unread,
Mar 1, 2009, 12:19:27 PM3/1/09
to iphone-map-view
I have the exact same problem, it is off by a little bit but I haven't
found the solution yet.
Reply all
Reply to author
Forward
0 new messages