How to enlarge..??

Hello,

I want to read a text file containing Lat/long values and display them on the OpenGL canvas…

For this i have first converted Lat/Long to OpenGL xy coordinates… and displayed them accordingly…

It works fine… But After converting the values to be displayed lies in the following range

x-axis: 0 - 2
y-axis: 2 - 4

and my screen projection is

glOrtho(0, canvas_width, 0, canvas_height, -1, 1);

So it appears as small as a point… I want it to be displayed at the center of the screen as big as the screen size…

how do i do this…??

Thanks in advance…

then use glOrtho(0, 2, 2, 4, -1, 1);

There’s really no need to convert your lat-lon values to values between 0 and 2, or 2 and 4. Let’s say your lon values range from -180 to +180 and lat ranges from -90 to +90. You can display the data directly with something like -

    glOrtho (-200, 200, -100, 100, -1, 1);

or

    glOrtho (-200, 200, -200, 200, -1, 1);

depending on the aspect ratio of your canvas.

glOrtho (-200, 200, -100, 100, -1, 1);

or

glOrtho (-200, 200, -200, 200, -1, 1);

If i use this then, also the projected values, after plotting will be displayed very small… Coz all values lies between the range of 72 and 73… I want the displayed objects to be directly displayed at the center of the screen with whatever lat lon range they have…

Thanks…