views:

104

answers:

2

I am designing an application in C++ to view and edit a map of a fictional planet. How it works will be similar to Google Maps. I would like the user to be able to see their current position in latitude/longitude and world coordinates on the GUI.

How can I convert a latitude and longitude values to "world coordinates" and back, as in Google Maps? or to "pixel coordinates" and back?

A: 

The latitude is the number of degrees from the equator. The longitude is the number of degrees from the main meridian. The latitude ranges from -90 to 90, the longitude from -180 to 180.

Sjoerd
A: 

I found the answer to my question. The formulas for converting between the different coordinate systems can be found in the source code of this example on the Google Maps API website: http://code.google.com/apis/maps/documentation/javascript/examples/map-coordinates.html

Jake Petroules