About the scale of map

Topics: Algorithms, SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Jun 6, 2008 at 10:06 AM
      There is scale on every paper-map. Then how can I get the scale of my map in current Zoom?
Jun 6, 2008 at 11:08 AM
Hi paradin, this is an interesting problem - paper is always the same size whereas a pixel is not - it varies by DPI. So you need to know the resolution of the screen - remember this may be different for different machines running the same code and it may be different for the same machine outputting to different devices (printer etc).
And if you are rendering on a web server the requesting browser may have a completely different resolution when displaying the image than the server had when creating it.

if you _know_ the dpi then the scale is Map.PixelWidth * DPI
see [url:http://www.codeplex.com/SharpMap/WorkItem/View.aspx?WorkItemId=8643] for more.. hth jd
Jun 7, 2008 at 2:03 AM
Thank you, JohnDiss
I think you are a very good,enthusiastic team. Your suggestions give me a great favor.