![]() Similar to Mercator projection, there are more advanced projections available which are more accurate, but for the sake of simplicity, I chose the Mercator projection. I have addressed all these difficulties and implemented the Mercator projection using C#.NET. ![]() In order to apply Mercator projection, you need to calculate different parameters such as radius, circumference, and others. You can easily understand the Mercator projection, but to apply that to Google images and to program that in the computer is a slightly difficult problem. It was the requirement in one of my projects. The main problem is to convert Latitude and longitude values to screen coordinates. The things such as XNA framework, Winforms API, and Mercator projection formulas are easily available. In this way, you can use Google maps offline in Windows. If you run the application file included with this article, you will see that mouse coordinates (X,Y) will be shown on the screen and their real world latitude and longitude values as soon as you move the mouse in the application window. In the upper left corner of the window above X, Y shows the screen co-coordinates for the Yellow pointer and latitude and longitude shows the real world latitude and longitude of the Yellow pointer on to the screen. I have included the code files to demonstrate how you can convert the mouse position on the map to real world latitude and longitude values, which is demonstrated in the figure below: Although I have taken the image data from Google, all the background processing for calculating the latitude and longitude is done by me using Mercator projection method. ![]() In this article, I will discuss a problem about how we can calculate the latitude and longitude information for a particular location, without using any online service such as Microsoft, or Google map service.
0 Comments
Leave a Reply. |