I am given a latitude and longitude of a place. Then I apply global mercarator projection formula. Then I am able to get a square image(256*256) with the location in it. I am using all this to display a map made my images from a customised google map, in my iphone app.
When zoom is high, even when we pinpoint randomly on that image, it will be ok. But when zoom decreases, that single image may constitue an entire nation sometimes and my pinpoint will be in another nation(on the same image).
Is there any mathematical or someother formula or something else which will help me to pinpoint the exact location of that place in that image?