<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
At 09.07.2010 01:19, Mostafa El-ashram wrote:<div class="im"><br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Please could you tell me how to determine the scale of a map on open<br>street maps<br></blockquote></div></blockquote></div><div><br></div>The TMS co-ordinate system (OSM, Google Maps, NearMap, Bing Maps, etc) use a Mercator projection; you'll find it referred to as "cylindrical Mercator" and "spherical Mercator".<div>
<a href="http://en.wikipedia.org/wiki/Mercator_projection">http://en.wikipedia.org/wiki/Mercator_projection</a><br><div><a href="http://mathworld.wolfram.com/MercatorProjection.html">http://mathworld.wolfram.com/MercatorProjection.html</a></div>
<div><a href="http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx">http://www.sharpgis.net/post/2007/07/27/The-Microsoft-Live-Maps-and-Google-Maps-projection.aspx</a></div><div>
<br></div><div>To derive the scale in metres per pixel at a given latitude and zoom level, you can use this (JavaScript, which uses radians for trig):</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-size: x-small;"><div>
metresPerPixel = Math.abs(156543.04 * Math.cos(latitudeAtCentreOfMap * nml.PI / 180)) / Math.pow(2, zoomLevel);</div></span></font></div><div><br></div><div>See <a href="http://msdn.microsoft.com/en-us/library/aa940990.aspx">http://msdn.microsoft.com/en-us/library/aa940990.aspx</a> for a reference.</div>
<div><br></div><div>Cheers</div><div>b</div><div><br></div>-- <br>Ben Last<br>Development Manager (HyperWeb)<br>NearMap Pty Ltd<br><br>
</div></div>