Hi,

I search a way to convert a distance in meters to a number of pixels.

If some one have an idea .

Thanks.

--

Praline.

3 posts
• Page **1** of **1**

Hi,

I search a way to convert a distance in meters to a number of pixels.

If some one have an idea .

Thanks.

--

Praline.

I search a way to convert a distance in meters to a number of pixels.

If some one have an idea .

Thanks.

--

Praline.

- Praline
- Junior Developer
**Posts:**11**Joined:**Tue Feb 12, 2008 3:53 pm

If I remember correctly it is:

px/m=2^(7+zoomLevel)/(2*Pi*r*cos(lat))

where r is the mean radius of the earth (6378km I think, though a internet search should confirm this number).

Let me know if that doesn't work and I will check the formula when I get a chance.

px/m=2^(7+zoomLevel)/(2*Pi*r*cos(lat))

where r is the mean radius of the earth (6378km I think, though a internet search should confirm this number).

Let me know if that doesn't work and I will check the formula when I get a chance.

- don
- Junior Developer
**Posts:**18**Joined:**Fri Dec 07, 2007 5:17 am

3 posts
• Page **1** of **1**

Return to Other Coding-Problems

Users browsing this forum: No registered users and 13 guests